|
ATLAS Offline Software
|
Go to the documentation of this file.
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;
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()));
static bool toolExists(const std::string &fullName)
check if tool already exists. FullName = Parent.Name
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Base class for elements of a container that can have aux data.
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
static TFile * getOutputFile(const std::string &streamName)
Handle mappings between names and auxid_t.
size_t auxid_t
Identifier for a particular aux data item.
const std::type_info * getType(SG::auxid_t auxid) const
Return the type of an aux data item.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
static void dumpProperties(const std::string &client="")
static void dumpJobOptionProperties(const std::string &client="")
Dump the properties from joboptionsvc of clients with names beginning with given string.
static const std::string UNDEFINED
static IAppMgrUI * initGaudi(const char *options="")
initGaudi method starts the gaudi ApplicationMgr ready for working with all the components
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...
Handle mappings between names and auxid_t.
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 ...
A set of aux data identifiers.