#include <Handle.h>
Public Types | |
typedef edm::Wrapper< T > | TempWrapT |
Public Member Functions | |
bool | failedToGet () const |
Returns true only if Handle was used in a 'get' call and the data could not be found. | |
const std::string | getBranchNameFor (const fwlite::EventBase &iEvent, const char *iModuleLabel, const char *iProductInstanceLabel=0, const char *iProcessLabel=0) |
template<class P > | |
void | getByLabel (const P &iP, const char *iModuleLabel, const char *iProductInstanceLabel=0, const char *iProcessLabel=0) |
Handle () | |
Handle (const Handle< T > &iOther) | |
bool | isValid () const |
const T & | operator* () const |
const T * | operator-> () const |
const Handle< T > & | operator= (const Handle< T > &iOther) |
T const * | product () const |
const T * | ptr () const |
const T & | ref () const |
void | swap (Handle< T > &iOther) |
~Handle () | |
Private Member Functions | |
void | check () const |
Private Attributes | |
const T * | data_ |
ErrorThrower * | errorThrower_ |
typedef edm::Wrapper<T> fwlite::Handle< T >::TempWrapT |
fwlite::Handle< T >::Handle | ( | ) | [inline] |
Definition at line 51 of file Handle.h.
: data_(0), errorThrower_(ErrorThrower::unsetErrorThrower()) {}
fwlite::Handle< T >::~Handle | ( | ) | [inline] |
Definition at line 52 of file Handle.h.
{ delete errorThrower_;}
fwlite::Handle< T >::Handle | ( | const Handle< T > & | iOther | ) | [inline] |
Definition at line 54 of file Handle.h.
: data_(iOther.data_), errorThrower_( iOther.errorThrower_? iOther.errorThrower_->clone(): 0) {}
void fwlite::Handle< T >::check | ( | ) | const [inline, private] |
Definition at line 264 of file Handle.h.
Referenced by fwlite::Handle< Collection >::operator*(), fwlite::Handle< Collection >::operator->(), fwlite::Handle< Collection >::product(), fwlite::Handle< Collection >::ptr(), and fwlite::Handle< Collection >::ref().
{ if(errorThrower_) { errorThrower_->throwIt();} }
bool fwlite::Handle< T >::failedToGet | ( | ) | const [inline] |
Returns true only if Handle was used in a 'get' call and the data could not be found.
Definition at line 67 of file Handle.h.
Referenced by fwlite::Scanner< Collection >::fillDataSet(), and fwlite::Scanner< Collection >::scan().
{return errorThrower_ != 0; }
const std::string fwlite::Handle< T >::getBranchNameFor | ( | const fwlite::EventBase & | iEvent, |
const char * | iModuleLabel, | ||
const char * | iProductInstanceLabel = 0 , |
||
const char * | iProcessLabel = 0 |
||
) | [inline] |
Definition at line 212 of file Handle.h.
{ return iEvent.getBranchNameFor(TempWrapT::typeInfo(), iModuleLabel, iProductInstanceLabel, iProcessLabel); }
void fwlite::Handle< T >::getByLabel | ( | const P & | iP, |
const char * | iModuleLabel, | ||
const char * | iProductInstanceLabel = 0 , |
||
const char * | iProcessLabel = 0 |
||
) | [inline] |
Definition at line 94 of file Handle.h.
Referenced by fwlite::ObjectCountSelector< Collection >::accept(), calcSampleName(), fwlite::Scanner< Collection >::count(), fwlite::Scanner< Collection >::draw(), fwlite::Scanner< Collection >::draw2D(), fwlite::Scanner< Collection >::drawGraph(), fwlite::Scanner< Collection >::drawProf(), FWHLTTriggerTableView::fillAverageAcceptFractions(), fwlite::Scanner< Collection >::fillDataSet(), FWHLTTriggerTableView::fillTable(), FWL1TriggerTableView::fillTable(), FWFileEntry::filterEventsWithCustomParser(), main(), fwlite::Scanner< Collection >::scan(), fwlite::MultiChainEvent::triggerResultsByName(), and fwlite::Event::triggerResultsByName().
{ TempWrapT* temp; void* pTemp = &temp; iP.getByLabel(TempWrapT::typeInfo(), iModuleLabel, iProductInstanceLabel, iProcessLabel, pTemp); delete errorThrower_; errorThrower_ = 0; if(0==temp) { errorThrower_=ErrorThrower::errorThrowerBranchNotFoundException(TempWrapT::typeInfo(), iModuleLabel, iProductInstanceLabel, iProcessLabel); return; } data_ = temp->product(); if(data_==0) { errorThrower_=ErrorThrower::errorThrowerProductNotFoundException(TempWrapT::typeInfo(), iModuleLabel, iProductInstanceLabel, iProcessLabel); } }
bool fwlite::Handle< T >::isValid | ( | void | ) | const [inline] |
Definition at line 64 of file Handle.h.
Referenced by calcSampleName(), FWL1TriggerTableView::fillTable(), main(), fwlite::MultiChainEvent::triggerResultsByName(), and fwlite::Event::triggerResultsByName().
{ return data_ != 0; }
const T& fwlite::Handle< T >::operator* | ( | ) | const [inline] |
const T* fwlite::Handle< T >::operator-> | ( | ) | const [inline] |
T const* fwlite::Handle< T >::product | ( | ) | const [inline] |
Definition at line 69 of file Handle.h.
Referenced by fwlite::MultiChainEvent::triggerResultsByName(), and fwlite::Event::triggerResultsByName().
const T* fwlite::Handle< T >::ptr | ( | ) | const [inline] |
const T& fwlite::Handle< T >::ref | ( | ) | const [inline] |
void fwlite::Handle< T >::swap | ( | Handle< T > & | iOther | ) | [inline] |
Definition at line 255 of file Handle.h.
Referenced by fwlite::Handle< Collection >::operator=().
{ const T* temp = data_; data_ = iOther.data_; iOther.data_ = temp; ErrorThrower* tempE = errorThrower_; errorThrower_ = iOther.errorThrower_; iOther.errorThrower_ = tempE; }
const T* fwlite::Handle< T >::data_ [private] |
Definition at line 268 of file Handle.h.
Referenced by fwlite::Handle< Collection >::getByLabel(), fwlite::Handle< Collection >::isValid(), fwlite::Handle< Collection >::operator*(), fwlite::Handle< Collection >::operator->(), fwlite::Handle< Collection >::product(), fwlite::Handle< Collection >::ptr(), fwlite::Handle< Collection >::ref(), and fwlite::Handle< Collection >::swap().
ErrorThrower* fwlite::Handle< T >::errorThrower_ [private] |
Definition at line 269 of file Handle.h.
Referenced by fwlite::Handle< Collection >::check(), fwlite::Handle< Collection >::failedToGet(), fwlite::Handle< Collection >::getByLabel(), fwlite::Handle< Collection >::swap(), and fwlite::Handle< Collection >::~Handle().