1 #ifndef GAUDIKERNEL_SERVICE_H 2 #define GAUDIKERNEL_SERVICE_H 90 const_cast<T*>( psvc )->addRef();
100 auto ptr = service<T>(
name, createIf );
101 psvc = ( ptr ? ptr.get() : nullptr );
109 template <
typename IFace = IService>
120 return service( svcType +
"/" + svcName, psvc );
136 " tool " + toolTypeAndName,
161 void sysInitialize_imp();
171 void setServiceManager(
ISvcManager* ism )
override;
189 #endif // GAUDIKERNEL_SERVICE_H The ServiceManager class is in charge of the creation of concrete instances of Services.
an helper to share the implementation of service() among the various kernel base classes
SmartIF< IFace > service(const std::string &name, bool createIf=true) const
Define general base for Gaudi exception.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
StatusCode finalize() override
Finalize (from INITIALIZED to CONFIGURED).
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Implementation of property with value of concrete type.
Gaudi::StateMachine::State FSMState() const override
The ISvcManager is the interface implemented by the Service Factory in the Application Manager to sup...
SmartIF< ISvcLocator > & serviceLocator() const override
Function needed by CommonMessaging.
constexpr static const auto SUCCESS
SmartIF< ISvcLocator > m_svcLocator
Service Locator reference.
StatusCode restart() override
Initialization (from RUNNING to RUNNING, via INITIALIZED).
std::string m_name
Service Name.
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm,...
TYPE * get() const
Get interface pointer.
StatusCode configure() override
StatusCode stop() override
Stop (from RUNNING to INITIALIZED).
StatusCode service(const std::string &svcType, const std::string &svcName, T *&psvc) const
Access a service by name and type, creating it if it doesn't already exist.
General service interface definition.
This class is used for returning status codes from appropriate routines.
The IMessage is the interface implemented by the message service.
SmartIF< IService > service(const std::string &name, const bool quiet=false, const bool createIf=true) const
std::once_flag m_initFlag
int outputLevel() const
get the Service's output level
Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)> Factory
StatusCode declareTool(ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
Declare used tool.
StatusCode reinitialize() override
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
Helper class to implement the IProperty interface.
StatusCode terminate() override
constexpr static const auto FAILURE
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
SmartIF< ISvcManager > m_svcManager
SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) override
Returns a smart pointer to a service.
Base class for all services.
Gaudi::StateMachine::State targetFSMState() const override
StatusCode initialize() override
Initialization (from CONFIGURED to INITIALIZED).