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 47 of file StringBasedNTupler.h.

Member Typedef Documentation

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

Definition at line 74 of file StringBasedNTupler.h.

Constructor & Destructor Documentation

TreeBranch::TreeBranch ( )
inline

Definition at line 49 of file StringBasedNTupler.h.

Referenced by StringBasedNTupler::StringBasedNTupler().

49 : class_(""), expr_(""), order_(""), selection_(""), maxIndexName_(""), branchAlias_("") {}
std::string order_
std::string maxIndexName_
std::string branchAlias_
std::string expr_
std::string selection_
std::string class_
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 50 of file StringBasedNTupler.h.

References branchAlias_, branchTitle_, and edm::InputTag::encode().

52  : class_(C), src_(S), expr_(E), order_(O), selection_(SE), maxIndexName_(Mi), branchAlias_(Ba) {
53  branchTitle_ = E + " calculated on " + C + " object from " + S.encode();
54  if (!O.empty())
55  branchTitle_ += " ordered according to " + O;
56  if (!SE.empty())
57  branchTitle_ += " selecting on " + SE;
58  edm::LogInfo("TreeBranch") << "the branch with alias: " << branchAlias_ << " corresponds to: " << branchTitle_;
59  }
std::string order_
std::string branchTitle_
std::string maxIndexName_
std::string encode() const
Definition: InputTag.cc:159
std::string branchAlias_
std::string expr_
edm::InputTag src_
std::string selection_
std::string class_

Member Function Documentation

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

Definition at line 79 of file StringBasedNTupler.h.

References data, and dataHolderPtr_.

Referenced by StringBasedNTupler::fill().

79 { dataHolderPtr_ = data; }
std::vector< float > * dataHolderPtr_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
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_.

Referenced by StringBasedNTupler::fill().

42  {
70  else {
71  edm::LogError("TreeBranch") << branchName() << " failed to recognized class type: " << class_;
72  return TreeBranch::value(new std::vector<float>());
73  }
74 }
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)
Jets made from CaloTowers.
Definition: BasicJet.h:19
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
Analysis-level HLTrigger path class.
Definition: TriggerPath.h:36
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:40
#define ANOTHER_VECTOR_CLASS(C)
std::string class_
Analysis-level muon class.
Definition: Muon.h:51
const std::string& TreeBranch::branchAlias ( ) const
inline

Definition at line 72 of file StringBasedNTupler.h.

References branchAlias_.

Referenced by StringBasedNTupler::registerleaves(), and StringBasedNTupler::StringBasedNTupler().

72 { return branchAlias_; }
std::string branchAlias_
const std::string TreeBranch::branchName ( ) const
inline
const std::string& TreeBranch::branchTitle ( ) const
inline

Definition at line 73 of file StringBasedNTupler.h.

References branchTitle_.

Referenced by StringBasedNTupler::registerleaves().

73 { return branchTitle_; }
std::string branchTitle_
const std::string& TreeBranch::className ( ) const
inline
std::vector<float>* TreeBranch::dataHolderPtr ( )
inline

Definition at line 78 of file StringBasedNTupler.h.

References dataHolderPtr_.

Referenced by StringBasedNTupler::callBack().

78 { return dataHolderPtr_; }
std::vector< float > * dataHolderPtr_
std::vector<float>** TreeBranch::dataHolderPtrAdress ( )
inline

Definition at line 77 of file StringBasedNTupler.h.

References dataHolderPtr_.

77 { return &dataHolderPtr_; }
std::vector< float > * dataHolderPtr_
const std::string& TreeBranch::expr ( ) const
inline
const std::string& TreeBranch::maxIndexName ( ) const
inline

Definition at line 66 of file StringBasedNTupler.h.

References maxIndexName_.

66 { return maxIndexName_; }
std::string maxIndexName_
const std::string& TreeBranch::order ( ) const
inline
const std::string& TreeBranch::selection ( ) const
inline
const edm::InputTag& TreeBranch::src ( ) const
inline

Member Data Documentation

std::string TreeBranch::branchAlias_
private

Definition at line 88 of file StringBasedNTupler.h.

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

std::string TreeBranch::branchTitle_
private

Definition at line 89 of file StringBasedNTupler.h.

Referenced by branchTitle(), and TreeBranch().

std::string TreeBranch::class_
private

Definition at line 82 of file StringBasedNTupler.h.

Referenced by branch(), and className().

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

Definition at line 91 of file StringBasedNTupler.h.

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

std::string TreeBranch::expr_
private

Definition at line 84 of file StringBasedNTupler.h.

Referenced by expr().

std::string TreeBranch::maxIndexName_
private

Definition at line 87 of file StringBasedNTupler.h.

Referenced by maxIndexName().

std::string TreeBranch::order_
private

Definition at line 85 of file StringBasedNTupler.h.

Referenced by order().

std::string TreeBranch::selection_
private

Definition at line 86 of file StringBasedNTupler.h.

Referenced by selection().

edm::InputTag TreeBranch::src_
private

Definition at line 83 of file StringBasedNTupler.h.

Referenced by src().