| The Gaudi Framework v32r1 (f65d50dc)

ComponentManager.h
Go to the documentation of this file.
1 #ifndef COMPONENTMANAGER_H_
2 #define COMPONENTMANAGER_H_
3
4 #include "GaudiKernel/CommonMessaging.h"
5 #include "GaudiKernel/IComponentManager.h"
6
7 class ApplicationMgr;
8
15 class GAUDI_API ComponentManager : public CommonMessaging<implements<IComponentManager>> {
16 public:
19 ComponentManager( IInterface* application, const InterfaceID& baseIID );
20
22 const InterfaceID& componentBaseInterface() const override;
23
27 StatusCode queryInterface( const InterfaceID& iid, void** pinterface ) override;
28
29 SmartIF<ISvcLocator>& serviceLocator() const override {
30 if ( !m_svcLocator ) m_svcLocator = m_application;
31 return m_svcLocator;
32 }
33
35 StatusCode configure() override { return StatusCode::SUCCESS; }
36
38 StatusCode initialize() override { return StatusCode::SUCCESS; }
39
41 StatusCode start() override { return StatusCode::SUCCESS; }
42
44 StatusCode stop() override { return StatusCode::SUCCESS; }
45
47 StatusCode finalize() override { return StatusCode::SUCCESS; }
48
50 StatusCode terminate() override { return StatusCode::SUCCESS; }
51
53 StatusCode reinitialize() override { return StatusCode::SUCCESS; }
54
56 StatusCode restart() override { return StatusCode::SUCCESS; }
57
59 Gaudi::StateMachine::State FSMState() const override { return m_stateful->FSMState(); }
60
63 Gaudi::StateMachine::State targetFSMState() const override { return m_stateful->targetFSMState(); }
64
65 protected:
67 SmartIF<IInterface> m_application;
68
70 SmartIF<IStateful> m_stateful;
71
73 InterfaceID m_basicInterfaceId;
74
76 mutable SmartIF<ISvcLocator> m_svcLocator;
77
78 friend ApplicationMgr;
79 };
80
81 #endif /* COMPONENTMANAGER_H_ */
ComponentManager::targetFSMState
Gaudi::StateMachine::State targetFSMState() const override
When we are in the middle of a transition, get the state where the transition is leading us.
Definition: ComponentManager.h:63
SmartIF< ISvcLocator >
ComponentManager
Base class for a component manager.
Definition: ComponentManager.h:15
ComponentManager::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)
Definition: ComponentManager.h:76
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
Gaudi::StateMachine::State
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm,...
Definition: StateMachine.h:12
ComponentManager::m_stateful
SmartIF< IStateful > m_stateful
Pointer to the IStateful interface of the owner.
Definition: ComponentManager.h:70
ComponentManager::finalize
StatusCode finalize() override
Finalize (from INITIALIZED to CONFIGURED).
Definition: ComponentManager.h:47
InterfaceID
Interface ID class.
Definition: IInterface.h:29
ComponentManager::reinitialize
StatusCode reinitialize() override
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
Definition: ComponentManager.h:53
ComponentManager::m_basicInterfaceId
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
Definition: ComponentManager.h:73
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IInterface
Definition of the basic interface.
Definition: IInterface.h:244
ComponentManager::restart
StatusCode restart() override
Initialization (from RUNNING to RUNNING, via INITIALIZED).
Definition: ComponentManager.h:56
CommonMessaging.h
ComponentManager::ApplicationMgr
friend ApplicationMgr
Definition: ComponentManager.h:78
ComponentManager::m_application
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
Definition: ComponentManager.h:67
ComponentManager::initialize
StatusCode initialize() override
Initialization (from CONFIGURED to INITIALIZED).
Definition: ComponentManager.h:38
ApplicationMgr
The Application Manager class.
Definition: ApplicationMgr.h:45
ComponentManager::start
StatusCode start() override
Start (from INITIALIZED to RUNNING).
Definition: ComponentManager.h:41
IComponentManager.h
ComponentManager::configure
StatusCode configure() override
Configuration (from OFFLINE to CONFIGURED).
Definition: ComponentManager.h:35
CommonMessaging
Definition: CommonMessaging.h:56
gaudirun.application
application
Definition: gaudirun.py:295
ComponentManager::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Definition: ComponentManager.h:29
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
ComponentManager::stop
StatusCode stop() override
Stop (from RUNNING to INITIALIZED).
Definition: ComponentManager.h:44
ComponentManager::FSMState
Gaudi::StateMachine::State FSMState() const override
Get the current state.
Definition: ComponentManager.h:59
ComponentManager::terminate
StatusCode terminate() override
Initialization (from CONFIGURED to OFFLINE).
Definition: ComponentManager.h:50