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

Member Typedef Documentation

◆ value

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

Definition at line 66 of file StringBasedNTupler.h.

Constructor & Destructor Documentation

◆ TreeBranch() [1/2]

TreeBranch::TreeBranch ( )
inline

Definition at line 41 of file StringBasedNTupler.h.

41 : 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() [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 42 of file StringBasedNTupler.h.

References branchAlias_, branchTitle_, and correctionTermsCaloMet_cff::C.

44  : class_(C), src_(S), expr_(E), order_(O), selection_(SE), maxIndexName_(Mi), branchAlias_(Ba) {
45  branchTitle_ = E + " calculated on " + C + " object from " + S.encode();
46  if (!O.empty())
47  branchTitle_ += " ordered according to " + O;
48  if (!SE.empty())
49  branchTitle_ += " selecting on " + SE;
50  edm::LogInfo("TreeBranch") << "the branch with alias: " << branchAlias_ << " corresponds to: " << branchTitle_;
51  }
std::string order_
std::string branchTitle_
std::string maxIndexName_
std::string branchAlias_
std::string expr_
edm::InputTag src_
Log< level::Info, false > LogInfo
std::string selection_
std::string class_

Member Function Documentation

◆ assignDataHolderPtr()

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

Definition at line 71 of file StringBasedNTupler.h.

References data, and dataHolderPtr_.

71 { dataHolderPtr_ = data; }
std::vector< float > * dataHolderPtr_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ branch()

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_.

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) ...
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

◆ branchAlias()

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

Definition at line 64 of file StringBasedNTupler.h.

References branchAlias_.

64 { return branchAlias_; }
std::string branchAlias_

◆ branchName()

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

◆ branchTitle()

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

Definition at line 65 of file StringBasedNTupler.h.

References branchTitle_.

65 { return branchTitle_; }
std::string branchTitle_

◆ className()

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

Definition at line 53 of file StringBasedNTupler.h.

References class_.

53 { return class_; }
std::string class_

◆ dataHolderPtr()

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

Definition at line 70 of file StringBasedNTupler.h.

References dataHolderPtr_.

70 { return dataHolderPtr_; }
std::vector< float > * dataHolderPtr_

◆ dataHolderPtrAdress()

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

Definition at line 69 of file StringBasedNTupler.h.

References dataHolderPtr_.

69 { return &dataHolderPtr_; }
std::vector< float > * dataHolderPtr_

◆ expr()

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

Definition at line 55 of file StringBasedNTupler.h.

References expr_.

55 { return expr_; }
std::string expr_

◆ maxIndexName()

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

Definition at line 58 of file StringBasedNTupler.h.

References maxIndexName_.

58 { return maxIndexName_; }
std::string maxIndexName_

◆ order()

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

Definition at line 56 of file StringBasedNTupler.h.

References order_.

56 { return order_; }
std::string order_

◆ selection()

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

Definition at line 57 of file StringBasedNTupler.h.

References selection_.

Referenced by trackingPlots.Iteration::modules().

57 { return selection_; }
std::string selection_

◆ src()

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

Definition at line 54 of file StringBasedNTupler.h.

References src_.

54 { return src_; }
edm::InputTag src_

Member Data Documentation

◆ branchAlias_

std::string TreeBranch::branchAlias_
private

Definition at line 80 of file StringBasedNTupler.h.

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

◆ branchTitle_

std::string TreeBranch::branchTitle_
private

Definition at line 81 of file StringBasedNTupler.h.

Referenced by branchTitle(), and TreeBranch().

◆ class_

std::string TreeBranch::class_
private

Definition at line 74 of file StringBasedNTupler.h.

Referenced by branch(), and className().

◆ dataHolderPtr_

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

Definition at line 83 of file StringBasedNTupler.h.

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

◆ expr_

std::string TreeBranch::expr_
private

Definition at line 76 of file StringBasedNTupler.h.

Referenced by expr().

◆ maxIndexName_

std::string TreeBranch::maxIndexName_
private

Definition at line 79 of file StringBasedNTupler.h.

Referenced by maxIndexName().

◆ order_

std::string TreeBranch::order_
private

Definition at line 77 of file StringBasedNTupler.h.

Referenced by order().

◆ selection_

std::string TreeBranch::selection_
private

Definition at line 78 of file StringBasedNTupler.h.

Referenced by selection().

◆ src_

edm::InputTag TreeBranch::src_
private

Definition at line 75 of file StringBasedNTupler.h.

Referenced by src().