CMS 3D CMS Logo

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 //
13 
15 
18 
19 using namespace PhysicsTools;
20 
21 namespace { // anonymous
22 
23  class ProcCount : public VarProcessor {
24  public:
26 
27  ProcCount(const char *name, const Calibration::ProcCount *calib, const MVAComputer *computer);
28  ~ProcCount() override {}
29 
30  void configure(ConfIterator iter, unsigned int n) override;
31  void eval(ValueIterator iter, unsigned int n) const override;
32  };
33 
34  ProcCount::Registry registry("ProcCount");
35 
36  ProcCount::ProcCount(const char *name, const Calibration::ProcCount *calib, const MVAComputer *computer)
38 
39  void ProcCount::configure(ConfIterator iter, unsigned int n) {
40  while (iter)
41  iter++(Variable::FLAG_ALL) << Variable::FLAG_NONE;
42  }
43 
44  void ProcCount::eval(ValueIterator iter, unsigned int n) const {
45  while (iter) {
46  unsigned int count = iter.size();
47  iter(count);
48  iter++;
49  }
50  }
51 
52 } // anonymous namespace
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
PhysicsTools::MVAComputer
Main interface class to the generic discriminator computer framework.
Definition: MVAComputer.h:39
PhysicsTools::VarProcessor
Common base class for variable processors.
Definition: VarProcessor.h:36
calib
Definition: CalibElectron.h:12
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
PhysicsTools
Definition: Histogram.h:13
VarProcessor.h
PhysicsTools::Calibration::ProcCount
Definition: MVAComputer.h:87
PhysicsTools::ProcessRegistryImpl
template to generate a registry singleton for a type.
Definition: ProcessRegistry.h:25
Calibration.h
HLT_2018_cff.computer
computer
Definition: HLT_2018_cff.py:50520
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
Exception.h