The Gaudi Framework  v33r1 (b1225454)
ComponentManager.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef COMPONENTMANAGER_H_
12 #define COMPONENTMANAGER_H_
13 
16 
17 class ApplicationMgr;
18 
25 class GAUDI_API ComponentManager : public CommonMessaging<implements<IComponentManager>> {
26 public:
30 
32  const InterfaceID& componentBaseInterface() const override;
33 
37  StatusCode queryInterface( const InterfaceID& iid, void** pinterface ) override;
38 
40  if ( !m_svcLocator ) m_svcLocator = m_application;
41  return m_svcLocator;
42  }
43 
45  StatusCode configure() override { return StatusCode::SUCCESS; }
46 
48  StatusCode initialize() override { return StatusCode::SUCCESS; }
49 
51  StatusCode start() override { return StatusCode::SUCCESS; }
52 
54  StatusCode stop() override { return StatusCode::SUCCESS; }
55 
57  StatusCode finalize() override { return StatusCode::SUCCESS; }
58 
60  StatusCode terminate() override { return StatusCode::SUCCESS; }
61 
64 
66  StatusCode restart() override { return StatusCode::SUCCESS; }
67 
69  Gaudi::StateMachine::State FSMState() const override { return m_stateful->FSMState(); }
70 
73  Gaudi::StateMachine::State targetFSMState() const override { return m_stateful->targetFSMState(); }
74 
75 protected:
78 
81 
84 
87 
89 };
90 
91 #endif /* COMPONENTMANAGER_H_ */
Gaudi::StateMachine::State targetFSMState() const override
When we are in the middle of a transition, get the state where the transition is leading us.
Base class for a component manager.
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm,...
Definition: StateMachine.h:22
SmartIF< IStateful > m_stateful
Pointer to the IStateful interface of the owner.
StatusCode finalize() override
Finalize (from INITIALIZED to CONFIGURED).
Interface ID class.
Definition: IInterface.h:39
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:61
Definition of the basic interface.
Definition: IInterface.h:254
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).
The Application Manager class.
StatusCode start() override
Start (from INITIALIZED to RUNNING).
StatusCode configure() override
Configuration (from OFFLINE to CONFIGURED).
SmartIF< ISvcLocator > & serviceLocator() const override
#define GAUDI_API
Definition: Kernel.h:81
StatusCode stop() override
Stop (from RUNNING to INITIALIZED).
Gaudi::StateMachine::State FSMState() const override
Get the current state.
StatusCode terminate() override
Initialization (from CONFIGURED to OFFLINE).