51 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) 55 const bool createIf =
true )
override;
74 if ( !s_appmgrInstance ) {
76 s_svclocInstance = s_appmgrInstance;
78 return s_appmgrInstance.
get();
108 if ( !s_svclocInstance ) {
111 s_svclocInstance = iappmgr;
112 if ( s_svclocInstance )
return s_svclocInstance;
125 return s_svclocInstance;
133 s_svclocInstance = newInstance;
134 s_appmgrInstance = s_svclocInstance;
143 s_appmgrInstance = newInstance;
144 s_svclocInstance = s_appmgrInstance;
155 IService* is = Service::Factory::create( factname,
name,
nullptr ).release();
157 IAlgorithm* ia = Algorithm::Factory::create( factname,
name,
nullptr ).release();
160 void* libHandle =
nullptr;
162 ii = ObjFactory::create( factname,
nullptr ).
release();
164 is = Service::Factory::create( factname,
name,
nullptr ).release();
166 ia = Algorithm::Factory::create( factname,
name,
nullptr ).release();
198 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) 202 if ( s_appmgrInstance ) {
205 pinterface = s_bootInterface.
get();
210 const bool createIf ) {
212 if ( s_appmgrInstance ) {
215 svc = s_bootService.
get();
222 return s_appmgrInstance ? s_svclocInstance->
getServices() : s_bootServices;
229 return s_appmgrInstance ? s_svclocInstance->
service(
typeName, createIf ) : s_bootService;
232 #ifdef GAUDI_HASCLASSVISIBILITY 233 # pragma GCC visibility push( default ) 237 #define PyHelper( x ) py_bootstrap_##x 241 return svcloc ? svcloc->service<
IInterface>( std::string_view{
name} ).
get() :
nullptr;
245 return prop && prop->setProperty(
name, value ).isSuccess();
249 return prop ? prop->getProperty(
name ).toString().c_str() :
nullptr;
253 return ui && ui->configure().isSuccess();
261 #define PyFSMHelper( s ) \ 262 bool py_bootstrap_fsm_##s( IInterface* i ) { \ 263 auto fsm = SmartIF<IStateful>( i ); \ 264 return fsm && fsm->s().isSuccess(); \ 272 return ep && ep->executeRun(
maxevt ).isSuccess();
275 #ifdef GAUDI_HASCLASSVISIBILITY 276 # pragma GCC visibility pop
int PyHelper() ROOT_VERSION_CODE()
Base class used to implement the interfaces.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
const std::list< IService * > & getServices() const override
Implementation of property with value of concrete type.
bool existsService(std::string_view name) const override
bool PyHelper() addPropertyToCatalogue(IInterface *p, char *comp, char *name, char *value)
GAUDI_API IAppMgrUI * createApplicationMgrEx(const std::string &dllname, const std::string &factname)
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
const char *PyHelper() getProperty(IInterface *p, char *name)
TYPE * get() const
Get interface pointer.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Helper class to parse a string of format "type/name".
GAUDI_API ISvcLocator * svcLocator()
SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) override
Returns a smart pointer to a service.
General service interface definition.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
virtual StatusCode getService(const Gaudi::Utils::TypeNameString &typeName, IService *&svc, const bool createIf=true)
Get a reference to the service given a service name.
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
The IAlgorithm is the interface implemented by the Algorithm base class.
Application Manager User Interface.
GAUDI_API ISvcLocator * setInstance(ISvcLocator *newInstance)
Set new instance of service locator.
virtual unsigned long release()=0
Release Interface instance.
virtual bool existsService(std::string_view name) const =0
Check the existence of a service given a service name.
StatusCode getService(const Gaudi::Utils::TypeNameString &typeName, const InterfaceID &iid, IInterface *&pinterface) override
A dual-stage boostrap mechanism is used to ensure an orderly startup of the ApplicationMgr.
constexpr static const auto FAILURE
SmartIF< IFace > make_SmartIF(IFace *iface)
virtual const std::list< IService * > & getServices() const =0
Get a reference to a service and create it if it does not exists.
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
std::string typeName(const std::type_info &typ)
bool PyHelper() configureApp(IInterface *app)
IInterface *PyHelper() getService(IInterface *app, char *name)
Header file for std:chrono::duration-based Counters.
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.