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;
183 static std::list<IService*> s_bootServices;
190 return s_appmgrInstance ? s_svclocInstance->getServices() : s_bootServices;
193 return s_appmgrInstance && s_svclocInstance->existsService(
name );
197 return s_appmgrInstance ? s_svclocInstance->service(
typeName, createIf ) : s_bootService;
200 #ifdef GAUDI_HASCLASSVISIBILITY
201 # pragma GCC visibility push( default )
205 #define PyHelper( x ) py_bootstrap_##x
209 return svcloc ? svcloc->service<
IInterface>( std::string_view{
name } ).
get() :
nullptr;
213 return prop && prop->setProperty(
name, value ).isSuccess();
217 if ( !prop )
return nullptr;
219 static std::string value;
220 value = prop->getProperty(
name ).toString();
221 return value.c_str();
228 return ui && ui->configure().isSuccess();
236 Py_BEGIN_ALLOW_THREADS;
237 stat = ep && ep->executeRun( maxevt ).isSuccess();
238 Py_END_ALLOW_THREADS;
242 #define PyFSMHelper( s ) \
243 bool py_bootstrap_fsm_##s( IInterface* i ) { \
244 auto fsm = SmartIF<IStateful>( i ); \
245 return fsm && fsm->s().isSuccess(); \
257 #ifdef GAUDI_HASCLASSVISIBILITY
258 # 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)
bool existsService(std::string_view name) const override
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
virtual unsigned long release() const =0
Release Interface instance.
void PyHelper() setOption(IInterface *app, char *key, char *value)
const std::list< IService * > & getServices() const override