CMS 3D CMS Logo

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 11 of file EventHypothesisLooper.h.

Member Function Documentation

◆ clearCache()

template<typename T>
void pat::eventhypothesis::DynCastCandPtr< T >::clearCache ( )
inline

Definition at line 14 of file EventHypothesisLooper.h.

14 { isPtrCached_ = false; }

References pat::eventhypothesis::DynCastCandPtr< T >::isPtrCached_.

◆ doPtr()

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

Definition at line 26 of file EventHypothesisLooper.h.

26  {
27  if (!isPtrCached_) {
28  cachePtr_ = dynamic_cast<const T *>(ptr);
29  isPtrCached_ = true;
30  }
31  }

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

◆ get()

template<typename T >
const T * pat::eventhypothesis::DynCastCandPtr< T >::get ( const reco::Candidate ptr)

◆ typeOk()

template<typename T>
bool pat::eventhypothesis::DynCastCandPtr< T >::typeOk ( const reco::Candidate ptr)
inline

Definition at line 15 of file EventHypothesisLooper.h.

15  {
16  doPtr(ptr);
17  return cachePtr_ != 0;
18  }

References pat::eventhypothesis::DynCastCandPtr< T >::cachePtr_, and pat::eventhypothesis::DynCastCandPtr< T >::doPtr().

Member Data Documentation

◆ cachePtr_

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

◆ isPtrCached_

template<typename T>
bool pat::eventhypothesis::DynCastCandPtr< T >::isPtrCached_
private
pat::eventhypothesis::DynCastCandPtr::isPtrCached_
bool isPtrCached_
Definition: EventHypothesisLooper.h:22
pat::eventhypothesis::DynCastCandPtr::cachePtr_
const T * cachePtr_
Definition: EventHypothesisLooper.h:23
pat::eventhypothesis::DynCastCandPtr::doPtr
void doPtr(const reco::Candidate *ptr)
Definition: EventHypothesisLooper.h:26
T
long double T
Definition: Basic3DVectorLD.h:48
Exception
Definition: hltDiff.cc:245
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17