PhysicsTools
UtilAlgos
interface
CompleteNTupler.h
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/ProducesCollector.h
"
2
#include "
PhysicsTools/UtilAlgos/interface/NTupler.h
"
3
4
#include "
PhysicsTools/UtilAlgos/interface/StringBasedNTupler.h
"
5
#include "
PhysicsTools/UtilAlgos/interface/VariableNTupler.h
"
6
//#include "PhysicsTools/UtilAlgos/interface/AdHocNTupler.h"
7
8
class
CompleteNTupler
:
public
NTupler
{
9
public
:
10
CompleteNTupler
(
const
edm::ParameterSet
& iConfig) {
11
sN
=
new
StringBasedNTupler
(iConfig);
12
if
(iConfig.
exists
(
"variablesPSet"
))
13
if
(!iConfig.
getParameter
<
edm::ParameterSet
>(
"variablesPSet"
).
empty
())
14
vN
=
new
VariableNTupler
(iConfig);
15
else
16
vN
=
nullptr
;
17
else
18
vN
=
nullptr
;
19
20
/* if (iConfig.exists("AdHocNPSet"))
21
if (!iConfig.getParameter<edm::ParameterSet>("AdHocNPSet").empty())
22
aN = new AdHocNTupler(iConfig);
23
else aN=0;
24
else
25
aN=0;
26
*/
27
}
28
29
uint
registerleaves
(
edm::ProducesCollector
producesCollector)
override
{
30
uint
nLeaves = 0;
31
nLeaves +=
sN
->
registerleaves
(producesCollector);
32
if
(
vN
)
33
nLeaves +=
vN
->
registerleaves
(producesCollector);
34
// if (aN)
35
// nLeaves+=aN->registerleaves(producesCollector);
36
return
nLeaves;
37
}
38
void
fill
(
edm::Event
&
iEvent
)
override
{
39
sN
->
fill
(
iEvent
);
40
if
(
vN
)
41
vN
->
fill
(
iEvent
);
42
// if (aN)
43
// aN->fill(iEvent);
44
45
sN
->
callBack
();
46
if
(
vN
)
47
vN
->
callBack
();
48
// if (aN)
49
// aN->callBack();
50
}
51
52
private
:
53
StringBasedNTupler
*
sN
;
54
VariableNTupler
*
vN
;
55
// AdHocNTupler * aN;
56
};
StringBasedNTupler
Definition:
StringBasedNTupler.h:201
VariableNTupler::fill
void fill(edm::Event &iEvent) override
Definition:
VariableNTupler.h:96
StringBasedNTupler.h
CompleteNTupler::fill
void fill(edm::Event &iEvent) override
Definition:
CompleteNTupler.h:38
StringBasedNTupler::registerleaves
uint registerleaves(edm::ProducesCollector producesCollector) override
Definition:
StringBasedNTupler.h:283
StringBasedNTupler::fill
void fill(edm::Event &iEvent) override
Definition:
StringBasedNTupler.h:358
parallelization.uint
uint
Definition:
parallelization.py:124
ProducesCollector.h
VariableNTupler::registerleaves
uint registerleaves(edm::ProducesCollector producesCollector) override
Definition:
VariableNTupler.h:51
CompleteNTupler::vN
VariableNTupler * vN
Definition:
CompleteNTupler.h:54
StringBasedNTupler::callBack
void callBack()
Definition:
StringBasedNTupler.h:444
CompleteNTupler::CompleteNTupler
CompleteNTupler(const edm::ParameterSet &iConfig)
Definition:
CompleteNTupler.h:10
VariableNTupler.h
edm::ParameterSet::exists
bool exists(std::string const ¶meterName) const
checks if a parameter exists
Definition:
ParameterSet.cc:681
edm::ParameterSet
Definition:
ParameterSet.h:47
NTupler
Definition:
NTupler.h:20
iEvent
int iEvent
Definition:
GenABIO.cc:224
VariableNTupler
Definition:
VariableNTupler.h:21
NTupler.h
edm::ProducesCollector
Definition:
ProducesCollector.h:43
CompleteNTupler
Definition:
CompleteNTupler.h:8
CompleteNTupler::registerleaves
uint registerleaves(edm::ProducesCollector producesCollector) override
Definition:
CompleteNTupler.h:29
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
VariableNTupler::callBack
void callBack()
Definition:
VariableNTupler.h:121
CompleteNTupler::sN
StringBasedNTupler * sN
Definition:
CompleteNTupler.h:53
edm::Event
Definition:
Event.h:73
edm::ParameterSet::empty
bool empty() const
Definition:
ParameterSet.h:201
Generated for CMSSW Reference Manual by
1.8.16