CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ProcCount.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: MVAComputer
4 // Class : ProcCount
5 //
6 
7 // Implementation:
8 // Variable processor that returns the number of input variable instances
9 //
10 // Author: Christophe Saout
11 // Created: Fri May 18 20:05 CEST 2007
12 // $Id: ProcCount.cc,v 1.2 2007/07/15 22:31:46 saout Exp $
13 //
14 
16 
19 
20 using namespace PhysicsTools;
21 
22 namespace { // anonymous
23 
24 class ProcCount : public VarProcessor {
25  public:
26  typedef VarProcessor::Registry::Registry<ProcCount,
28 
29  ProcCount(const char *name,
31  const MVAComputer *computer);
32  virtual ~ProcCount() {}
33 
34  virtual void configure(ConfIterator iter, unsigned int n);
35  virtual void eval(ValueIterator iter, unsigned int n) const;
36 };
37 
38 static ProcCount::Registry registry("ProcCount");
39 
40 ProcCount::ProcCount(const char *name,
42  const MVAComputer *computer) :
43  VarProcessor(name, calib, computer)
44 {
45 }
46 
47 void ProcCount::configure(ConfIterator iter, unsigned int n)
48 {
49  while(iter)
51 }
52 
53 void ProcCount::eval(ValueIterator iter, unsigned int n) const
54 {
55  while(iter) {
56  unsigned int count = iter.size();
57  iter(count);
58  iter++;
59  }
60 }
61 
62 } // anonymous namespace
detail::ThreadSafeRegistry< ParameterSetID, ParameterSet, ProcessParameterSetIDCache > Registry
Definition: Registry.h:37
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
Main interface class to the generic discriminator computer framework.
Definition: MVAComputer.h:40
template to generate a registry singleton for a type.
static Interceptor::Registry registry("Interceptor")
Common base class for variable processors.
Definition: VarProcessor.h:39