#include <MethodInvoker.h>
Public Member Functions | |
std::pair< edm::ObjectWithDict, bool > | invoke (const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const |
SingleInvoker & | operator= (const SingleInvoker &)=delete |
double | retToDouble (const edm::ObjectWithDict &) const |
convert the output of invoke to a double, if possible More... | |
SingleInvoker (const SingleInvoker &)=delete | |
SingleInvoker (const edm::TypeWithDict &, const std::string &name, const std::vector< AnyMethodArgument > &args) | |
void | throwFailedConversion (const edm::ObjectWithDict &) const |
~SingleInvoker () | |
Private Attributes | |
std::vector< MethodInvoker > | invokers_ |
bool | isRefGet_ |
true if this invoker just pops out a ref and returns (ref.get(), false) More... | |
method::TypeCode | retType_ |
edm::ObjectWithDict | storage_ |
bool | storageNeedsDestructor_ |
A bigger brother of the MethodInvoker:
Definition at line 63 of file MethodInvoker.h.
|
delete |
SingleInvoker::SingleInvoker | ( | const edm::TypeWithDict & | type, |
const std::string & | name, | ||
const std::vector< AnyMethodArgument > & | args | ||
) |
Definition at line 188 of file MethodInvoker.cc.
References writedatasetfile::args, invokers_, isRefGet_, reco::parser::ExpressionVar::makeStorage(), Skims_PA_cff::name, reco::parser::MethodSetter::push(), retType_, storage_, storageNeedsDestructor_, and reco::typeCode().
SingleInvoker::~SingleInvoker | ( | ) |
Definition at line 211 of file MethodInvoker.cc.
References reco::parser::ExpressionVar::delStorage(), and storage_.
pair< edm::ObjectWithDict, bool > SingleInvoker::invoke | ( | const edm::ObjectWithDict & | o, |
std::vector< edm::ObjectWithDict > & | v | ||
) | const |
If the member is found in object o, evaluate and return (value,true) If the member is not found but o is a Ref/RefToBase/Ptr, (return o.get(), false) the actual edm::ObjectWithDict where the result is stored will be pushed in vector so that, if needed, its destructor can be called
Definition at line 213 of file MethodInvoker.cc.
References invokers_, isRefGet_, EcalTangentSkim_cfg::o, runTheMatrix::ret, storage_, storageNeedsDestructor_, and findQualityFiles::v.
Referenced by reco::parser::LazyInvoker::invoke().
|
delete |
double SingleInvoker::retToDouble | ( | const edm::ObjectWithDict & | o | ) | const |
convert the output of invoke to a double, if possible
Definition at line 230 of file MethodInvoker.cc.
References reco::parser::ExpressionVar::isValidReturnType(), EcalTangentSkim_cfg::o, reco::parser::ExpressionVar::objToDouble(), retType_, and throwFailedConversion().
void SingleInvoker::throwFailedConversion | ( | const edm::ObjectWithDict & | o | ) | const |
Definition at line 237 of file MethodInvoker.cc.
References edm::errors::Configuration, Exception, invokers_, and EcalTangentSkim_cfg::o.
Referenced by retToDouble().
|
private |
Definition at line 66 of file MethodInvoker.h.
Referenced by invoke(), SingleInvoker(), and throwFailedConversion().
|
private |
true if this invoker just pops out a ref and returns (ref.get(), false)
Definition at line 70 of file MethodInvoker.h.
Referenced by invoke(), and SingleInvoker().
|
private |
Definition at line 65 of file MethodInvoker.h.
Referenced by retToDouble(), and SingleInvoker().
|
mutableprivate |
Definition at line 67 of file MethodInvoker.h.
Referenced by invoke(), SingleInvoker(), and ~SingleInvoker().
|
private |
Definition at line 68 of file MethodInvoker.h.
Referenced by invoke(), and SingleInvoker().