CMS 3D CMS Logo

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 92 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 106 of file BPHHistoSpecificDecay.cc.

References Skims_PA_cff::name.

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