The Gaudi Framework  v30r3 (a5ef0a68)
ComponentManager.h
Go to the documentation of this file.
1 #ifndef COMPONENTMANAGER_H_
2 #define COMPONENTMANAGER_H_
3 
6 
7 class ApplicationMgr;
8 
15 class GAUDI_API ComponentManager : public CommonMessaging<implements<IComponentManager>>
16 {
17 public:
20  ComponentManager( IInterface* application, const InterfaceID& baseIID );
21 
23  const InterfaceID& componentBaseInterface() const override;
24 
28  StatusCode queryInterface( const InterfaceID& iid, void** pinterface ) override;
29 
31  {
32  if ( !m_svcLocator ) m_svcLocator = m_application;
33  return m_svcLocator;
34  }
35 
37  StatusCode configure() override { return StatusCode::SUCCESS; }
38 
40  StatusCode initialize() override { return StatusCode::SUCCESS; }
41 
43  StatusCode start() override { return StatusCode::SUCCESS; }
44 
46  StatusCode stop() override { return StatusCode::SUCCESS; }
47 
49  StatusCode finalize() override { return StatusCode::SUCCESS; }
50 
52  StatusCode terminate() override { return StatusCode::SUCCESS; }
53 
56 
58  StatusCode restart() override { return StatusCode::SUCCESS; }
59 
61  Gaudi::StateMachine::State FSMState() const override { return m_stateful->FSMState(); }
62 
65  Gaudi::StateMachine::State targetFSMState() const override { return m_stateful->targetFSMState(); }
66 
67 protected:
70 
73 
76 
79 
81 };
82 
83 #endif /* COMPONENTMANAGER_H_ */
Base class for a component manager.
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)
Gaudi::StateMachine::State targetFSMState() const override
When we are in the middle of a transition, get the state where the transition is leading us...
Gaudi::StateMachine::State FSMState() const override
Get the current state.
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
Definition: StateMachine.h:14
SmartIF< IStateful > m_stateful
Pointer to the IStateful interface of the owner.
SmartIF< ISvcLocator > & serviceLocator() const override
StatusCode finalize() override
Finalize (from INITIALIZED to CONFIGURED).
Interface ID class.
Definition: IInterface.h:29
StatusCode reinitialize() override
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
Definition of the basic interface.
Definition: IInterface.h:277
StatusCode restart() override
Initialization (from RUNNING to RUNNING, via INITIALIZED).
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
StatusCode initialize() override
Initialization (from CONFIGURED to INITIALIZED).
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
The Application Manager class.
StatusCode start() override
Start (from INITIALIZED to RUNNING).
StatusCode configure() override
Configuration (from OFFLINE to CONFIGURED).
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override
#define GAUDI_API
Definition: Kernel.h:104
StatusCode stop() override
Stop (from RUNNING to INITIALIZED).
StatusCode terminate() override
Initialization (from CONFIGURED to OFFLINE).