| The Gaudi Framework v28r2-patches (bc4ad17a)

- 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/IAlgorithm.h"`
`#include "GaudiKernel/IAppMgrUI.h"`
`#include "GaudiKernel/IClassManager.h"`
`#include "GaudiKernel/IInterface.h"`
`#include "GaudiKernel/IService.h"`
`#include "GaudiKernel/ISvcLocator.h"`
`#include "GaudiKernel/Algorithm.h"`
`#include "GaudiKernel/ObjectFactory.h"`
`#include "GaudiKernel/Service.h"`
`#include "GaudiKernel/IEventProcessor.h"`
`#include "GaudiKernel/IJobOptionsSvc.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(final ize) PyFSMHelper(terminate) bool py_bootstrap_app_run(IInterface *i
return ep &&ep | executeRun (maxevt).isSuccess()

## Variables
int | maxevt

## 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

Definition at line 268 of file Bootstrap.cpp.

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

Definition at line 239 of file Bootstrap.cpp.

## Function Documentation

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

Definition at line 261 of file Bootstrap.cpp.

262 {
263 auto jos = SmartIF<IJobOptionsSvc>( p );
264 return jos && jos->addPropertyToCatalogue( comp, Gaudi::Property<std::string>( name, value ) ).isSuccess();
265 }
SmartIF< IJobOptionsSvc >
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
IJobOptionsSvc::addPropertyToCatalogue
virtual StatusCode addPropertyToCatalogue(const std::string &client, const Gaudi::Details::PropertyBase &property)=0
Add a property into the JobOptions catalog.

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

Definition at line 256 of file Bootstrap.cpp.

257 {
258 auto ui = SmartIF<IAppMgrUI>( app );
259 return ui && ui->configure().isSuccess();
260 }
SmartIF< IAppMgrUI >
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
BrunelScenarioForwardScheduler.app
app
Definition: BrunelScenarioForwardScheduler.py:137
IAppMgrUI::configure
virtual StatusCode configure()=0
Configure the job.

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

Definition at line 240 of file Bootstrap.cpp.

240 { return Gaudi::createApplicationMgr(); }
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 251 of file Bootstrap.cpp.

252 {
253 auto prop = SmartIF<IProperty>( p );
254 return prop ? prop->getProperty( name ).toString().c_str() : nullptr;
255 }
SmartIF< IProperty >
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
IProperty::getProperty
virtual StatusCode getProperty(Gaudi::Details::PropertyBase *p) const =0
Get the property by property.

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

Definition at line 241 of file Bootstrap.cpp.

242 {
243 auto svcloc = SmartIF<ISvcLocator>( app );
244 return svcloc ? svcloc->service<IInterface>( name ).get() : nullptr;
245 }
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
BrunelScenarioForwardScheduler.app
app
Definition: BrunelScenarioForwardScheduler.py:137

PyFSMHelper | ( | configure |  | ) |
| final

int PyHelper() ROOT_VERSION_CODE | ( |  | ) |

Definition at line 266 of file Bootstrap.cpp.

266 { return ROOT_VERSION_CODE; }
ROOT_VERSION_CODE
int PyHelper() ROOT_VERSION_CODE()
Definition: Bootstrap.cpp:266

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

Definition at line 246 of file Bootstrap.cpp.

247 {
248 auto prop = SmartIF<IProperty>( p );
249 return prop && prop->setProperty( name, value ).isSuccess();
250 }
SmartIF< IProperty >
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
IProperty::setProperty
virtual StatusCode setProperty(const Gaudi::Details::PropertyBase &p)=0
Set the property by property.

## Variable Documentation

int maxevt

Initial value:
{
auto ep = SmartIF<IEventProcessor>( i )
SmartIF< IEventProcessor >

Definition at line 279 of file Bootstrap.cpp.