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(); }
Definition of the basic interface.
Definition: IInterface.h:234
string s
Definition: gaudirun.py:246
list i
Definition: ana.py:128

Definition at line 275 of file Bootstrap.cpp.

#define PyHelper (   x)    py_bootstrap_ ## x

Definition at line 246 of file Bootstrap.cpp.

Function Documentation

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

Definition at line 267 of file Bootstrap.cpp.

267  {
268  auto jos = SmartIF<IJobOptionsSvc>(p);
269  return jos && jos->addPropertyToCatalogue(comp, StringProperty(name, value)).isSuccess();
270  }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
SimpleProperty< std::string > StringProperty
Definition: Property.h:718
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 263 of file Bootstrap.cpp.

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

Definition at line 247 of file Bootstrap.cpp.

247  {
249  }
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 259 of file Bootstrap.cpp.

259  {
260  auto prop = SmartIF<IProperty>(p);
261  return prop ? prop->getProperty(name).toString().c_str() : nullptr;
262  }
virtual StatusCode getProperty(Property *p) const =0
Get the property by property.
IInterface* PyHelper() getService ( IInterface app,
char *  name 
)

Definition at line 250 of file Bootstrap.cpp.

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

Definition at line 271 of file Bootstrap.cpp.

271  {
272  return ROOT_VERSION_CODE;
273  }
int PyHelper() ROOT_VERSION_CODE()
Definition: Bootstrap.cpp:271
bool PyHelper() setProperty ( IInterface p,
char *  name,
char *  value 
)

Definition at line 255 of file Bootstrap.cpp.

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

Variable Documentation

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

Definition at line 286 of file Bootstrap.cpp.