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 dataset::name.

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

42  {
43  if ( cand.hasUserData( name ) ) 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:280
bool hasUserData(const std::string &key) const
Check if user data with a specific type is present.
Definition: PATObject.h:286
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(), dataset::name, and pat::PATObject< ObjectType >::userData().

Referenced by BPHDaughterSelect::accept(), and BPHHistoSpecificDecay::analyze().

48  {
49  if ( cand.hasUserData( name ) ) {
50  typedef edm::Ref< std::vector<T> > objRef;
51  const objRef* ref = cand.userData<objRef>( name );
52  if ( ref == nullptr ) return nullptr;
53  if ( ref->isNull() ) return nullptr;
54  return ref->get();
55  }
56  return nullptr;
57  }
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:280
bool hasUserData(const std::string &key) const
Check if user data with a specific type is present.
Definition: PATObject.h:286