PhysicsTools
MVAComputer
src
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
14
#include "
FWCore/Utilities/interface/Exception.h
"
15
16
#include "
PhysicsTools/MVAComputer/interface/VarProcessor.h
"
17
#include "
PhysicsTools/MVAComputer/interface/Calibration.h
"
18
19
using namespace
PhysicsTools
;
20
21
namespace
{
// anonymous
22
23
class
ProcCount :
public
VarProcessor
{
24
public
:
25
typedef
VarProcessor::Registry::Registry<ProcCount, Calibration::ProcCount>
Registry;
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
)
37
:
VarProcessor
(
name
,
calib
,
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
submitPVResolutionJobs.count
count
Definition:
submitPVResolutionJobs.py:352
calib
Definition:
CalibElectron.h:12
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
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
Exception.h
HLT_FULL_cff.computer
computer
Definition:
HLT_FULL_cff.py:52072
Generated for CMSSW Reference Manual by
1.8.16