9 #include "GaudiKernel/AttribStringParser.h"
22 IAppMgrUI*
theApp = Gaudi::createApplicationMgr();
24 if(
theApp->FSMState() != Gaudi::StateMachine::OFFLINE)
return theApp;
26 SmartIF<IProperty> propMgr(
theApp);
28 if (propMgr->setProperty(
"JobOptionsPath",
options).isFailure())
return nullptr;
31 if (propMgr->setProperty(
"JobOptionsType",
"NONE" ).isFailure())
return nullptr;
34 if (propMgr->setProperty(
"EventLoop",
"MinimalEventLoopMgr").isFailure())
return nullptr;
37 if (
theApp->configure().isFailure())
return nullptr;
38 propMgr->setProperty(
"OutputLevel",
"3").ignore();
39 if (
theApp->initialize().isFailure())
return nullptr;
45 if(toolSvc.retrieve().isFailure())
return false;
46 auto existingTools = toolSvc->getInstances();
47 for(
auto& toolName : existingTools) {
48 if(
fullName==toolName) { toolSvc.release().ignore();
return true; }
50 toolSvc.release().ignore();
56 if(joSvc.retrieve().isFailure())
return;
57 for(
const auto& [
name,
value] : joSvc->items()) {
59 std::cout <<
name <<
" = " <<
value << std::endl;
65 if(joSvc.retrieve().isFailure())
return UNDEFINED;
73 std::string
name =
reg.getName( aux );
74 std::cout <<
" " <<
name <<
" = ";
75 const std::type_info& typeinfo = *
reg.getType(aux);
76 #define PRINT_AE( TYPE ) \
77 if(typeinfo==typeid(TYPE)) { \
78 SG::ConstAccessor<TYPE> acc (aux); \
79 if (acc.isAvailable(ae)) std::cout << acc(ae) << " (" << #TYPE << ")" << std::endl; \
92 else std::cout <<
" (" << System::typeinfoName( typeinfo ) <<
")" << std::endl;
99 for(
auto p : component.getProperties()) {
100 std::cout <<
p->name() <<
" = " <<
p->toString() << std::endl;
107 auto& prop =
histSvc->getProperty(
"Output");
109 std::vector<std::string>
outputs;
120 for(
auto attrib : Gaudi::Utils::AttribStringParser(
output.substr(
output.find(
' ')+1))) {
121 auto TAG = attrib.tag;
122 std::transform(TAG.begin(), TAG.end(), TAG.begin(), [](
unsigned char c){ return std::toupper(c); });
124 if(TAG==
"FILE" || TAG==
"DATAFILE") {
131 return static_cast<TFile*
>(gROOT->GetListOfFiles()->FindObject(
fileName.c_str()));