| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
ComponentManager Class Reference

Base class for a component manager. More...

`#include <ComponentManager.h>`

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

## Public Member Functions
| ComponentManager (IInterface *application, const InterfaceID &baseIID)
| Constructor.
virtual const InterfaceID & | componentBaseInterface () const
| Basic interface id of the managed components.
virtual | ~ComponentManager ()
| Virtual destructor.
StatusCode | queryInterface (const InterfaceID &iid, void **pinterface)
| Specialized queryInterface implementation.
virtual SmartIF< ISvcLocator > & | serviceLocator () const
| Needed to locate the message service.
virtual StatusCode | configure ()
| Configuration (from OFFLINE to CONFIGURED).
virtual StatusCode | initialize ()
| Initialization (from CONFIGURED to INITIALIZED).
virtual StatusCode | start ()
| Start (from INITIALIZED to RUNNING).
virtual StatusCode | stop ()
| Stop (from RUNNING to INITIALIZED).
virtual StatusCode | finalize ()
| Finalize (from INITIALIZED to CONFIGURED).
virtual StatusCode | terminate ()
| Initialization (from CONFIGURED to OFFLINE).
virtual StatusCode | reinitialize ()
| Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
virtual StatusCode | restart ()
| Initialization (from RUNNING to RUNNING, via INITIALIZED).
virtual Gaudi::StateMachine::State | FSMState () const
| Get the current state.
virtual Gaudi::StateMachine::State | targetFSMState () const
| When we are in the middle of a transition, get the state where the transition is leading us.
Public Member Functions inherited from CommonMessaging< implements1< IComponentManager > >
| CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
| Templated constructor with 3 arguments.
| CommonMessaging (const A1 &a1, const A2 &a2)
| Templated constructor with 2 arguments.
| CommonMessaging (const A1 &a1)
| Templated constructor with 1 argument.
| CommonMessaging ()
| Default constructor.
virtual | ~CommonMessaging ()
| Virtual destructor.
virtual const std::string & | name () const =0
| This is needed to avoid ambiguous calls to name()
SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service.
MsgStream & | msgStream () const
| Return an uninitialized MsgStream.
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts.
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS)
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL)
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR)
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR)
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING)
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO)
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG)
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE)
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO)
MSG::Level | msgLevel () const
| get the output level from the embedded MsgStream
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream

## Protected Attributes
SmartIF< IInterface > | m_application
| Pointer to the owner of the manager.
SmartIF< IStateful > | m_stateful
| Pointer to the IStateful interface of the owner.
InterfaceID | m_basicInterfaceId
| Basic interface id of the managed components.
SmartIF< ISvcLocator > | m_svcLocator
| Service locator (needed to access the MessageSvc)
Protected Attributes inherited from CommonMessaging< implements1< IComponentManager > >
SmartIF< IMessageSvc > | m_msgsvc
| Pointer to the message service;.
std::auto_ptr< MsgStream > | m_msgStream
| The predefined message stream.
bool | m_streamWithService
| Flag to create a new MsgStream if it was created without the message service.

## Additional Inherited Members
Public Types inherited from CommonMessaging< implements1< IComponentManager > >
typedef CommonMessaging | base_class
Static Public Member Functions inherited from IInterface
static const InterfaceID & | interfaceID ()
| Return an instance of InterfaceID identifying the interface.
Protected Member Functions inherited from CommonMessaging< implements1< IComponentManager > >
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream.

## Detailed Description

Base class for a component manager.

Author
  Marco Clemencic

Definition at line 14 of file ComponentManager.h.

## Constructor & Destructor Documentation

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

Constructor.

Parameters

  application | the manager of managers

Definition at line 12 of file ComponentManager.cpp.

:
m_application(application), m_stateful(application), m_basicInterfaceId(baseIID)
{
}

ComponentManager::~ComponentManager | ( |  | ) |
| virtual

Virtual destructor.

Definition at line 25 of file ComponentManager.cpp.

{
}

## Member Function Documentation

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

Basic interface id of the managed components.

Implements IComponentManager.

Definition at line 19 of file ComponentManager.cpp.

{
return m_basicInterfaceId;
}

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

Configuration (from OFFLINE to CONFIGURED).

Implements IStateful.

Definition at line 38 of file ComponentManager.h.

{return StatusCode::SUCCESS;}

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

Finalize (from INITIALIZED to CONFIGURED).

Implements IStateful.

Reimplemented in ServiceManager, and AlgorithmManager.

Definition at line 50 of file ComponentManager.h.

{return StatusCode::SUCCESS;}

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

Get the current state.

Implements IStateful.

Definition at line 63 of file ComponentManager.h.

{return m_stateful->FSMState();}

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

Initialization (from CONFIGURED to INITIALIZED).

Implements IStateful.

Reimplemented in ServiceManager, and AlgorithmManager.

Definition at line 41 of file ComponentManager.h.

{return StatusCode::SUCCESS;}

StatusCode ComponentManager::queryInterface | ( | const InterfaceID & | iid,
|  | void ** | pinterface
| ) |  |
| virtual

Specialized queryInterface implementation.

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

Implements IInterface.

Reimplemented in extends2< ComponentManager, ISvcManager, ISvcLocator >, and extends1< ComponentManager, IAlgManager >.

Definition at line 30 of file ComponentManager.cpp.

{
// try local interfaces
StatusCode sc = base_class::queryInterface(iid,pinterface);
if (sc.isSuccess()) return sc;
// fall back on the owner
return m_application->queryInterface(iid, pinterface);
}

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

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

Implements IStateful.

Reimplemented in ServiceManager, and AlgorithmManager.

Definition at line 57 of file ComponentManager.h.

{return StatusCode::SUCCESS;}

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

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Implements IStateful.

Reimplemented in ServiceManager, and AlgorithmManager.

Definition at line 60 of file ComponentManager.h.

{return StatusCode::SUCCESS;}

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

Needed to locate the message service.

Implements CommonMessaging< implements1< IComponentManager > >.

Reimplemented in ServiceManager.

Definition at line 32 of file ComponentManager.h.

{
if (!m_svcLocator) m_svcLocator = m_application;
return m_svcLocator;
}

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

Start (from INITIALIZED to RUNNING).

Implements IStateful.

Reimplemented in ServiceManager, and AlgorithmManager.

Definition at line 44 of file ComponentManager.h.

{return StatusCode::SUCCESS;}

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

Stop (from RUNNING to INITIALIZED).

Implements IStateful.

Reimplemented in ServiceManager, and AlgorithmManager.

Definition at line 47 of file ComponentManager.h.

{return StatusCode::SUCCESS;}

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

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().

Implements IStateful.

Definition at line 67 of file ComponentManager.h.

{return m_stateful->targetFSMState();}

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

Initialization (from CONFIGURED to OFFLINE).

Implements IStateful.

Definition at line 53 of file ComponentManager.h.

{return StatusCode::SUCCESS;}

## Member Data Documentation

SmartIF<IInterface> ComponentManager::m_application
| protected

Pointer to the owner of the manager.

Definition at line 72 of file ComponentManager.h.

InterfaceID ComponentManager::m_basicInterfaceId
| protected

Basic interface id of the managed components.

Definition at line 78 of file ComponentManager.h.

SmartIF<IStateful> ComponentManager::m_stateful
| protected

Pointer to the IStateful interface of the owner.

Definition at line 75 of file ComponentManager.h.

SmartIF<ISvcLocator> ComponentManager::m_svcLocator
| mutable protected

Service locator (needed to access the MessageSvc)

Definition at line 81 of file ComponentManager.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiKernel/GaudiKernel/ComponentManager.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiKernel/src/Lib/ComponentManager.cpp