The Gaudi Framework  master (37c0b60a)
ComponentManager Class Reference

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/ComponentManager.h>

Inheritance diagram for ComponentManager:
Collaboration diagram for ComponentManager:

Public Member Functions

 ComponentManager (IInterface *application, const InterfaceID &baseIID)
 Constructor. More...
 
const InterfaceIDcomponentBaseInterface () const override
 Basic interface id of the managed components. More...
 
StatusCode queryInterface (const InterfaceID &iid, void **pinterface) override
 Specialized queryInterface implementation. More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 
StatusCode configure () override
 Configuration (from OFFLINE to CONFIGURED). More...
 
StatusCode initialize () override
 Initialization (from CONFIGURED to INITIALIZED). More...
 
StatusCode start () override
 Start (from INITIALIZED to RUNNING). More...
 
StatusCode stop () override
 Stop (from RUNNING to INITIALIZED). More...
 
StatusCode finalize () override
 Finalize (from INITIALIZED to CONFIGURED). More...
 
StatusCode terminate () override
 Initialization (from CONFIGURED to OFFLINE). More...
 
StatusCode reinitialize () override
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
StatusCode restart () override
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
Gaudi::StateMachine::State FSMState () const override
 Get the current state. More...
 
Gaudi::StateMachine::State targetFSMState () const override
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
- Public Member Functions inherited from CommonMessaging< implements< IComponentManager > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 

Protected Attributes

SmartIF< IInterfacem_application
 Pointer to the owner of the manager. More...
 
SmartIF< IStatefulm_stateful
 Pointer to the IStateful interface of the owner. More...
 
InterfaceID m_basicInterfaceId
 Basic interface id of the managed components. More...
 
SmartIF< ISvcLocatorm_svcLocator
 Service locator (needed to access the MessageSvc) More...
 
friend ApplicationMgr
 

Additional Inherited Members

- Public Types inherited from CommonMessaging< implements< IComponentManager > >
using base_class = CommonMessaging
 
- Protected Member Functions inherited from CommonMessaging< implements< IComponentManager > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Detailed Description

Base class for a component manager.

Author
Marco Clemencic

Definition at line 25 of file ComponentManager.h.

Constructor & Destructor Documentation

◆ ComponentManager()

ComponentManager::ComponentManager ( IInterface application,
const InterfaceID baseIID 
)

Constructor.

Parameters
applicationthe manager of managers

Definition at line 22 of file ComponentManager.cpp.

Member Function Documentation

◆ componentBaseInterface()

const InterfaceID & ComponentManager::componentBaseInterface ( ) const
override

Basic interface id of the managed components.

Definition at line 27 of file ComponentManager.cpp.

27 { return m_basicInterfaceId; }

◆ configure()

StatusCode ComponentManager::configure ( )
inlineoverride

Configuration (from OFFLINE to CONFIGURED).

Definition at line 45 of file ComponentManager.h.

45 { return StatusCode::SUCCESS; }

◆ finalize()

StatusCode ComponentManager::finalize ( )
inlineoverride

Finalize (from INITIALIZED to CONFIGURED).

Definition at line 57 of file ComponentManager.h.

57 { return StatusCode::SUCCESS; }

◆ FSMState()

Gaudi::StateMachine::State ComponentManager::FSMState ( ) const
inlineoverride

Get the current state.

Definition at line 69 of file ComponentManager.h.

69 { return m_stateful->FSMState(); }

◆ initialize()

StatusCode ComponentManager::initialize ( )
inlineoverride

Initialization (from CONFIGURED to INITIALIZED).

Definition at line 48 of file ComponentManager.h.

48 { return StatusCode::SUCCESS; }

◆ queryInterface()

StatusCode ComponentManager::queryInterface ( const InterfaceID iid,
void **  pinterface 
)
override

Specialized queryInterface implementation.

If an interface is not fount in the implemented ones, we fall back on the owner.

Definition at line 31 of file ComponentManager.cpp.

31  {
32  // try local interfaces
33  StatusCode sc = base_class::queryInterface( iid, pinterface );
34  // fall back on the owner, if local interface didn't match...
35  return sc.isSuccess() ? sc : m_application->queryInterface( iid, pinterface );
36 }

◆ reinitialize()

StatusCode ComponentManager::reinitialize ( )
inlineoverride

Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).

Definition at line 63 of file ComponentManager.h.

63 { return StatusCode::SUCCESS; }

◆ restart()

StatusCode ComponentManager::restart ( )
inlineoverride

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Definition at line 66 of file ComponentManager.h.

66 { return StatusCode::SUCCESS; }

◆ serviceLocator()

SmartIF<ISvcLocator>& ComponentManager::serviceLocator ( ) const
inlineoverride

Definition at line 39 of file ComponentManager.h.

39  {
41  return m_svcLocator;
42  }

◆ start()

StatusCode ComponentManager::start ( )
inlineoverride

Start (from INITIALIZED to RUNNING).

Definition at line 51 of file ComponentManager.h.

51 { return StatusCode::SUCCESS; }

◆ stop()

StatusCode ComponentManager::stop ( )
inlineoverride

Stop (from RUNNING to INITIALIZED).

Definition at line 54 of file ComponentManager.h.

54 { return StatusCode::SUCCESS; }

◆ targetFSMState()

Gaudi::StateMachine::State ComponentManager::targetFSMState ( ) const
inlineoverride

When we are in the middle of a transition, get the state where the transition is leading us.

Otherwise it returns the same state as state().

Definition at line 73 of file ComponentManager.h.

73 { return m_stateful->targetFSMState(); }

◆ terminate()

StatusCode ComponentManager::terminate ( )
inlineoverride

Initialization (from CONFIGURED to OFFLINE).

Definition at line 60 of file ComponentManager.h.

60 { return StatusCode::SUCCESS; }

Member Data Documentation

◆ ApplicationMgr

friend ComponentManager::ApplicationMgr
protected

Definition at line 88 of file ComponentManager.h.

◆ m_application

SmartIF<IInterface> ComponentManager::m_application
protected

Pointer to the owner of the manager.

Definition at line 77 of file ComponentManager.h.

◆ m_basicInterfaceId

InterfaceID ComponentManager::m_basicInterfaceId
protected

Basic interface id of the managed components.

Definition at line 83 of file ComponentManager.h.

◆ m_stateful

SmartIF<IStateful> ComponentManager::m_stateful
protected

Pointer to the IStateful interface of the owner.

Definition at line 80 of file ComponentManager.h.

◆ m_svcLocator

SmartIF<ISvcLocator> ComponentManager::m_svcLocator
mutableprotected

Service locator (needed to access the MessageSvc)

Definition at line 86 of file ComponentManager.h.


The documentation for this class was generated from the following files:
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
ComponentManager::m_application
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
Definition: ComponentManager.h:77
StatusCode
Definition: StatusCode.h:65
ComponentManager::m_basicInterfaceId
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
Definition: ComponentManager.h:83
ComponentManager::m_stateful
SmartIF< IStateful > m_stateful
Pointer to the IStateful interface of the owner.
Definition: ComponentManager.h:80
ComponentManager::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)
Definition: ComponentManager.h:86
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
gaudirun.application
application
Definition: gaudirun.py:323