|
Gaudi Framework, version v25r2 |
| Home | Generated: Wed Jun 4 2014 |
The ServiceManager class is in charge of the creation of concrete instances of Services. More...
#include <ServiceManager.h>


Classes | |
| struct | ServiceItem |
Public Types | |
| typedef std::list< ServiceItem > | ListSvc |
| typedef GaudiUtils::Map < std::string, std::string > | MapType |
Public Types inherited from extends2< ComponentManager, ISvcManager, ISvcLocator > | |
| typedef extends2 | base_class |
| Typedef to this class. | |
| typedef extend_interfaces2 < ISvcManager, ISvcLocator > | extend_interfaces_base |
| Typedef to the base of this class. | |
| typedef extend_interfaces_base::ext_iids | interfaces |
| MPL set of all the implemented interfaces. | |
Public Types inherited from extend_interfaces2< I1, I2 > | |
| typedef mpl::fold< typename I1::iid::iids::type, typename I2::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type | ext_iids |
| MPL set of interfaces extended by this one. | |
Public Member Functions | |
| ServiceManager (IInterface *application) | |
| default creator | |
| SmartIF< ISvcLocator > & | serviceLocator () const |
| Function needed by CommonMessaging. | |
| virtual | ~ServiceManager () |
| virtual destructor | |
| virtual const std::list < IService * > & | getServices () const |
| Return the list of Services. | |
| virtual bool | existsService (const std::string &name) const |
| implementation of ISvcLocation::existsService | |
| virtual StatusCode | addService (IService *svc, int prio=DEFAULT_SVC_PRIORITY) |
| implementation of ISvcManager::addService | |
| virtual StatusCode | addService (const Gaudi::Utils::TypeNameString &typeName, int prio=DEFAULT_SVC_PRIORITY) |
| implementation of ISvcManager::addService | |
| virtual StatusCode | removeService (IService *svc) |
| implementation of ISvcManager::removeService | |
| virtual StatusCode | removeService (const std::string &name) |
| implementation of ISvcManager::removeService | |
| virtual StatusCode | declareSvcType (const std::string &svcname, const std::string &svctype) |
| implementation of ISvcManager::declareSvcType | |
| virtual SmartIF< IService > & | createService (const Gaudi::Utils::TypeNameString &nametype) |
| implementation of ISvcManager::createService | |
| virtual StatusCode | initialize () |
| Initialization (from CONFIGURED to INITIALIZED). | |
| virtual StatusCode | start () |
| Start (from INITIALIZED to RUNNING). | |
| virtual StatusCode | stop () |
| Stop (from RUNNING to INITIALIZED). | |
| virtual StatusCode | finalize () |
| Finalize (from INITIALIZED to CONFIGURED). | |
| virtual StatusCode | reinitialize () |
| Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). | |
| virtual StatusCode | restart () |
| Initialization (from RUNNING to RUNNING, via INITIALIZED). | |
| virtual int | getPriority (const std::string &name) const |
| manage priorities of services | |
| virtual StatusCode | setPriority (const std::string &name, int pri) |
| virtual bool | loopCheckEnabled () const |
| Get the value of the initialization loop check flag. | |
| virtual void | setLoopCheckEnabled (bool en) |
| Set the value of the initialization loop check flag. | |
| const std::string & | name () const |
| Return the name of the manager (implementation of INamedInterface) | |
| virtual SmartIF< IService > & | service (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) |
| Returns a smart pointer to a service. | |
Public Member Functions inherited from extends2< ComponentManager, ISvcManager, ISvcLocator > | |
| extends2 (A1 a1, A2 a2, A3 a3) | |
| Templated constructor with 3 arguments. | |
| extends2 (A1 a1, A2 a2) | |
| Templated constructor with 2 arguments. | |
| extends2 (A1 a1) | |
| Templated constructor with 1 argument. | |
| extends2 () | |
| Default constructor. | |
| virtual void * | i_cast (const InterfaceID &tid) const |
| Implementation of IInterface::i_cast. | |
| virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp) |
| Implementation of IInterface::queryInterface. | |
| virtual std::vector< std::string > | getInterfaceNames () const |
| Implementation of IInterface::getInterfaceNames. | |
| virtual | ~extends2 () |
| Virtual destructor. | |
Public Member Functions inherited from ComponentManager | |
| ComponentManager (IInterface *application, const InterfaceID &baseIID) | |
| Constructor. | |
| virtual const InterfaceID & | componentBaseInterface () const |
| Basic interface id of the managed components. | |
| virtual | ~ComponentManager () |
| Virtual destructor. | |
| virtual StatusCode | configure () |
| Configuration (from OFFLINE to CONFIGURED). | |
| virtual StatusCode | terminate () |
| Initialization (from CONFIGURED to OFFLINE). | |
| virtual Gaudi::StateMachine::State | FSMState () const |
| Get the current state. | |
| virtual Gaudi::StateMachine::State | targetFSMState () const |
| When we are in the middle of a transition, get the state where the transition is leading us. | |
Public Member Functions inherited from CommonMessaging< implements1< IComponentManager > > | |
| CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3) | |
| Templated constructor with 3 arguments. | |
| CommonMessaging (const A1 &a1, const A2 &a2) | |
| Templated constructor with 2 arguments. | |
| CommonMessaging (const A1 &a1) | |
| Templated constructor with 1 argument. | |
| CommonMessaging () | |
| Default constructor. | |
| virtual | ~CommonMessaging () |
| Virtual destructor. | |
| SmartIF< IMessageSvc > & | msgSvc () const |
| The standard message service. | |
| MsgStream & | msgStream () const |
| Return an uninitialized MsgStream. | |
| MsgStream & | msgStream (const MSG::Level level) const |
| Predefined configurable message stream for the efficient printouts. | |
| MsgStream & | always () const |
| shortcut for the method msgStream(MSG::ALWAYS) | |
| MsgStream & | fatal () const |
| shortcut for the method msgStream(MSG::FATAL) | |
| MsgStream & | err () const |
| shortcut for the method msgStream(MSG::ERROR) | |
| MsgStream & | error () const |
| shortcut for the method msgStream(MSG::ERROR) | |
| MsgStream & | warning () const |
| shortcut for the method msgStream(MSG::WARNING) | |
| MsgStream & | info () const |
| shortcut for the method msgStream(MSG::INFO) | |
| MsgStream & | debug () const |
| shortcut for the method msgStream(MSG::DEBUG) | |
| MsgStream & | verbose () const |
| shortcut for the method msgStream(MSG::VERBOSE) | |
| MsgStream & | msg () const |
| shortcut for the method msgStream(MSG::INFO) | |
| MSG::Level | msgLevel () const |
| get the output level from the embedded MsgStream | |
| bool | msgLevel (MSG::Level lvl) const |
| get the output level from the embedded MsgStream | |
Public Member Functions inherited from extend_interfaces2< I1, I2 > | |
| virtual | ~extend_interfaces2 () |
| Virtual destructor. | |
Private Member Functions | |
| ListSvc::iterator | find (const std::string &name) |
| ListSvc::const_iterator | find (const std::string &name) const |
| ListSvc::iterator | find (const IService *ptr) |
| ListSvc::const_iterator | find (const IService *ptr) const |
| void | dump () const |
Private Attributes | |
| ListSvc | m_listsvc |
| List of service maintained by ServiceManager. | |
| MapType | m_maptype |
| Map of service name and service type. | |
| bool | m_loopCheck |
| Check for service initialization loops. | |
| SmartIF< IService > | m_appSvc |
| Pointer to the application IService interface. | |
| std::list< IService * > | m_listOfPtrs |
| List of pointers to the know services used to implement getServices() | |
| GaudiUtils::Map< InterfaceID, SmartIF< IInterface > > | m_defaultImplementations |
| boost::recursive_mutex | m_svcinitmutex |
| Mutex to synchronize shared service initialization between threads. | |
Additional Inherited Members | |
Static Public Member Functions inherited from IInterface | |
| static const InterfaceID & | interfaceID () |
| Return an instance of InterfaceID identifying the interface. | |
Protected Member Functions inherited from CommonMessaging< implements1< IComponentManager > > | |
| void | updateMsgStreamOutputLevel (int level) |
| Update the output level of the cached MsgStream. | |
Protected Attributes inherited from ComponentManager | |
| SmartIF< IInterface > | m_application |
| Pointer to the owner of the manager. | |
| SmartIF< IStateful > | m_stateful |
| Pointer to the IStateful interface of the owner. | |
| InterfaceID | m_basicInterfaceId |
| Basic interface id of the managed components. | |
| SmartIF< ISvcLocator > | m_svcLocator |
| Service locator (needed to access the MessageSvc) | |
The ServiceManager class is in charge of the creation of concrete instances of Services.
The ApplicationMgr delegates the creation and bookkeeping of services to the ServiceManager. In order to be able to create services from which it is not know the concrete type it requires that the services has been declared in one of 3 possible ways: an abstract static creator function, a dynamic link library or an abstract factory reference.
Definition at line 36 of file ServiceManager.h.
| typedef std::list<ServiceItem> ServiceManager::ListSvc |
Definition at line 57 of file ServiceManager.h.
| typedef GaudiUtils::Map<std::string, std::string> ServiceManager::MapType |
Definition at line 58 of file ServiceManager.h.
| ServiceManager::ServiceManager | ( | IInterface * | application | ) |
default creator
Definition at line 27 of file ServiceManager.cpp.
|
virtual |
virtual destructor
Definition at line 39 of file ServiceManager.cpp.
|
virtual |
implementation of ISvcManager::addService
Definition at line 95 of file ServiceManager.cpp.
|
virtual |
implementation of ISvcManager::addService
Definition at line 110 of file ServiceManager.cpp.
|
virtual |
implementation of ISvcManager::createService
: check how this hack works
: what does this mean?
Definition at line 48 of file ServiceManager.cpp.
|
virtual |
implementation of ISvcManager::declareSvcType
Definition at line 234 of file ServiceManager.cpp.
|
private |
Definition at line 529 of file ServiceManager.cpp.
|
virtual |
implementation of ISvcLocation::existsService
Definition at line 203 of file ServiceManager.cpp.
|
virtual |
Finalize (from INITIALIZED to CONFIGURED).
Reimplemented from ComponentManager.
Definition at line 402 of file ServiceManager.cpp.
|
inlineprivate |
Definition at line 131 of file ServiceManager.h.
|
inlineprivate |
Definition at line 134 of file ServiceManager.h.
|
inlineprivate |
Definition at line 137 of file ServiceManager.h.
|
inlineprivate |
Definition at line 140 of file ServiceManager.h.
|
virtual |
manage priorities of services
Definition at line 494 of file ServiceManager.cpp.
|
virtual |
Return the list of Services.
Definition at line 192 of file ServiceManager.cpp.
|
virtual |
Initialization (from CONFIGURED to INITIALIZED).
Reimplemented from ComponentManager.
Definition at line 248 of file ServiceManager.cpp.
|
virtual |
Get the value of the initialization loop check flag.
Definition at line 515 of file ServiceManager.cpp.
|
inlinevirtual |
Return the name of the manager (implementation of INamedInterface)
Implements CommonMessaging< implements1< IComponentManager > >.
Definition at line 116 of file ServiceManager.h.
|
virtual |
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
Reimplemented from ComponentManager.
Definition at line 356 of file ServiceManager.cpp.
|
virtual |
implementation of ISvcManager::removeService
Definition at line 210 of file ServiceManager.cpp.
|
virtual |
implementation of ISvcManager::removeService
Definition at line 222 of file ServiceManager.cpp.
|
virtual |
Initialization (from RUNNING to RUNNING, via INITIALIZED).
Reimplemented from ComponentManager.
Definition at line 379 of file ServiceManager.cpp.
|
virtual |
Returns a smart pointer to a service.
Definition at line 156 of file ServiceManager.cpp.
|
inlinevirtual |
Function needed by CommonMessaging.
Reimplemented from ComponentManager.
Definition at line 64 of file ServiceManager.h.
|
virtual |
Set the value of the initialization loop check flag.
Definition at line 521 of file ServiceManager.cpp.
|
virtual |
Definition at line 502 of file ServiceManager.cpp.
|
virtual |
Start (from INITIALIZED to RUNNING).
Reimplemented from ComponentManager.
Definition at line 283 of file ServiceManager.cpp.
|
virtual |
Stop (from RUNNING to INITIALIZED).
Reimplemented from ComponentManager.
Definition at line 320 of file ServiceManager.cpp.
Pointer to the application IService interface.
Definition at line 150 of file ServiceManager.h.
|
private |
Definition at line 155 of file ServiceManager.h.
|
mutableprivate |
List of pointers to the know services used to implement getServices()
Definition at line 153 of file ServiceManager.h.
|
private |
List of service maintained by ServiceManager.
Definition at line 145 of file ServiceManager.h.
|
private |
Check for service initialization loops.
Definition at line 147 of file ServiceManager.h.
|
private |
Map of service name and service type.
Definition at line 146 of file ServiceManager.h.
|
private |
Mutex to synchronize shared service initialization between threads.
Definition at line 158 of file ServiceManager.h.