Go to the documentation of this file.
52 const std::list<IService*>&
getServices()
const override;
69 if ( !s_appmgrInstance ) {
71 s_svclocInstance = s_appmgrInstance;
73 return s_appmgrInstance.
get();
103 if ( !s_svclocInstance ) {
106 s_svclocInstance = iappmgr;
107 if ( s_svclocInstance )
return s_svclocInstance;
120 return s_svclocInstance;
128 s_svclocInstance = newInstance;
129 s_appmgrInstance = s_svclocInstance;
138 s_appmgrInstance = newInstance;
139 s_svclocInstance = s_appmgrInstance;
150 IService* is = Service::Factory::create( factname,
name,
nullptr ).release();
152 IAlgorithm* ia = Algorithm::Factory::create( factname,
name,
nullptr ).release();
155 void* libHandle =
nullptr;
157 ii = ObjFactory::create( factname,
nullptr ).
release();
159 is = Service::Factory::create( factname,
name,
nullptr ).release();
161 ia = Algorithm::Factory::create( factname,
name,
nullptr ).release();
166 std::cout <<
"Gaudi::Bootstrap: Not found DLL " << dllname << std::endl;
187 static std::list<IService*> s_bootServices;
194 return s_appmgrInstance ? s_svclocInstance->getServices() : s_bootServices;
197 return s_appmgrInstance && s_svclocInstance->existsService(
name );
201 return s_appmgrInstance ? s_svclocInstance->service(
typeName, createIf ) : s_bootService;
204 #ifdef GAUDI_HASCLASSVISIBILITY
205 # pragma GCC visibility push( default )
209 #define PyHelper( x ) py_bootstrap_##x
213 return svcloc ? svcloc->service<
IInterface>( std::string_view{
name } ).
get() :
nullptr;
217 return prop && prop->setProperty(
name, value ).isSuccess();
221 if ( !prop )
return nullptr;
223 static std::string value;
224 value = prop->getProperty(
name ).toString();
225 return value.c_str();
232 return ui && ui->configure().isSuccess();
240 Py_BEGIN_ALLOW_THREADS;
241 stat = ep && ep->executeRun( maxevt ).isSuccess();
242 Py_END_ALLOW_THREADS;
246 #define PyFSMHelper( s ) \
247 bool py_bootstrap_fsm_##s( IInterface* i ) { \
248 auto fsm = SmartIF<IStateful>( i ); \
249 return fsm && fsm->s().isSuccess(); \
261 #ifdef GAUDI_HASCLASSVISIBILITY
262 # pragma GCC visibility pop
GAUDI_API IInterface * createInstance(const std::string &name, const std::string &factname, const std::string &ddlname)
GAUDI_API IAppMgrUI * createApplicationMgr(const std::string &dllname, const std::string &factname)
GAUDI_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
get
decorate the vector of properties
bool py_bootstrap_app_run(IInterface *i, int maxevt)
IInterface *PyHelper() getService(IInterface *app, char *name)
bool PyHelper() configureApp(IInterface *app)
GAUDI_API IAppMgrUI * createApplicationMgrEx(const std::string &dllname, const std::string &factname)
SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) override
Returns a smart pointer to a service.
GAUDI_API ISvcLocator * svcLocator()
Helper class to parse a string of format "type/name".
GAUDI_API ISvcLocator * setInstance(ISvcLocator *newInstance)
Set new instance of service locator.
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
int PyHelper() ROOT_VERSION_CODE()
Base class used to implement the interfaces.
SmartIF< IFace > make_SmartIF(IFace *iface)
TYPE * get() const
Get interface pointer.
std::string typeName(const std::type_info &typ)
def configure(gaudi=None)
const char *PyHelper() getProperty(IInterface *p, char *name)
virtual unsigned long release()=0
Release Interface instance.
bool existsService(std::string_view name) const override
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
void PyHelper() setOption(IInterface *app, char *key, char *value)
const std::list< IService * > & getServices() const override