35 : method_(), member_(member), ints_(), isFunction_(
false) {
52 : method_(rhs.method_),
55 isFunction_(rhs.isFunction_),
56 retTypeFinal_(rhs.retTypeFinal_) {
74 for (
size_t i = 0;
i <
ints_.size(); ++
i) {
119 if (
addr ==
nullptr) {
121 <<
"method \"" <<
methodName() <<
"\" called with " <<
args_.size() <<
" arguments returned a null pointer ";
127 retType = retType.
toType();
139 <<
"method \"" <<
methodName() <<
"\" returned void invoked on object of type \"" <<
o.typeOf().qualifiedName()
146 : name_(
name), argsBeforeFixups_(
args) {}
156 return *(
found->second);
159 auto emplace_result =
invokers_.insert(std::make_pair(thetype, to_add));
160 return *(emplace_result.first->second);
164 pair<edm::ObjectWithDict, bool>
ret(
o,
false);
167 if (
type.isClass()) {
168 type =
ret.first.dynamicType();
171 }
while (
ret.second ==
false);
176 pair<edm::ObjectWithDict, bool>
ret(
o,
false);
180 if (
type.isClass()) {
181 type =
ret.first.dynamicType();
185 }
while (
ret.second ==
false);
186 return i->retToDouble(
ret.first);
191 const std::vector<AnyMethodArgument>&
args) {
221 needsDestructor =
false;
243 std::vector<StorageManager>&
v)
const {
265 <<
"member \"" <<
invokers_.back().methodName() <<
"\" return type is \"" <<
invokers_.back().returnTypeName()
266 <<
"\" retured a \"" <<
o.typeOf().qualifiedName() <<
"\" which is not convertible to double.";
const SingleInvoker & invoker(const edm::TypeWithDict &) const
SingleInvoker(const SingleInvoker &)=delete
method::TypeCode retType_
static bool makeStorage(edm::ObjectWithDict &obj, const edm::TypeWithDict &retType)
TypeWithDict typeOf() const
edm::ObjectWithDict invoke(const edm::ObjectWithDict &obj, edm::ObjectWithDict &retstore) const
TypeWithDict finalReturnType() const
void destruct(bool dealloc) const
bool isRefGet_
true if this invoker just pops out a ref and returns (ref.get(), false)
bool storageNeedsDestructor_
ret
prodAgent to be discontinued
double retToDouble(const edm::ObjectWithDict &) const
convert the output of invoke to a double, if possible
std::string methodName() const
MethodInvoker(const edm::FunctionWithDict &method, const std::vector< AnyMethodArgument > &ints=std::vector< AnyMethodArgument >())
std::string qualifiedName() const
std::vector< edm::TypeWithDict > TypeStack
static double objToDouble(const edm::ObjectWithDict &obj, method::TypeCode type)
edm::MemberWithDict member_
edm::ObjectWithDict createStorage(bool &needsDestructor) const
void returnStorage(edm::ObjectWithDict &&) const
edm::ObjectWithDict object_
std::vector< AnyMethodArgument > ints_
ObjectWithDict get() const
std::vector< AnyMethodArgument > MethodArgumentStack
static bool isValidReturnType(method::TypeCode)
method::TypeCode typeCode(const edm::TypeWithDict &)
edm::FunctionWithDict method_
oneapi::tbb::concurrent_queue< edm::ObjectWithDict > storage_
edm::TypeWithDict retTypeFinal_
edm::ObjectWithDict invoke(const edm::ObjectWithDict &o, std::vector< StorageManager > &v) const
std::vector< LazyInvoker > LazyMethodStack
MethodInvoker & operator=(const MethodInvoker &)
std::string typeName() const
void invoke(ObjectWithDict const &obj, ObjectWithDict *ret=nullptr, std::vector< void *> const &values=std::vector< void *>()) const
Call a member function.
static void delStorage(edm::ObjectWithDict &)
std::pair< edm::ObjectWithDict, bool > invoke(const edm::ObjectWithDict &o, std::vector< StorageManager > &v) const
SingleInvoker const * invoker_
TypeWithDict & stripConstRef()
double invokeLast(const edm::ObjectWithDict &o, std::vector< StorageManager > &v) const
invoke and coerce result to double
edm::ObjectWithDict borrowStorage() const
std::vector< void * > args_
std::string returnTypeName() const
std::vector< AnyMethodArgument > argsBeforeFixups_
TypeWithDict toType() const
std::vector< MethodInvoker > invokers_
bool push(const std::string &, const std::vector< AnyMethodArgument > &, const char *, bool deep=true) const
void throwFailedConversion(const edm::ObjectWithDict &) const
ROOT::VecOps::RVec< int > ints
LazyInvoker(const std::string &name, const std::vector< AnyMethodArgument > &args)