Loading [MathJax]/jax/input/TeX/config.js
The Gaudi Framework  master (d98a2936)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ComponentManager.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 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 #pragma once
12 
15 
16 class ApplicationMgr;
17 
24 class GAUDI_API ComponentManager : public CommonMessaging<implements<IComponentManager>> {
25 public:
29 
31  const InterfaceID& componentBaseInterface() const override;
32 
36  StatusCode queryInterface( const InterfaceID& iid, void** pinterface ) override;
40  void const* i_cast( const InterfaceID& iid ) const override;
41 
43  if ( !m_svcLocator ) m_svcLocator = m_application;
44  return m_svcLocator;
45  }
46 
48  StatusCode configure() override { return StatusCode::SUCCESS; }
49 
51  StatusCode initialize() override { return StatusCode::SUCCESS; }
52 
54  StatusCode start() override { return StatusCode::SUCCESS; }
55 
57  StatusCode stop() override { return StatusCode::SUCCESS; }
58 
60  StatusCode finalize() override { return StatusCode::SUCCESS; }
61 
63  StatusCode terminate() override { return StatusCode::SUCCESS; }
64 
67 
69  StatusCode restart() override { return StatusCode::SUCCESS; }
70 
72  Gaudi::StateMachine::State FSMState() const override { return m_stateful->FSMState(); }
73 
76  Gaudi::StateMachine::State targetFSMState() const override { return m_stateful->targetFSMState(); }
77 
78 protected:
81 
84 
87 
90 
92 };
ComponentManager::initialize
StatusCode initialize() override
Initialization (from CONFIGURED to INITIALIZED).
Definition: ComponentManager.h:51
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:76
ComponentManager
Definition: ComponentManager.h:24
ComponentManager::restart
StatusCode restart() override
Initialization (from RUNNING to RUNNING, via INITIALIZED).
Definition: ComponentManager.h:69
Gaudi::StateMachine::State
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm,...
Definition: StateMachine.h:21
ComponentManager::m_application
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
Definition: ComponentManager.h:80
StatusCode
Definition: StatusCode.h:64
ComponentManager::configure
StatusCode configure() override
Configuration (from OFFLINE to CONFIGURED).
Definition: ComponentManager.h:48
CommonMessaging
Definition: CommonMessaging.h:65
ComponentManager::m_basicInterfaceId
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
Definition: ComponentManager.h:86
SmartIF< ISvcLocator >
CommonMessaging.h
ComponentManager::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Definition: ComponentManager.h:42
ComponentManager::m_stateful
SmartIF< IStateful > m_stateful
Pointer to the IStateful interface of the owner.
Definition: ComponentManager.h:83
ComponentManager::start
StatusCode start() override
Start (from INITIALIZED to RUNNING).
Definition: ComponentManager.h:54
ComponentManager::terminate
StatusCode terminate() override
Initialization (from CONFIGURED to OFFLINE).
Definition: ComponentManager.h:63
ComponentManager::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)
Definition: ComponentManager.h:89
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:99
ComponentManager::stop
StatusCode stop() override
Stop (from RUNNING to INITIALIZED).
Definition: ComponentManager.h:57
IComponentManager.h
ApplicationMgr
Definition: ApplicationMgr.h:54
IInterface
Definition: IInterface.h:225
ComponentManager::reinitialize
StatusCode reinitialize() override
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
Definition: ComponentManager.h:66
InterfaceID
Definition: IInterface.h:38
ComponentManager::finalize
StatusCode finalize() override
Finalize (from INITIALIZED to CONFIGURED).
Definition: ComponentManager.h:60
ComponentManager::ApplicationMgr
friend ApplicationMgr
Definition: ComponentManager.h:91
gaudirun.application
application
Definition: gaudirun.py:323
ComponentManager::FSMState
Gaudi::StateMachine::State FSMState() const override
Get the current state.
Definition: ComponentManager.h:72
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:49