33 static std::once_flag loaded;
35 TString path =
"$ROOTCOREBIN/python/SampleHandler/SampleHandler_QueryAMI.py";
36 gSystem->ExpandPathName (path);
37 TPython::LoadMacro (path.Data());
39 std::call_once (loaded, do_load);
41 std::ostringstream command;
42#if ROOT_VERSION_CODE >= ROOT_VERSION(6,33,01)
43 command <<
"_anyresult = ";
45 command <<
"SampleHandler_QueryAmi([";
46 for (std::size_t iter = 0, end =
query.samples.size(); iter != end; ++ iter)
50 command <<
"'" <<
query.samples[iter].name <<
"'";
53#if ROOT_VERSION_CODE >= ROOT_VERSION(6,33,01)
55 TPython::Exec (command.str().c_str(), &
result);
59 ((
void*) TPython::Eval (command.str().c_str()));
67 std::vector<SH::Sample*> samples;
71 end =
sh.end(); sample != end; ++ sample)
75 samples.push_back (&**sample);
79 if (!
query.messages.empty())
81 for (std::size_t iter = 0, end =
query.samples.size(); iter != end; ++ iter)
83 if (
query.samples[iter].unknown)
100 if (
query.samples[iter].isData != -1)
102 if (
query.samples[iter].luminosity != -1)
104 if (
query.samples[iter].crossSection != -1)
106 if (
query.samples[iter].nevents != -1)
108 if (
query.samples[iter].kfactor != -1)
110 if (
query.samples[iter].filterEfficiency != -1)