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()) {
58 if(name.find(client)!=0)
continue;
59 std::cout << name <<
" = " << value << std::endl;
65 if(joSvc.retrieve().isFailure())
return UNDEFINED;
66 return joSvc->get(client+
"."+property,
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;
115 std::string fileName=
"";
116 for(std::string& output : outputs) {
117 if( output.substr(0,output.find(
' '))!=streamName )
continue;
120 for(
const auto& attrib : Gaudi::Utils::AttribStringParser(output.substr(output.find(
' ')+1))) {
121 std::string 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") {
125 fileName = attrib.value;
130 if(fileName.length()) {
131 return static_cast<TFile*
>(gROOT->GetListOfFiles()->FindObject(fileName.c_str()));
Handle mappings between names and auxid_t.
static void printAuxElement(const SG::AuxElement &ae)
Print the aux variables of an xAOD object (aux element) An alternative to this method is the 'xAOD::d...
static void dumpProperties(const std::string &client="")
static TFile * getOutputFile(const std::string &streamName)
static std::string getProperty(const std::string &client, const std::string &property)
Check catalogue for property of specified client returns AAH::UNDEFINED in case of no property value ...
static void dumpJobOptionProperties(const std::string &client="")
Dump the properties from joboptionsvc of clients with names beginning with given string.
static bool toolExists(const std::string &fullName)
check if tool already exists. FullName = Parent.Name
static IAppMgrUI * initGaudi(const char *options="")
initGaudi method starts the gaudi ApplicationMgr ready for working with all the components
static const std::string UNDEFINED
Base class for elements of a container that can have aux data.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
A set of aux data identifiers.
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
size_t auxid_t
Identifier for a particular aux data item.