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
 
 if (ep)
 

Variables

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

Macro Definition Documentation

#define PyFSMHelper (   s)
Value:
bool py_bootstrap_fsm_ ## s (IInterface* i) { \
auto fsm = SmartIF<IStateful>(i); \
if (fsm) { return fsm-> s ().isSuccess(); } \
return false; \
}
if(ep)
Definition: Bootstrap.cpp:337
Definition of the basic interface.
Definition: IInterface.h:160
string s
Definition: gaudirun.py:244
list i
Definition: ana.py:128

Definition at line 322 of file Bootstrap.cpp.

#define PyHelper (   x)    py_bootstrap_ ## x

Definition at line 279 of file Bootstrap.cpp.

Function Documentation

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

Definition at line 311 of file Bootstrap.cpp.

311  {
312  auto jos = SmartIF<IJobOptionsSvc>(p);
313  if (jos) {
314  return jos->addPropertyToCatalogue(comp, StringProperty(name, value)).isSuccess();
315  }
316  return false;
317  }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
SimpleProperty< std::string > StringProperty
Definition: Property.h:743
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 304 of file Bootstrap.cpp.

304  {
305  auto ui = SmartIF<IAppMgrUI>(app);
306  if (ui) {
307  return ui->configure().isSuccess();
308  }
309  return false;
310  }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
virtual StatusCode configure()=0
Configure the job.
IInterface* PyHelper() createApplicationMgr ( )

Definition at line 280 of file Bootstrap.cpp.

280  {
282  }
GAUDI_API IAppMgrUI * createApplicationMgr(const std::string &dllname, const std::string &factname)
const char* PyHelper() getProperty ( IInterface p,
char *  name 
)

Definition at line 297 of file Bootstrap.cpp.

297  {
298  auto prop = SmartIF<IProperty>(p);
299  if (prop) {
300  return prop->getProperty(name).toString().c_str();
301  }
302  return nullptr;
303  }
virtual StatusCode getProperty(Property *p) const =0
Get the property by property.
IInterface* PyHelper() getService ( IInterface app,
char *  name 
)

Definition at line 283 of file Bootstrap.cpp.

283  {
284  auto svcloc = SmartIF<ISvcLocator>(app);
285  if (svcloc) {
286  return SmartIF<IInterface>(svcloc->service(name)).get();
287  }
288  return nullptr;
289  }
if ( ep  )

Definition at line 337 of file Bootstrap.cpp.

337 { return ep->executeRun(maxevt).isSuccess(); }
int maxevt auto ep
Definition: Bootstrap.cpp:336
PyFSMHelper ( configure  )
int PyHelper() ROOT_VERSION_CODE ( )

Definition at line 318 of file Bootstrap.cpp.

318  {
319  return ROOT_VERSION_CODE;
320  }
int PyHelper() ROOT_VERSION_CODE()
Definition: Bootstrap.cpp:318
bool PyHelper() setProperty ( IInterface p,
char *  name,
char *  value 
)

Definition at line 290 of file Bootstrap.cpp.

290  {
291  auto prop = SmartIF<IProperty>(p);
292  if (prop) {
293  return prop->setProperty(name, value).isSuccess();
294  }
295  return false;
296  }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
virtual StatusCode setProperty(const Property &p)=0
Set the property by property.

Variable Documentation

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

Definition at line 336 of file Bootstrap.cpp.

return false

Definition at line 338 of file Bootstrap.cpp.