CMS 3D CMS Logo

Public Member Functions | Private Attributes

SimpleValueVariable< TYPE > Class Template Reference

#include <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.

                                                     :
    CachingVariable("SimpleValueVariable",arg.n,arg.iConfig),
    src_(edm::Service<InputTagDistributorService>()->retrieve("src",arg.iConfig)) { arg.m[arg.n]=this;}

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::HandleBase::failedToGet(), edm::Event::getByLabel(), edm::HandleBase::isValid(), SimpleValueVariable< TYPE >::src_, and relativeConstraints::value.

                                                             {
    edm::Handle<TYPE> value;
    try{    iEvent.getByLabel(src_,value);   }  
    catch(...){ return std::make_pair(false,0); }
    if (value.failedToGet() || !value.isValid()) return std::make_pair(false,0);
    else return std::make_pair(true, *value);
  }

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