#include <PhysicsTools/UtilAlgos/interface/CachingVariable.h>
Public Member Functions | |
ComputedVariable (const std::string &M, std::string &N, edm::ParameterSet &P, const VariableComputer *c) | |
ComputedVariable (CachingVariableFactoryArg arg) | |
virtual evalType | eval (const edm::Event &iEvent) const |
virtual | ~ComputedVariable () |
Private Attributes | |
const VariableComputer * | myComputer |
Definition at line 133 of file CachingVariable.h.
ComputedVariable::ComputedVariable | ( | CachingVariableFactoryArg | arg | ) |
Definition at line 91 of file CachingVariable.cc.
References DBSPlugin::get(), edm::ParameterSet::getParameter(), CachingVariable::CachingVariableFactoryArg::iConfig, and myComputer.
00091 : 00092 CachingVariable("ComputedVariable",arg.n,arg.iConfig){ 00093 // instanciate the computer 00094 std::string computerType = arg.iConfig.getParameter<std::string>("computer"); 00095 myComputer = VariableComputerFactory::get()->create(computerType,arg); 00096 //there is a memory leak here, because the object we are in is not register anywhere. since it happens once per job, this is not a big deal. 00097 }
ComputedVariable::ComputedVariable | ( | const std::string & | M, | |
std::string & | N, | |||
edm::ParameterSet & | P, | |||
const VariableComputer * | c | |||
) | [inline] |
Definition at line 136 of file CachingVariable.h.
00136 : 00137 CachingVariable(M,N,P), myComputer(c){}
virtual ComputedVariable::~ComputedVariable | ( | ) | [inline, virtual] |
virtual evalType ComputedVariable::eval | ( | const edm::Event & | iEvent | ) | const [inline, virtual] |
Reimplemented from CachingVariable.
Definition at line 140 of file CachingVariable.h.
References CachingVariable::cache_, VariableComputer::compute(), CachingVariable::holderName_, myComputer, and VariableComputer::name().
00140 { 00141 if (edm::Service<UpdaterService>()->checkOnce(myComputer->name()+":"+holderName_)) 00142 myComputer->compute(iEvent); 00143 return cache_; 00144 }
const VariableComputer* ComputedVariable::myComputer [private] |