#include <ExpressionVar.h>
Public Member Functions | |
ExpressionLazyVar (const std::vector< LazyInvoker > &methods) | |
virtual double | value (const edm::ObjectWithDict &o) const |
~ExpressionLazyVar () | |
Private Attributes | |
std::vector< LazyInvoker > | methods_ |
std::vector< edm::ObjectWithDict > | objects_ |
Same as ExpressionVar but with lazy resolution of object methods using the final type of the object, and not the one fixed at compile time
Definition at line 52 of file ExpressionVar.h.
ExpressionLazyVar::ExpressionLazyVar | ( | const std::vector< LazyInvoker > & | methods | ) |
Definition at line 138 of file ExpressionVar.cc.
: methods_(methods) { }
ExpressionLazyVar::~ExpressionLazyVar | ( | ) |
Definition at line 143 of file ExpressionVar.cc.
{ }
double ExpressionLazyVar::value | ( | const edm::ObjectWithDict & | o | ) | const [virtual] |
Implements reco::parser::ExpressionBase.
Definition at line 148 of file ExpressionVar.cc.
References methods_, python::connectstrParser::o, objects_, cmsRelvalreport::red(), and run_regression::ret.
{ std::vector<LazyInvoker>::const_iterator it, ed = methods_.end()-1; edm::ObjectWithDict ro = o; for (it = methods_.begin(); it < ed; ++it) { ro = it->invoke(ro, objects_); } double ret = it->invokeLast(ro, objects_); std::vector<edm::ObjectWithDict>::reverse_iterator rit, red = objects_.rend(); for (rit = objects_.rbegin(); rit != red; ++rit) { rit->typeOf().destruct(rit->address(), false); } objects_.clear(); return ret; }
std::vector<LazyInvoker> reco::parser::ExpressionLazyVar::methods_ [private] |
Definition at line 59 of file ExpressionVar.h.
Referenced by value().
std::vector<edm::ObjectWithDict> reco::parser::ExpressionLazyVar::objects_ [mutable, private] |
Definition at line 60 of file ExpressionVar.h.
Referenced by value().