Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v36r7 (7f57a304)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Bootstrap.cpp File Reference
Include dependency graph for Bootstrap.cpp:

Go to the source code of this file.

Classes

class  Gaudi::BootSvcLocator
 

Namespaces

 Gaudi
 Header file for std:chrono::duration-based Counters.
 

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)
 
void PyHelper() setOption (IInterface *app, char *key, char *value)
 
bool PyHelper() configureApp (IInterface *app)
 
int PyHelper() ROOT_VERSION_CODE ()
 
bool py_bootstrap_app_run (IInterface *i, int maxevt)
 

Macro Definition Documentation

◆ PyFSMHelper

#define PyFSMHelper (   s)
Value:
bool py_bootstrap_fsm_##s( IInterface* i ) { \
auto fsm = SmartIF<IStateful>( i ); \
return fsm && fsm->s().isSuccess(); \
}

Definition at line 269 of file Bootstrap.cpp.

◆ PyHelper

#define PyHelper (   x)    py_bootstrap_##x

Definition at line 237 of file Bootstrap.cpp.

Function Documentation

◆ configureApp()

bool PyHelper() configureApp ( IInterface app)

Definition at line 257 of file Bootstrap.cpp.

257  {
258  auto ui = SmartIF<IAppMgrUI>( app );
259  return ui && ui->configure().isSuccess();
260 }

◆ createApplicationMgr()

IInterface* PyHelper() createApplicationMgr ( )

Definition at line 237 of file Bootstrap.cpp.

237 { return Gaudi::createApplicationMgr(); }

◆ getProperty()

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

Definition at line 246 of file Bootstrap.cpp.

246  {
247  auto prop = SmartIF<IProperty>( p );
248  if ( !prop ) return nullptr;
249  // this is needed to guarantee that Python can access the returned char*
250  static std::string value;
251  value = prop->getProperty( name ).toString();
252  return value.c_str();
253 }

◆ getService()

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

Definition at line 238 of file Bootstrap.cpp.

238  {
239  auto svcloc = SmartIF<ISvcLocator>( app );
240  return svcloc ? svcloc->service<IInterface>( std::string_view{ name } ).get() : nullptr;
241 }

◆ py_bootstrap_app_run()

bool py_bootstrap_app_run ( IInterface i,
int  maxevt 
)

Definition at line 263 of file Bootstrap.cpp.

263  {
264  auto ep = SmartIF<IEventProcessor>( i );
265  return ep && ep->executeRun( maxevt ).isSuccess();
266 }

◆ ROOT_VERSION_CODE()

int PyHelper() ROOT_VERSION_CODE ( )

Definition at line 261 of file Bootstrap.cpp.

261 { return ROOT_VERSION_CODE; }

◆ setOption()

void PyHelper() setOption ( IInterface app,
char *  key,
char *  value 
)

Definition at line 254 of file Bootstrap.cpp.

254  {
255  if ( auto svcloc = SmartIF<ISvcLocator>( app ) ) { svcloc->getOptsSvc().set( key, value ); }
256 }

◆ setProperty()

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

Definition at line 242 of file Bootstrap.cpp.

242  {
243  auto prop = SmartIF<IProperty>( p );
244  return prop && prop->setProperty( name, value ).isSuccess();
245 }
Gaudi::createApplicationMgr
GAUDI_API IAppMgrUI * createApplicationMgr(const std::string &dllname, const std::string &factname)
std::string
STL class.
Read.app
app
Definition: Read.py:36
gaudirun.s
string s
Definition: gaudirun.py:346
Gaudi::Functional::details::get
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
Definition: FunctionalDetails.h:444
TimingHistograms.name
name
Definition: TimingHistograms.py:25
std::string::c_str
T c_str(T... args)
GaudiPython.Bindings.nullptr
nullptr
Definition: Bindings.py:93
SmartIF< IStateful >
ROOT_VERSION_CODE
int PyHelper() ROOT_VERSION_CODE()
Definition: Bootstrap.cpp:261
IInterface
Definition: IInterface.h:237
ProduceConsume.key
key
Definition: ProduceConsume.py:81