test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
pat::eventhypothesis::DynCastCandPtr< T > Class Template Reference

#include <EventHypothesisLooper.h>

Public Member Functions

void clearCache ()
 
const Tget (const reco::Candidate *ptr)
 
bool typeOk (const reco::Candidate *ptr)
 

Private Member Functions

void doPtr (const reco::Candidate *ptr)
 

Private Attributes

const TcachePtr_
 
bool isPtrCached_
 

Detailed Description

template<typename T>
class pat::eventhypothesis::DynCastCandPtr< T >

Definition at line 9 of file EventHypothesisLooper.h.

Member Function Documentation

template<typename T >
void pat::eventhypothesis::DynCastCandPtr< T >::clearCache ( )
inline
template<typename T >
void pat::eventhypothesis::DynCastCandPtr< T >::doPtr ( const reco::Candidate ptr)
private

Definition at line 20 of file EventHypothesisLooper.h.

Referenced by pat::eventhypothesis::DynCastCandPtr< T >::typeOk().

20  {
21  if (!isPtrCached_) {
22  cachePtr_ = dynamic_cast<const T *>(ptr);
23  isPtrCached_ = true;
24  }
25  }
long double T
template<typename T >
const T * pat::eventhypothesis::DynCastCandPtr< T >::get ( const reco::Candidate ptr)

Definition at line 27 of file EventHypothesisLooper.h.

References Exception, and mergeVDriftHistosByStation::name.

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

27  {
28  doPtr(ptr);
29  if ((ptr != 0) && (cachePtr_ == 0)) throw cms::Exception("Type Checking") <<
30  "You can't convert a " << typeid(*ptr).name() << " to a " << typeid(T).name() << "\n" <<
31  "note: you can use c++filt command to convert the above in human readable types.\n";
32  return cachePtr_;
33  }
void doPtr(const reco::Candidate *ptr)
long double T
template<typename T >
bool pat::eventhypothesis::DynCastCandPtr< T >::typeOk ( const reco::Candidate ptr)
inline

Member Data Documentation

template<typename T >
const T* pat::eventhypothesis::DynCastCandPtr< T >::cachePtr_
private
template<typename T >
bool pat::eventhypothesis::DynCastCandPtr< T >::isPtrCached_
private