CMS 3D CMS Logo

SimpleValueVariable< TYPE > Class Template Reference

#include <PhysicsTools/UtilAlgos/interface/CachingVariable.h>

Inheritance diagram for SimpleValueVariable< TYPE >:

CachingVariable

List of all members.

Public Member Functions

CachingVariable::evalType eval (const edm::Event &iEvent) const
 SimpleValueVariable (CachingVariableFactoryArg arg)

Private Attributes

edm::InputTag src_


Detailed Description

template<typename TYPE>
class SimpleValueVariable< TYPE >

Definition at line 505 of file CachingVariable.h.


Constructor & Destructor Documentation

template<typename TYPE>
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{


Member Function Documentation

template<typename TYPE>
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   }


Member Data Documentation

template<typename TYPE>
edm::InputTag SimpleValueVariable< TYPE >::src_ [private]

Definition at line 518 of file CachingVariable.h.

Referenced by SimpleValueVariable< TYPE >::eval().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:31:44 2009 for CMSSW by  doxygen 1.5.4