| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Classes | Namespaces | Macros | Functions | Variables
Bootstrap.cpp File Reference
`#include <iostream>`
`#include "GaudiKernel/Bootstrap.h"`
`#include "GaudiKernel/System.h"`
`#include "GaudiKernel/IInterface.h"`
`#include "GaudiKernel/IAlgorithm.h"`
`#include "GaudiKernel/IService.h"`
`#include "GaudiKernel/IAppMgrUI.h"`
`#include "GaudiKernel/ISvcLocator.h"`
`#include "GaudiKernel/IClassManager.h"`
`#include "GaudiKernel/ObjectFactory.h"`
`#include "GaudiKernel/Service.h"`
`#include "GaudiKernel/Algorithm.h"`
`#include "GaudiKernel/IJobOptionsSvc.h"`
`#include "GaudiKernel/IEventProcessor.h"`
`#include "RVersion.h"`
Include dependency graph for Bootstrap.cpp:

Go to the source code of this file.

## Classes
class | Gaudi::BootSvcLocator
| A dual-stage boostrap mechanism is used to ensure an orderly startup of the ApplicationMgr. More...

## Namespaces
| Gaudi
| Helper functions to set/get the application return code.

## Macros
#define | PyHelper(x) py_bootstrap_ ## x
#define | PyFSMHelper(s)

## Functions
IInterface *PyHelper() | createApplicationMgr ()
IInterface *PyHelper() | getService (IInterface *app, char *name)
bool PyHelper() | setProperty (IInterface *p, char *name, char *value)
const char *PyHelper() | getProperty (IInterface *p, char *name)
bool PyHelper() | configureApp (IInterface *app)
bool PyHelper() | addPropertyToCatalogue (IInterface *p, char *comp, char *name, char *value)
int PyHelper() | ROOT_VERSION_CODE ()
| PyFSMHelper (configure) PyFSMHelper(initialize) PyFSMHelper(start) PyFSMHelper(stop) PyFSMHelper(finalize) PyFSMHelper(terminate) bool py_bootstrap_app_run(IInterface *i
return ep &&ep | executeRun (maxevt).isSuccess()

## Variables
int maxevt auto | ep = SmartIF<IEventProcessor>(i)

## Macro Definition Documentation

#define PyFSMHelper | ( |  | s | ) |

Value:
bool py_bootstrap_fsm_ ## s (IInterface* i) \
{ auto fsm = SmartIF<IStateful>(i); return fsm && fsm->s().isSuccess(); }
SmartIF< IStateful >
IInterface
Definition of the basic interface.
Definition: IInterface.h:234
gaudirun.s
string s
Definition: gaudirun.py:245
ana.i
list i
Definition: ana.py:128

Definition at line 274 of file Bootstrap.cpp.

#define PyHelper | ( |  | x | ) | py_bootstrap_ ## x

Definition at line 245 of file Bootstrap.cpp.

## Function Documentation

bool PyHelper() addPropertyToCatalogue | ( | IInterface * | p,
|  | char * | comp,
|  | char * | name,
|  | char * | value
| ) |  |

Definition at line 266 of file Bootstrap.cpp.

266 {
267 auto jos = SmartIF<IJobOptionsSvc>(p);
268 return jos && jos->addPropertyToCatalogue(comp, StringProperty(name, value)).isSuccess();
269 }
SmartIF< IJobOptionsSvc >
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
StringProperty
SimpleProperty< std::string > StringProperty
Definition: Property.h:718
dump_component_properties.value
list value
Definition: dump_component_properties.py:12
IJobOptionsSvc::addPropertyToCatalogue
virtual StatusCode addPropertyToCatalogue(const std::string &client, const Property &property)=0
Add a property into the JobOptions catalog.

bool PyHelper() configureApp | ( | IInterface * | app | ) |

Definition at line 262 of file Bootstrap.cpp.

262 {
263 auto ui = SmartIF<IAppMgrUI>(app);
264 return ui && ui->configure().isSuccess();
265 }
SmartIF< IAppMgrUI >
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
IAppMgrUI::configure
virtual StatusCode configure()=0
Configure the job.
AthenaScenario.app
tuple app
Definition: AthenaScenario.py:89

IInterface* PyHelper() createApplicationMgr | ( |  | ) |

Definition at line 246 of file Bootstrap.cpp.

246 {
247 return Gaudi::createApplicationMgr();
248 }
Gaudi::createApplicationMgr
GAUDI_API IAppMgrUI * createApplicationMgr(const std::string &dllname, const std::string &factname)

return ep&& ep executeRun | ( | maxevt |  | ) |

const char* PyHelper() getProperty | ( | IInterface * | p,
|  | char * | name
| ) |  |

Definition at line 258 of file Bootstrap.cpp.

258 {
259 auto prop = SmartIF<IProperty>(p);
260 return prop ? prop->getProperty(name).toString().c_str() : nullptr;
261 }
SmartIF< IProperty >
IProperty::getProperty
virtual StatusCode getProperty(Property *p) const =0
Get the property by property.
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28

IInterface* PyHelper() getService | ( | IInterface * | app,
|  | char * | name
| ) |  |

Definition at line 249 of file Bootstrap.cpp.

249 {
250 auto svcloc = SmartIF<ISvcLocator>(app);
251 return svcloc ? svcloc->service<IInterface>(name).get()
252 : nullptr;
253 }
SmartIF< ISvcLocator >
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:78
IInterface
Definition of the basic interface.
Definition: IInterface.h:234
AthenaScenario.app
tuple app
Definition: AthenaScenario.py:89

PyFSMHelper | ( | configure |  | ) |

int PyHelper() ROOT_VERSION_CODE | ( |  | ) |

Definition at line 270 of file Bootstrap.cpp.

270 {
271 return ROOT_VERSION_CODE;
272 }
ROOT_VERSION_CODE
int PyHelper() ROOT_VERSION_CODE()
Definition: Bootstrap.cpp:270

bool PyHelper() setProperty | ( | IInterface * | p,
|  | char * | name,
|  | char * | value
| ) |  |

Definition at line 254 of file Bootstrap.cpp.

254 {
255 auto prop = SmartIF<IProperty>(p);
256 return prop && prop->setProperty(name, value).isSuccess();
257 }
SmartIF< IProperty >
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
IProperty::setProperty
virtual StatusCode setProperty(const Property &p)=0
Set the property by property.
dump_component_properties.value
list value
Definition: dump_component_properties.py:12

## Variable Documentation

int maxevt auto ep = SmartIF<IEventProcessor>(i)

Definition at line 285 of file Bootstrap.cpp.