All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ComponentManager.h
Go to the documentation of this file.
1 #ifndef COMPONENTMANAGER_H_
2 #define COMPONENTMANAGER_H_
3 
6 #include "GaudiKernel/HashMap.h"
7 
14 class GAUDI_API ComponentManager: public CommonMessaging<implements1<IComponentManager> > {
15 public:
16 
19  ComponentManager(IInterface *application, const InterfaceID &baseIID);
20 
22  virtual const InterfaceID& componentBaseInterface() const;
23 
25  virtual ~ComponentManager();
26 
30  StatusCode queryInterface(const InterfaceID& iid, void** pinterface);
31 
33  if (!m_svcLocator) m_svcLocator = m_application;
34  return m_svcLocator;
35  }
36 
39 
42 
44  virtual StatusCode start() {return StatusCode::SUCCESS;}
45 
47  virtual StatusCode stop() {return StatusCode::SUCCESS;}
48 
51 
54 
55 
58 
61 
63  virtual Gaudi::StateMachine::State FSMState() const {return m_stateful->FSMState();}
64 
67  virtual Gaudi::StateMachine::State targetFSMState() const {return m_stateful->targetFSMState();}
68 
69 protected:
70 
73 
76 
79 
82 
83 };
84 
85 
86 #endif /* COMPONENTMANAGER_H_ */
virtual StatusCode restart()
Initialization (from RUNNING to RUNNING, via INITIALIZED).
virtual StatusCode terminate()
Initialization (from CONFIGURED to OFFLINE).
virtual StatusCode configure()
Configuration (from OFFLINE to CONFIGURED).
virtual Gaudi::StateMachine::State targetFSMState() const
When we are in the middle of a transition, get the state where the transition is leading us...
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Base class for a component manager.
virtual SmartIF< ISvcLocator > & serviceLocator() const
Needed to locate the message service.
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
Definition: StateMachine.h:12
SmartIF< IStateful > m_stateful
Pointer to the IStateful interface of the owner.
Gaudi::InterfaceId< IInterface, 0, 0 > iid
Interface ID.
Definition: IInterface.h:164
Interface ID class.
Definition: IInterface.h:55
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Definition of the basic interface.
Definition: IInterface.h:160
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
virtual StatusCode reinitialize()
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
virtual StatusCode start()
Start (from INITIALIZED to RUNNING).
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
Templated class to add the standard messaging functionalities.
virtual StatusCode stop()
Stop (from RUNNING to INITIALIZED).
#define GAUDI_API
Definition: Kernel.h:108
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).