CMS 3D CMS Logo

StringBasedNTupler.cc
Go to the documentation of this file.
2 
11 
18 
21 
26 
28 
31 
32 #include <memory>
33 
34 //--------------------------------------------------------------------------------
35 //just define here a list of objects you would like to be able to have a branch of
36 //--------------------------------------------------------------------------------
37 #define ANOTHER_VECTOR_CLASS(C) \
38  if (class_ == #C) \
39  return StringBranchHelper<C>(*this, iEvent)()
40 #define ANOTHER_CLASS(C) \
41  if (class_ == #C) \
42  return StringLeaveHelper<C>(*this, iEvent)()
43 
72  else {
73  edm::LogError("TreeBranch") << branchName() << " failed to recognized class type: " << class_;
74  return std::make_unique<std::vector<float>>();
75  }
76 }
77 #undef ANOTHER_CLASS
Analysis-level MET class.
Definition: MET.h:40
Analysis-level Photon class.
Definition: Photon.h:46
Jets made from CaloTowers.
Definition: CaloJet.h:27
const std::string branchName() const
#define ANOTHER_CLASS(C)
value branch(const edm::Event &iEvent)
Log< level::Error, false > LogError
Jets made from CaloTowers.
Definition: BasicJet.h:19
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
int iEvent
Definition: GenABIO.cc:224
Definition: MET.h:41
Jets made from MC generator particles.
Definition: GenJet.h:23
std::unique_ptr< std::vector< float > > value
Analysis-level tau class.
Definition: Tau.h:53
Analysis-level electron class.
Definition: Electron.h:51
Analysis-level calorimeter jet class.
Definition: Jet.h:77
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
#define ANOTHER_VECTOR_CLASS(C)
std::string class_
Analysis-level muon class.
Definition: Muon.h:51