CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( const edm::ParameterSet iConfig)
inline

Definition at line 10 of file CompleteNTupler.h.

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

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  }
bool empty() const
Definition: ParameterSet.h:201
StringBasedNTupler * sN
bool exists(std::string const &parameterName) const
checks if a parameter exists
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
VariableNTupler * vN

Member Function Documentation

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

Implements NTupler.

Definition at line 38 of file CompleteNTupler.h.

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

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  }
void fill(edm::Event &iEvent) override
StringBasedNTupler * sN
VariableNTupler * vN
void fill(edm::Event &iEvent) override
uint CompleteNTupler::registerleaves ( edm::ProducesCollector  producesCollector)
inlineoverridevirtual

Implements NTupler.

Definition at line 29 of file CompleteNTupler.h.

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

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  }
StringBasedNTupler * sN
uint registerleaves(edm::ProducesCollector producesCollector) override
uint registerleaves(edm::ProducesCollector producesCollector) override
VariableNTupler * vN

Member Data Documentation

StringBasedNTupler* CompleteNTupler::sN
private

Definition at line 53 of file CompleteNTupler.h.

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

VariableNTupler* CompleteNTupler::vN
private

Definition at line 54 of file CompleteNTupler.h.

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