CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Static Public Member Functions
BPHUserData Class Reference

Static Public Member Functions

template<class T >
static const Tget (const pat::CompositeCandidate &cand, const string &name)
 
static float get (const pat::CompositeCandidate &cand, const string &name, float d=0.0)
 
template<class T >
static const TgetByRef (const pat::CompositeCandidate &cand, const string &name)
 

Detailed Description

Definition at line 95 of file BPHHistoSpecificDecay.cc.

Member Function Documentation

◆ get() [1/2]

template<class T >
static const T* BPHUserData::get ( const pat::CompositeCandidate cand,
const string &  name 
)
inlinestatic

◆ get() [2/2]

static float BPHUserData::get ( const pat::CompositeCandidate cand,
const string &  name,
float  d = 0.0 
)
inlinestatic

◆ getByRef()

template<class T >
static const T* BPHUserData::getByRef ( const pat::CompositeCandidate cand,
const string &  name 
)
inlinestatic

Definition at line 109 of file BPHHistoSpecificDecay.cc.

109  {
110  if (cand.hasUserData(name)) {
111  typedef edm::Ref<std::vector<T>> objRef;
112  const objRef* ref = cand.userData<objRef>(name);
113  if (ref == nullptr)
114  return nullptr;
115  if (ref->isNull())
116  return nullptr;
117  return ref->get();
118  }
119  return nullptr;
120  }

References Skims_PA_cff::name.

edm::Ref
Definition: AssociativeIterator.h:58
cand
Definition: decayParser.h:34
T
long double T
Definition: Basic3DVectorLD.h:48
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
ztail.d
d
Definition: ztail.py:151