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)
 
template<class T >
static const TgetByRef (const pat::CompositeCandidate &cand, const string &name)
 

Detailed Description

Definition at line 38 of file BPHHistoSpecificDecay.cc.

Member Function Documentation

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

Definition at line 41 of file BPHHistoSpecificDecay.cc.

References Skims_PA_cff::name.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().

41  {
42  if (cand.hasUserData(name))
43  return cand.userData<T>(name);
44  return nullptr;
45  }
const T * userData(const std::string &key) const
Returns user-defined data. Returns NULL if the data is not present, or not of type T...
Definition: PATObject.h:327
bool hasUserData(const std::string &key) const
Check if user data with a specific type is present.
Definition: PATObject.h:332
long double T
template<class T >
static const T* BPHUserData::getByRef ( const pat::CompositeCandidate cand,
const string &  name 
)
inlinestatic

Definition at line 47 of file BPHHistoSpecificDecay.cc.

References pat::PATObject< ObjectType >::hasUserData(), Skims_PA_cff::name, and pat::PATObject< ObjectType >::userData().

47  {
48  if (cand.hasUserData(name)) {
49  typedef edm::Ref<std::vector<T> > objRef;
50  const objRef* ref = cand.userData<objRef>(name);
51  if (ref == nullptr)
52  return nullptr;
53  if (ref->isNull())
54  return nullptr;
55  return ref->get();
56  }
57  return nullptr;
58  }
const T * userData(const std::string &key) const
Returns user-defined data. Returns NULL if the data is not present, or not of type T...
Definition: PATObject.h:327
bool hasUserData(const std::string &key) const
Check if user data with a specific type is present.
Definition: PATObject.h:332