CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CompleteNTupler Class Reference

#include <CompleteNTupler.h>

Inheritance diagram for CompleteNTupler:
NTupler

Public Member Functions

 CompleteNTupler (const edm::ParameterSet &iConfig)
 
void fill (edm::Event &iEvent) override
 
uint registerleaves (edm::ProducesCollector producesCollector) override
 
- Public Member Functions inherited from NTupler
 NTupler ()
 
virtual ~NTupler ()
 

Private Attributes

StringBasedNTuplersN
 
VariableNTuplervN
 

Additional Inherited Members

- Protected Attributes inherited from NTupler
TTree * tree_
 
bool useTFileService_
 

Detailed Description

Definition at line 8 of file CompleteNTupler.h.

Constructor & Destructor Documentation

◆ CompleteNTupler()

CompleteNTupler::CompleteNTupler ( const edm::ParameterSet iConfig)
inline

Definition at line 10 of file CompleteNTupler.h.

10  {
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  }

References edm::ParameterSet::empty(), edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), sN, and vN.

Member Function Documentation

◆ fill()

void CompleteNTupler::fill ( edm::Event iEvent)
inlineoverridevirtual

Implements NTupler.

Definition at line 38 of file CompleteNTupler.h.

38  {
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  }

References VariableNTupler::callBack(), StringBasedNTupler::callBack(), VariableNTupler::fill(), StringBasedNTupler::fill(), iEvent, sN, and vN.

◆ registerleaves()

uint CompleteNTupler::registerleaves ( edm::ProducesCollector  producesCollector)
inlineoverridevirtual

Implements NTupler.

Definition at line 29 of file CompleteNTupler.h.

29  {
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  }

References VariableNTupler::registerleaves(), StringBasedNTupler::registerleaves(), sN, parallelization::uint, and vN.

Member Data Documentation

◆ sN

StringBasedNTupler* CompleteNTupler::sN
private

Definition at line 53 of file CompleteNTupler.h.

Referenced by CompleteNTupler(), fill(), and registerleaves().

◆ vN

VariableNTupler* CompleteNTupler::vN
private

Definition at line 54 of file CompleteNTupler.h.

Referenced by CompleteNTupler(), fill(), and registerleaves().

StringBasedNTupler
Definition: StringBasedNTupler.h:201
VariableNTupler::fill
void fill(edm::Event &iEvent) override
Definition: VariableNTupler.h:96
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
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
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
edm::ParameterSet
Definition: ParameterSet.h:47
iEvent
int iEvent
Definition: GenABIO.cc:224
VariableNTupler
Definition: VariableNTupler.h:21
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::ParameterSet::empty
bool empty() const
Definition: ParameterSet.h:201