CMS 3D CMS Logo

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

#include <StringBasedNTupler.h>

Public Types

typedef std::unique_ptr< std::vector< float > > value
 

Public Member Functions

void assignDataHolderPtr (std::vector< float > *data)
 
value branch (const edm::Event &iEvent)
 
const std::string & branchAlias () const
 
const std::string branchName () const
 
const std::string & branchTitle () const
 
const std::string & className () const
 
std::vector< float > * dataHolderPtr ()
 
std::vector< float > ** dataHolderPtrAdress ()
 
const std::string & expr () const
 
const std::string & maxIndexName () const
 
const std::string & order () const
 
const std::string & selection () const
 
const edm::InputTagsrc () const
 
 TreeBranch ()
 
 TreeBranch (std::string C, edm::InputTag S, std::string E, std::string O, std::string SE, std::string Mi, std::string Ba)
 

Private Attributes

std::string branchAlias_
 
std::string branchTitle_
 
std::string class_
 
std::vector< float > * dataHolderPtr_
 
std::string expr_
 
std::string maxIndexName_
 
std::string order_
 
std::string selection_
 
edm::InputTag src_
 

Detailed Description

Definition at line 42 of file StringBasedNTupler.h.

Member Typedef Documentation

◆ value

typedef std::unique_ptr<std::vector<float> > TreeBranch::value

Definition at line 69 of file StringBasedNTupler.h.

Constructor & Destructor Documentation

◆ TreeBranch() [1/2]

TreeBranch::TreeBranch ( )
inline

Definition at line 44 of file StringBasedNTupler.h.

44 : class_(""), expr_(""), order_(""), selection_(""), maxIndexName_(""), branchAlias_("") {}

◆ TreeBranch() [2/2]

TreeBranch::TreeBranch ( std::string  C,
edm::InputTag  S,
std::string  E,
std::string  O,
std::string  SE,
std::string  Mi,
std::string  Ba 
)
inline

Definition at line 45 of file StringBasedNTupler.h.

47  : class_(C), src_(S), expr_(E), order_(O), selection_(SE), maxIndexName_(Mi), branchAlias_(Ba) {
48  branchTitle_ = E + " calculated on " + C + " object from " + S.encode();
49  if (!O.empty())
50  branchTitle_ += " ordered according to " + O;
51  if (!SE.empty())
52  branchTitle_ += " selecting on " + SE;
53  edm::LogInfo("TreeBranch") << "the branch with alias: " << branchAlias_ << " corresponds to: " << branchTitle_;
54  }

References branchAlias_, branchTitle_, and gen::C.

Member Function Documentation

◆ assignDataHolderPtr()

void TreeBranch::assignDataHolderPtr ( std::vector< float > *  data)
inline

Definition at line 74 of file StringBasedNTupler.h.

74 { dataHolderPtr_ = data; }

References data, and dataHolderPtr_.

◆ branch()

TreeBranch::value TreeBranch::branch ( const edm::Event iEvent)

Definition at line 42 of file StringBasedNTupler.cc.

References ANOTHER_CLASS, ANOTHER_VECTOR_CLASS, branchName(), and class_.

◆ branchAlias()

const std::string& TreeBranch::branchAlias ( ) const
inline

Definition at line 67 of file StringBasedNTupler.h.

67 { return branchAlias_; }

References branchAlias_.

◆ branchName()

const std::string TreeBranch::branchName ( ) const
inline

Definition at line 62 of file StringBasedNTupler.h.

62  {
64  std::replace(name.begin(), name.end(), '_', '0');
65  return std::string(name);
66  }

References branchAlias_, Skims_PA_cff::name, python.rootplot.root2matplotlib::replace(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by branch().

◆ branchTitle()

const std::string& TreeBranch::branchTitle ( ) const
inline

Definition at line 68 of file StringBasedNTupler.h.

68 { return branchTitle_; }

References branchTitle_.

◆ className()

const std::string& TreeBranch::className ( ) const
inline

Definition at line 56 of file StringBasedNTupler.h.

56 { return class_; }

References class_.

◆ dataHolderPtr()

std::vector<float>* TreeBranch::dataHolderPtr ( )
inline

Definition at line 73 of file StringBasedNTupler.h.

73 { return dataHolderPtr_; }

References dataHolderPtr_.

◆ dataHolderPtrAdress()

std::vector<float>** TreeBranch::dataHolderPtrAdress ( )
inline

Definition at line 72 of file StringBasedNTupler.h.

72 { return &dataHolderPtr_; }

References dataHolderPtr_.

◆ expr()

const std::string& TreeBranch::expr ( ) const
inline

Definition at line 58 of file StringBasedNTupler.h.

58 { return expr_; }

References expr_.

◆ maxIndexName()

const std::string& TreeBranch::maxIndexName ( ) const
inline

Definition at line 61 of file StringBasedNTupler.h.

61 { return maxIndexName_; }

References maxIndexName_.

◆ order()

const std::string& TreeBranch::order ( ) const
inline

Definition at line 59 of file StringBasedNTupler.h.

59 { return order_; }

References order_.

◆ selection()

const std::string& TreeBranch::selection ( ) const
inline

Definition at line 60 of file StringBasedNTupler.h.

60 { return selection_; }

References selection_.

Referenced by trackingPlots.Iteration::modules().

◆ src()

const edm::InputTag& TreeBranch::src ( ) const
inline

Definition at line 57 of file StringBasedNTupler.h.

57 { return src_; }

References src_.

Member Data Documentation

◆ branchAlias_

std::string TreeBranch::branchAlias_
private

Definition at line 83 of file StringBasedNTupler.h.

Referenced by branchAlias(), branchName(), and TreeBranch().

◆ branchTitle_

std::string TreeBranch::branchTitle_
private

Definition at line 84 of file StringBasedNTupler.h.

Referenced by branchTitle(), and TreeBranch().

◆ class_

std::string TreeBranch::class_
private

Definition at line 77 of file StringBasedNTupler.h.

Referenced by branch(), and className().

◆ dataHolderPtr_

std::vector<float>* TreeBranch::dataHolderPtr_
private

Definition at line 86 of file StringBasedNTupler.h.

Referenced by assignDataHolderPtr(), dataHolderPtr(), and dataHolderPtrAdress().

◆ expr_

std::string TreeBranch::expr_
private

Definition at line 79 of file StringBasedNTupler.h.

Referenced by expr().

◆ maxIndexName_

std::string TreeBranch::maxIndexName_
private

Definition at line 82 of file StringBasedNTupler.h.

Referenced by maxIndexName().

◆ order_

std::string TreeBranch::order_
private

Definition at line 80 of file StringBasedNTupler.h.

Referenced by order().

◆ selection_

std::string TreeBranch::selection_
private

Definition at line 81 of file StringBasedNTupler.h.

Referenced by selection().

◆ src_

edm::InputTag TreeBranch::src_
private

Definition at line 78 of file StringBasedNTupler.h.

Referenced by src().

GenEventInfoProduct
Definition: GenEventInfoProduct.h:17
HcalNoiseSummary
Definition: HcalNoiseSummary.h:31
reco::CaloJet
Jets made from CaloTowers.
Definition: CaloJet.h:27
reco::GenJet
Jets made from MC generator particles.
Definition: GenJet.h:23
reco::GenParticle
Definition: GenParticle.h:21
TreeBranch::selection_
std::string selection_
Definition: StringBasedNTupler.h:81
TreeBranch::class_
std::string class_
Definition: StringBasedNTupler.h:77
pat::Tau
Analysis-level tau class.
Definition: Tau.h:53
pat::Photon
Analysis-level Photon class.
Definition: Photon.h:46
edm::LogInfo
Definition: MessageLogger.h:254
TreeBranch::branchAlias_
std::string branchAlias_
Definition: StringBasedNTupler.h:83
ANOTHER_CLASS
#define ANOTHER_CLASS(C)
Definition: StringBasedNTupler.cc:38
TreeBranch::value
std::unique_ptr< std::vector< float > > value
Definition: StringBasedNTupler.h:69
TreeBranch::expr_
std::string expr_
Definition: StringBasedNTupler.h:79
pat::Muon
Analysis-level muon class.
Definition: Muon.h:51
reco::Muon
Definition: Muon.h:27
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
reco::CaloCluster
Definition: CaloCluster.h:31
reco::BeamSpot
Definition: BeamSpot.h:21
reco::Track
Definition: Track.h:27
TreeBranch::order_
std::string order_
Definition: StringBasedNTupler.h:80
reco::GsfElectron
Definition: GsfElectron.h:35
pat::Hemisphere
Definition: Hemisphere.h:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TreeBranch::branchTitle_
std::string branchTitle_
Definition: StringBasedNTupler.h:84
TreeBranch::maxIndexName_
std::string maxIndexName_
Definition: StringBasedNTupler.h:82
pat::GenericParticle
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed)
Definition: GenericParticle.h:38
edm::LogError
Definition: MessageLogger.h:183
pat::TriggerPath
Analysis-level HLTrigger path class.
Definition: TriggerPath.h:36
l1extra::L1ParticleMap
Definition: L1ParticleMap.h:117
pat::MET
Analysis-level MET class.
Definition: MET.h:40
TreeBranch::branchName
const std::string branchName() const
Definition: StringBasedNTupler.h:62
ANOTHER_VECTOR_CLASS
#define ANOTHER_VECTOR_CLASS(C)
Definition: StringBasedNTupler.cc:35
gen::C
C
Definition: PomwigHadronizer.cc:76
SimTrack
Definition: SimTrack.h:6
reco::HcalNoiseRBX
Definition: HcalNoiseRBX.h:32
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
S
Definition: CSCDBL1TPParametersExtended.h:16
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
pat::Electron
Analysis-level electron class.
Definition: Electron.h:51
edm::HepMCProduct
Definition: HepMCProduct.h:18
reco::Vertex
Definition: Vertex.h:35
TreeBranch::dataHolderPtr_
std::vector< float > * dataHolderPtr_
Definition: StringBasedNTupler.h:86
TreeBranch::src_
edm::InputTag src_
Definition: StringBasedNTupler.h:78
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444