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
GenEventInfoProduct
Definition: GenEventInfoProduct.h:17
HcalNoiseSummary
Definition: HcalNoiseSummary.h:31
reco::CaloJet
Jets made from CaloTowers.
Definition: CaloJet.h:27
HcalNoiseSummary.h
CaloJet.h
HcalNoiseRBX.h
reco::GenJet
Jets made from MC generator particles.
Definition: GenJet.h:23
StringBasedNTupler.h
reco::GenParticle
Definition: GenParticle.h:21
TreeBranch::class_
std::string class_
Definition: StringBasedNTupler.h:77
Muon.h
pat::Tau
Analysis-level tau class.
Definition: Tau.h:53
Photon.h
pat::Photon
Analysis-level Photon class.
Definition: Photon.h:46
GenericParticle.h
ANOTHER_CLASS
#define ANOTHER_CLASS(C)
Definition: StringBasedNTupler.cc:40
TreeBranch::value
std::unique_ptr< std::vector< float > > value
Definition: StringBasedNTupler.h:69
pat::Muon
Analysis-level muon class.
Definition: Muon.h:51
Tau.h
reco::Muon
Definition: Muon.h:27
GenParticle.h
reco::BasicJet
Jets made from CaloTowers.
Definition: BasicJet.h:19
reco::MET
Definition: MET.h:41
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
BeamSpot.h
reco::CaloCluster
Definition: CaloCluster.h:31
reco::BeamSpot
Definition: BeamSpot.h:21
reco::Track
Definition: Track.h:27
reco::GsfElectron
Definition: GsfElectron.h:35
pat::Hemisphere
Definition: Hemisphere.h:17
pat::GenericParticle
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed)
Definition: GenericParticle.h:38
GenEventInfoProduct.h
pat::TriggerPath
Analysis-level HLTrigger path class.
Definition: TriggerPath.h:36
l1extra::L1ParticleMap
Definition: L1ParticleMap.h:117
iEvent
int iEvent
Definition: GenABIO.cc:224
pat::MET
Analysis-level MET class.
Definition: MET.h:40
L1ParticleMap.h
PFParticle.h
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
MET.h
Jet.h
MET.h
TreeBranch::branchName
const std::string branchName() const
Definition: StringBasedNTupler.h:62
ANOTHER_VECTOR_CLASS
#define ANOTHER_VECTOR_CLASS(C)
Definition: StringBasedNTupler.cc:37
SimTrack
Definition: SimTrack.h:6
reco::HcalNoiseRBX
Definition: HcalNoiseRBX.h:32
BasicJet.h
Electron.h
Hemisphere.h
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
GenJet.h
pat::Electron
Analysis-level electron class.
Definition: Electron.h:51
edm::HepMCProduct
Definition: HepMCProduct.h:18
SimTrack.h
HepMCProduct.h
TreeBranch::branch
value branch(const edm::Event &iEvent)
Definition: StringBasedNTupler.cc:44
edm::Event
Definition: Event.h:73
reco::Vertex
Definition: Vertex.h:35
CaloCluster.h
TriggerPath.h