CMS 3D CMS Logo

CompleteNTupler.h
Go to the documentation of this file.
3 
6 //#include "PhysicsTools/UtilAlgos/interface/AdHocNTupler.h"
7 
8 class CompleteNTupler : public NTupler {
9 public:
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:
55  // AdHocNTupler * aN;
56 };
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
CompleteNTupler(const edm::ParameterSet &iConfig)
void fill(edm::Event &iEvent) override
StringBasedNTupler * sN
bool exists(std::string const &parameterName) const
checks if a parameter exists
int iEvent
Definition: GenABIO.cc:224
bool empty() const
Definition: ParameterSet.h:202
uint registerleaves(edm::ProducesCollector producesCollector) override
uint registerleaves(edm::ProducesCollector producesCollector) override
uint registerleaves(edm::ProducesCollector producesCollector) override
VariableNTupler * vN
void fill(edm::Event &iEvent) override
void fill(edm::Event &iEvent) override