#include <CachingVariable.h>
Public Member Functions | |
ComputedVariable (CachingVariableFactoryArg arg) | |
ComputedVariable (const std::string &M, std::string &N, edm::ParameterSet &P, const VariableComputer *c) | |
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 85 of file CachingVariable.cc.
References reco::get(), edm::ParameterSet::getParameter(), CachingVariable::CachingVariableFactoryArg::iConfig, myComputer, and AlCaHLTBitMon_QueryRunRegistry::string.
: CachingVariable("ComputedVariable",arg.n,arg.iConfig){ // instanciate the computer std::string computerType = arg.iConfig.getParameter<std::string>("computer"); myComputer = VariableComputerFactory::get()->create(computerType,arg); //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. }
ComputedVariable::ComputedVariable | ( | const std::string & | M, |
std::string & | N, | ||
edm::ParameterSet & | P, | ||
const VariableComputer * | c | ||
) | [inline] |
Definition at line 136 of file CachingVariable.h.
: CachingVariable(M,N,P), myComputer(c){}
virtual ComputedVariable::~ComputedVariable | ( | ) | [inline, virtual] |
Definition at line 138 of file CachingVariable.h.
{};
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().
{ if (edm::Service<UpdaterService>()->checkOnce(myComputer->name()+":"+holderName_)) myComputer->compute(iEvent); return cache_; }
const VariableComputer* ComputedVariable::myComputer [private] |
Definition at line 146 of file CachingVariable.h.
Referenced by ComputedVariable(), and eval().