6 #include "TInterpreter.h"
7 #include "TVirtualMutex.h"
27 const std::vector<AnyMethodArgument> &
args, std::vector<AnyMethodArgument> &fixuppedArgs) {
48 std::vector<AnyMethodArgument> tmpFixups;
50 for (
auto const& param : mem) {
54 if (fixup.second >= 0) {
55 tmpFixups.push_back(fixup.first);
56 casts += fixup.second;
60 if(++i == args.size()) {
64 fixuppedArgs.swap(tmpFixups);
72 typedef pair<int,edm::FunctionWithDict>
OK;
74 return a.first < b.first;
80 const std::vector<AnyMethodArgument> &
args,
81 std::vector<AnyMethodArgument> &fixuppedArgs,
82 const char* iIterator,
88 <<
"No dictionary for class \"" << type.
name() <<
"\".";
92 pair<edm::FunctionWithDict, bool>
mem; mem.second =
false;
96 vector<pair<int,edm::FunctionWithDict> > oks;
100 for(
auto const&
function : functions) {
103 int casts =
checkMethod(m, type, args, fixuppedArgs);
105 oks.push_back( make_pair(casts,m) );
117 if (oks.empty() && err_fatal)
125 if (oks.size() > 1) {
131 <<
"Can't resolve method \"" << name <<
"\" for class \"" << type.
name() <<
"\", the two candidates "
132 << oks[0].second.name() <<
" and " << oks[1].second.name()
133 <<
" require the same number of integer->real conversions (" << oks[0].first <<
").";
137 fixuppedArgs.clear();
140 mem.first = oks.front().second;
146 R__LOCKGUARD(gCINTMutex);
148 for(
auto const&
base : bases) {
163 if(name.compare(
"edm::Ref") == 0 ||
164 name.compare(
"edm::RefToBase") == 0 ||
165 name.compare(
"edm::Ptr") == 0) {
167 std::vector<AnyMethodArgument>
empty, empty2;
169 mem =
findMethod(type,
"get", empty, empty2,iIterator,error);
172 <<
"No member \"get\" in reference of type \"" << type.
name() <<
"\".";
pair< int, edm::FunctionWithDict > OK
bool isConstructor() const
pair< edm::FunctionWithDict, bool > findMethod(const edm::TypeWithDict &t, const string &name, const std::vector< AnyMethodArgument > &args, std::vector< AnyMethodArgument > &fixuppedArgs, const char *iIterator, int &oError)
TypeWithDict declaringType() const
bool nCasts(OK const &a, OK const &b)
static bool fatalErrorCondition(int iError)
TypeWithDict toType() const
std::string templateName() const
bool isTemplateInstance() const
uint16_t mem[nChs][nEvts]
boost::mpl::if_< matches_another_integral_type< unsigned long >, boost::variant< int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, double, float, std::string >, boost::variant< int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, unsigned long, double, float, std::string > >::type AnyMethodArgument
int checkMethod(const edm::FunctionWithDict &mem, const edm::TypeWithDict &type, const std::vector< AnyMethodArgument > &args, std::vector< AnyMethodArgument > &fixuppedArgs)
std::type_info const & id() const
size_t functionParameterSize(bool required=false) const
bool isDestructor() const