CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 69 of file StringBasedNTupler.h.

Constructor & Destructor Documentation

TreeBranch::TreeBranch ( )
inline

Definition at line 44 of file StringBasedNTupler.h.

44 : 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 45 of file StringBasedNTupler.h.

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

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  }
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_
Log< level::Info, false > LogInfo
std::string selection_
std::string class_

Member Function Documentation

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

Definition at line 74 of file StringBasedNTupler.h.

References data, and dataHolderPtr_.

Referenced by StringBasedNTupler::fill().

74 { 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 44 of file StringBasedNTupler.cc.

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

Referenced by StringBasedNTupler::fill().

44  {
72  else {
73  edm::LogError("TreeBranch") << branchName() << " failed to recognized class type: " << class_;
74  return std::make_unique<std::vector<float>>();
75  }
76 }
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)
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) ...
Analysis-level HLTrigger path class.
Definition: TriggerPath.h:36
Definition: MET.h:41
Jets made from MC generator particles.
Definition: GenJet.h:23
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
const std::string& TreeBranch::branchAlias ( ) const
inline

Definition at line 67 of file StringBasedNTupler.h.

References branchAlias_.

Referenced by StringBasedNTupler::registerleaves().

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

Definition at line 68 of file StringBasedNTupler.h.

References branchTitle_.

Referenced by StringBasedNTupler::registerleaves().

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

Definition at line 73 of file StringBasedNTupler.h.

References dataHolderPtr_.

Referenced by StringBasedNTupler::callBack().

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

Definition at line 72 of file StringBasedNTupler.h.

References dataHolderPtr_.

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

Definition at line 61 of file StringBasedNTupler.h.

References maxIndexName_.

61 { return maxIndexName_; }
std::string maxIndexName_
const std::string& TreeBranch::order ( ) const
inline

Definition at line 59 of file StringBasedNTupler.h.

References order_.

Referenced by StringBranchHelper< Object, Collection >::StringBranchHelper().

59 { return order_; }
std::string order_
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 83 of file StringBasedNTupler.h.

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

std::string TreeBranch::branchTitle_
private

Definition at line 84 of file StringBasedNTupler.h.

Referenced by branchTitle(), and TreeBranch().

std::string TreeBranch::class_
private

Definition at line 77 of file StringBasedNTupler.h.

Referenced by branch(), and className().

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

Definition at line 86 of file StringBasedNTupler.h.

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

std::string TreeBranch::expr_
private

Definition at line 79 of file StringBasedNTupler.h.

Referenced by expr().

std::string TreeBranch::maxIndexName_
private

Definition at line 82 of file StringBasedNTupler.h.

Referenced by maxIndexName().

std::string TreeBranch::order_
private

Definition at line 80 of file StringBasedNTupler.h.

Referenced by order().

std::string TreeBranch::selection_
private

Definition at line 81 of file StringBasedNTupler.h.

Referenced by selection().

edm::InputTag TreeBranch::src_
private

Definition at line 78 of file StringBasedNTupler.h.

Referenced by src().