6 if (!var->
compute(iEvent))
return std::make_pair(
false,0);
11 else return std::make_pair(
false,0);
15 else return std::make_pair(
false,0);
23 else return std::make_pair(
true,(
double)i-1);
28 if (!var->
compute(iEvent))
return std::make_pair(
false,0);
32 return std::make_pair(
true,p);
47 edm::LogError(
"VariableComputer")<<
"redeclaring: "<<var<<
" skipping.";
52 arg_.
m.insert(std::make_pair(aName,newVar));
55 std::map<std::string ,const ComputedVariable *>::const_iterator it=
iCompute_.find(var);
58 ss<<
"cannot assign: "<<var<<
". List of variable declared:\n";
59 for ( std::map<std::string ,const ComputedVariable *>::const_iterator it=
iCompute_.begin(); it!=
iCompute_.end();++it)
60 ss<<it->first<<std::endl;
64 it->second->setCache(value);
68 for ( std::map<std::string ,const ComputedVariable *>::const_iterator it=
iCompute_.begin(); it!=
iCompute_.end();++it)
69 it->second->setNotCompute();
72 std::map<std::string ,const ComputedVariable *>::const_iterator it=
iCompute_.find(var);
75 ss<<
"cannot act on: "<<var<<
". List of variable declared:\n";
76 for ( std::map<std::string ,const ComputedVariable *>::const_iterator it=
iCompute_.begin(); it!=
iCompute_.end();++it)
77 ss<<it->first<<std::endl;
81 it->second->setNotCompute();
T getParameter(std::string const &) const
const VariableComputer * myComputer
bool exists(std::string const ¶meterName) const
checks if a parameter exists
CachingVariable::evalType eval(const edm::Event &iEvent) const
std::vector< double > slots_
unsigned int maxIndex() const
ComputedVariable(CachingVariableFactoryArg arg)
void assign(std::string var, double &value) const
edm::ParameterSet & iConfig
VariableComputer(CachingVariable::CachingVariableFactoryArg arg)
CachingVariable::CachingVariableFactoryArg & arg_
std::map< std::string,const ComputedVariable * > iCompute_
CachingVariable::vMap & m
VariableComputerTest(CachingVariable::CachingVariableFactoryArg arg)
bool compute(const edm::Event &iEvent) const
CachingVariable::evalType eval(const edm::Event &iEvent) const
void doesNotCompute() const
void compute(const edm::Event &iEvent) const
T get(const Candidate &c)
std::pair< bool, valueType > evalType
void declare(std::string var)