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:245
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  }
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 262 of file Bootstrap.cpp.

262  {
263  auto ui = SmartIF<IAppMgrUI>(app);
264  return ui && ui->configure().isSuccess();
265  }
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 246 of file Bootstrap.cpp.

246  {
248  }
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  }
virtual StatusCode getProperty(Property *p) const =0
Get the property by property.
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  }
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 270 of file Bootstrap.cpp.

270  {
271  return ROOT_VERSION_CODE;
272  }
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  }
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 285 of file Bootstrap.cpp.