#include <PhysicsTools/UtilAlgos/interface/CachingVariable.h>
Public Member Functions | |
CachingVariable::evalType | eval (const edm::Event &iEvent) const |
SimpleValueVariable (CachingVariableFactoryArg arg) | |
Private Attributes | |
edm::InputTag | src_ |
Definition at line 505 of file CachingVariable.h.
SimpleValueVariable< TYPE >::SimpleValueVariable | ( | CachingVariableFactoryArg | arg | ) | [inline] |
Definition at line 507 of file CachingVariable.h.
References CachingVariable::CachingVariableFactoryArg::m, and CachingVariable::CachingVariableFactoryArg::n.
00507 : 00508 CachingVariable("SimpleValueVariable",arg.n,arg.iConfig), 00509 src_(edm::Service<InputTagDistributorService>()->retrieve("src",arg.iConfig)) { arg.m[arg.n]=this;} CachingVariable::evalType eval(const edm::Event & iEvent) const{
CachingVariable::evalType SimpleValueVariable< TYPE >::eval | ( | const edm::Event & | iEvent | ) | const [inline, virtual] |
Reimplemented from CachingVariable.
Definition at line 510 of file CachingVariable.h.
References edm::Handle< T >::failedToGet(), edm::Event::getByLabel(), edm::Handle< T >::isValid(), SimpleValueVariable< TYPE >::src_, and value.
00510 { 00511 edm::Handle<TYPE> value; 00512 try{ iEvent.getByLabel(src_,value); } 00513 catch(...){ return std::make_pair(false,0); } 00514 if (value.failedToGet() || !value.isValid()) return std::make_pair(false,0); 00515 else return std::make_pair(true, *value); 00516 }
edm::InputTag SimpleValueVariable< TYPE >::src_ [private] |
Definition at line 518 of file CachingVariable.h.
Referenced by SimpleValueVariable< TYPE >::eval().