| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Protected Attributes | List of all members
ComponentManager Class Reference

Base class for a component manager. More...

`#include <GaudiKernel/ComponentManager.h>`

Inheritance diagram for ComponentManager:
[legend]
Collaboration diagram for ComponentManager:
[legend]

## Public Member Functions
| ComponentManager (IInterface *application, const InterfaceID &baseIID)
| Constructor. More...
const InterfaceID & | componentBaseInterface () 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...
MSG::Level | outputLevel () const
| Backward compatibility function for getting the output level. More...
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...

## Protected Attributes
SmartIF< IInterface > | m_application
| Pointer to the owner of the manager. More...
SmartIF< IStateful > | m_stateful
| Pointer to the IStateful interface of the owner. More...
InterfaceID | m_basicInterfaceId
| Basic interface id of the managed components. More...
SmartIF< ISvcLocator > | m_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 15 of file ComponentManager.h.

## Constructor & Destructor Documentation

## ◆ ComponentManager()

ComponentManager::ComponentManager | ( | IInterface * | application,
|  | const InterfaceID & | baseIID
| ) |  |

Constructor.

Parameters

  application | the manager of managers

Definition at line 12 of file ComponentManager.cpp.

13 : m_application( application ), m_stateful( application ), m_basicInterfaceId( baseIID ) {}
ComponentManager::m_stateful
SmartIF< IStateful > m_stateful
Pointer to the IStateful interface of the owner.
Definition: ComponentManager.h:70
ComponentManager::m_basicInterfaceId
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
Definition: ComponentManager.h:73
ComponentManager::m_application
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
Definition: ComponentManager.h:67
gaudirun.application
application
Definition: gaudirun.py:295

## Member Function Documentation

## ◆ componentBaseInterface()

const InterfaceID & ComponentManager::componentBaseInterface | ( |  | ) | const
| override

Basic interface id of the managed components.

Definition at line 17 of file ComponentManager.cpp.

17 { return m_basicInterfaceId; }
ComponentManager::m_basicInterfaceId
InterfaceID m_basicInterfaceId
Basic interface id of the managed components.
Definition: ComponentManager.h:73

## ◆ configure()

StatusCode ComponentManager::configure | ( |  | ) |
| inline override

Configuration (from OFFLINE to CONFIGURED).

Definition at line 35 of file ComponentManager.h.

35 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ finalize()

StatusCode ComponentManager::finalize | ( |  | ) |
| inline override

Finalize (from INITIALIZED to CONFIGURED).

Definition at line 47 of file ComponentManager.h.

47 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ FSMState()

Gaudi::StateMachine::State ComponentManager::FSMState | ( |  | ) | const
| inline override

Get the current state.

Definition at line 59 of file ComponentManager.h.

59 { return m_stateful->FSMState(); }
ComponentManager::m_stateful
SmartIF< IStateful > m_stateful
Pointer to the IStateful interface of the owner.
Definition: ComponentManager.h:70
IStateful::FSMState
virtual Gaudi::StateMachine::State FSMState() const =0
Get the current state.

## ◆ initialize()

StatusCode ComponentManager::initialize | ( |  | ) |
| inline override

Initialization (from CONFIGURED to INITIALIZED).

Definition at line 38 of file ComponentManager.h.

38 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ 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 21 of file ComponentManager.cpp.

21 {
22 // try local interfaces
23 StatusCode sc = base_class::queryInterface( iid, pinterface );
24 // fall back on the owner, if local interface didn't match...
25 return sc.isSuccess() ? sc : m_application->queryInterface( iid, pinterface );
26 }
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
ComponentManager::m_application
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
Definition: ComponentManager.h:67
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
IInterface::queryInterface
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.

## ◆ reinitialize()

StatusCode ComponentManager::reinitialize | ( |  | ) |
| inline override

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

Definition at line 53 of file ComponentManager.h.

53 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ restart()

StatusCode ComponentManager::restart | ( |  | ) |
| inline override

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Definition at line 56 of file ComponentManager.h.

56 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ serviceLocator()

SmartIF<ISvcLocator>& ComponentManager::serviceLocator | ( |  | ) | const
| inline override

Definition at line 29 of file ComponentManager.h.

29 {
30 if ( !m_svcLocator ) m_svcLocator = m_application;
31 return m_svcLocator;
32 }
ComponentManager::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)
Definition: ComponentManager.h:76
ComponentManager::m_application
SmartIF< IInterface > m_application
Pointer to the owner of the manager.
Definition: ComponentManager.h:67

## ◆ start()

StatusCode ComponentManager::start | ( |  | ) |
| inline override

Start (from INITIALIZED to RUNNING).

Definition at line 41 of file ComponentManager.h.

41 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ stop()

StatusCode ComponentManager::stop | ( |  | ) |
| inline override

Stop (from RUNNING to INITIALIZED).

Definition at line 44 of file ComponentManager.h.

44 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ targetFSMState()

Gaudi::StateMachine::State ComponentManager::targetFSMState | ( |  | ) | const
| inline override

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 63 of file ComponentManager.h.

63 { return m_stateful->targetFSMState(); }
IStateful::targetFSMState
virtual Gaudi::StateMachine::State targetFSMState() const =0
When we are in the middle of a transition, get the state where the transition is leading us.
ComponentManager::m_stateful
SmartIF< IStateful > m_stateful
Pointer to the IStateful interface of the owner.
Definition: ComponentManager.h:70

## ◆ terminate()

StatusCode ComponentManager::terminate | ( |  | ) |
| inline override

Initialization (from CONFIGURED to OFFLINE).

Definition at line 50 of file ComponentManager.h.

50 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## Member Data Documentation

## ◆ ApplicationMgr

friend ComponentManager::ApplicationMgr
| protected

Definition at line 78 of file ComponentManager.h.

## ◆ m_application

SmartIF<IInterface> ComponentManager::m_application
| protected

Pointer to the owner of the manager.

Definition at line 67 of file ComponentManager.h.

## ◆ m_basicInterfaceId

InterfaceID ComponentManager::m_basicInterfaceId
| protected

Basic interface id of the managed components.

Definition at line 73 of file ComponentManager.h.

## ◆ m_stateful

SmartIF<IStateful> ComponentManager::m_stateful
| protected

Pointer to the IStateful interface of the owner.

Definition at line 70 of file ComponentManager.h.

## ◆ m_svcLocator

SmartIF<ISvcLocator> ComponentManager::m_svcLocator
| mutable protected

Service locator (needed to access the MessageSvc)

Definition at line 76 of file ComponentManager.h.

The documentation for this class was generated from the following files:

- GaudiKernel/GaudiKernel/ComponentManager.h
- GaudiKernel/src/Lib/ComponentManager.cpp