CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

pat::eventhypothesis::DynCastCandPtr< T > Class Template Reference

#include <EventHypothesisLooper.h>

List of all members.

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().

                                                              {
            if (!isPtrCached_) { 
                cachePtr_    = dynamic_cast<const T *>(ptr); 
                isPtrCached_ = true;
            }
        }
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.

                                                                 {
            doPtr(ptr);
            if ((ptr != 0) && (cachePtr_ == 0)) throw cms::Exception("Type Checking") <<
                "You can't convert a " << typeid(*ptr).name() << " to a " << typeid(T).name() << "\n" <<
                "note: you can use c++filt command to convert the above in human readable types.\n";
            return cachePtr_;
        }
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]