Go to the documentation of this file.
52 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR )
56 const bool createIf =
true )
override;
75 if ( !s_appmgrInstance ) {
77 s_svclocInstance = s_appmgrInstance;
79 return s_appmgrInstance.
get();
109 if ( !s_svclocInstance ) {
112 s_svclocInstance = iappmgr;
113 if ( s_svclocInstance )
return s_svclocInstance;
126 return s_svclocInstance;
134 s_svclocInstance = newInstance;
135 s_appmgrInstance = s_svclocInstance;
144 s_appmgrInstance = newInstance;
145 s_svclocInstance = s_appmgrInstance;
156 IService* is = Service::Factory::create( factname,
name,
nullptr ).release();
158 IAlgorithm* ia = Algorithm::Factory::create( factname,
name,
nullptr ).release();
161 void* libHandle =
nullptr;
163 ii = ObjFactory::create( factname,
nullptr ).
release();
165 is = Service::Factory::create( factname,
name,
nullptr ).release();
167 ia = Algorithm::Factory::create( factname,
name,
nullptr ).release();
199 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR )
200 # pragma GCC diagnostic push
201 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
205 if ( s_appmgrInstance ) {
206 sc = s_svclocInstance->getService(
typeName, iid, pinterface );
208 pinterface = s_bootInterface.
get();
213 const bool createIf ) {
215 if ( s_appmgrInstance ) {
216 sc = s_svclocInstance->getService(
typeName, svc, createIf );
218 svc = s_bootService.
get();
222 # pragma GCC diagnostic pop
226 return s_appmgrInstance ? s_svclocInstance->getServices() : s_bootServices;
229 return s_appmgrInstance && s_svclocInstance->existsService(
name );
233 return s_appmgrInstance ? s_svclocInstance->service(
typeName, createIf ) : s_bootService;
236 #ifdef GAUDI_HASCLASSVISIBILITY
237 # pragma GCC visibility push( default )
241 #define PyHelper( x ) py_bootstrap_##x
245 return svcloc ? svcloc->service<
IInterface>( std::string_view{
name } ).
get() :
nullptr;
249 return prop && prop->setProperty(
name, value ).isSuccess();
253 if ( !prop )
return nullptr;
256 value = prop->getProperty(
name ).toString();
257 return value.
c_str();
264 return ui && ui->configure().isSuccess();
272 Py_BEGIN_ALLOW_THREADS;
273 stat = ep && ep->executeRun( maxevt ).isSuccess();
274 Py_END_ALLOW_THREADS;
278 #define PyFSMHelper( s ) \
279 bool py_bootstrap_fsm_##s( IInterface* i ) { \
280 auto fsm = SmartIF<IStateful>( i ); \
281 return fsm && fsm->s().isSuccess(); \
293 #ifdef GAUDI_HASCLASSVISIBILITY
294 # 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)
StatusCode getService(const Gaudi::Utils::TypeNameString &typeName, const InterfaceID &iid, IInterface *&pinterface) override
constexpr static const auto FAILURE
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