#include <CachingVariable.h>
Public Member Functions | |
CachingVariable::evalType | eval (const edm::Event &iEvent) const |
VariablePower (CachingVariableFactoryArg arg) | |
~VariablePower () | |
Private Attributes | |
double | power_ |
std::string | var_ |
Definition at line 482 of file CachingVariable.h.
VariablePower::VariablePower | ( | CachingVariableFactoryArg | arg | ) | [inline] |
Definition at line 484 of file CachingVariable.h.
References CachingVariable::addDescriptionLine(), edm::ParameterSet::getParameter(), CachingVariable::CachingVariableFactoryArg::iConfig, CachingVariable::CachingVariableFactoryArg::m, CachingVariable::CachingVariableFactoryArg::n, power_, AlCaHLTBitMon_QueryRunRegistry::string, and var_.
: CachingVariable("Power",arg.n,arg.iConfig){ power_=arg.iConfig.getParameter<double>("power"); var_=arg.iConfig.getParameter<std::string>("var"); std::stringstream ss("Calculare X^Y, with X="); ss<<var_<<" and Y="<<power_; addDescriptionLine(ss.str()); arg.m[arg.n]=this; }
VariablePower::~VariablePower | ( | ) | [inline] |
Definition at line 493 of file CachingVariable.h.
{}
CachingVariable::evalType VariablePower::eval | ( | const edm::Event & | iEvent | ) | const [virtual] |
Reimplemented from CachingVariable.
Definition at line 26 of file CachingVariable.cc.
References CachingVariable::compute(), create_public_lumi_plots::exp, iEvent, create_public_lumi_plots::log, AlCaHLTBitMon_ParallelJobs::p, power_, findQualityFiles::v, and var_.
{ const CachingVariable * var=edm::Service<VariableHelperService>()->get().variable(var_); if (!var->compute(iEvent)) return std::make_pair(false,0); double v=(*var)(iEvent); double p=exp(power_*log(v)); return std::make_pair(true,p); }
double VariablePower::power_ [private] |
Definition at line 499 of file CachingVariable.h.
Referenced by eval(), and VariablePower().
std::string VariablePower::var_ [private] |
Definition at line 500 of file CachingVariable.h.
Referenced by eval(), and VariablePower().