| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# ComponentManager Class Reference

Base class for a component manager. More...

`#include <ComponentManager.h>`

Inheritance diagram for ComponentManager:

[legend]
Collaboration diagram for ComponentManager:

[legend]

List of all members.

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

## 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.

    00012                                                                                      :
    00013   m_application(application), m_stateful(application), m_basicInterfaceId(baseIID)
    00014 {
    00015 }

ComponentManager::~ComponentManager | ( |  | ) | `[virtual]`

Virtual destructor.

Definition at line 25 of file ComponentManager.cpp.

    00025                                     {
    00026 }

## 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.

    00019                                                                   {
    00020   return m_basicInterfaceId;
    00021 }

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 extends1< ComponentManager, IAlgManager >, and extends2< ComponentManager, ISvcManager, ISvcLocator >.

Definition at line 30 of file ComponentManager.cpp.

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

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.

    00032                                                        {
    00033     if (!m_svcLocator) m_svcLocator = m_application;
    00034     return m_svcLocator;
    00035   }

virtual StatusCode ComponentManager::configure | ( |  | ) | `[inline, virtual]`

Configuration (from OFFLINE to CONFIGURED).

Implements IStateful.

Definition at line 38 of file ComponentManager.h.

    00038 {return StatusCode::SUCCESS;}

virtual StatusCode ComponentManager::initialize | ( |  | ) | `[inline, virtual]`

Initialization (from CONFIGURED to INITIALIZED).

Implements IStateful.

Reimplemented in AlgorithmManager, and ServiceManager.

Definition at line 41 of file ComponentManager.h.

    00041 {return StatusCode::SUCCESS;}

virtual StatusCode ComponentManager::start | ( |  | ) | `[inline, virtual]`

Start (from INITIALIZED to RUNNING).

Implements IStateful.

Reimplemented in AlgorithmManager, and ServiceManager.

Definition at line 44 of file ComponentManager.h.

    00044 {return StatusCode::SUCCESS;}

virtual StatusCode ComponentManager::stop | ( |  | ) | `[inline, virtual]`

Stop (from RUNNING to INITIALIZED).

Implements IStateful.

Reimplemented in AlgorithmManager, and ServiceManager.

Definition at line 47 of file ComponentManager.h.

    00047 {return StatusCode::SUCCESS;}

virtual StatusCode ComponentManager::finalize | ( |  | ) | `[inline, virtual]`

Finalize (from INITIALIZED to CONFIGURED).

Implements IStateful.

Reimplemented in AlgorithmManager, and ServiceManager.

Definition at line 50 of file ComponentManager.h.

    00050 {return StatusCode::SUCCESS;}

virtual StatusCode ComponentManager::terminate | ( |  | ) | `[inline, virtual]`

Initialization (from CONFIGURED to OFFLINE).

Implements IStateful.

Definition at line 53 of file ComponentManager.h.

    00053 {return StatusCode::SUCCESS;}

virtual StatusCode ComponentManager::reinitialize | ( |  | ) | `[inline, virtual]`

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

Implements IStateful.

Reimplemented in AlgorithmManager, and ServiceManager.

Definition at line 57 of file ComponentManager.h.

    00057 {return StatusCode::SUCCESS;}

virtual StatusCode ComponentManager::restart | ( |  | ) | `[inline, virtual]`

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Implements IStateful.

Reimplemented in AlgorithmManager, and ServiceManager.

Definition at line 60 of file ComponentManager.h.

    00060 {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.

    00063 {return m_stateful->FSMState();}

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.

    00067 {return m_stateful->targetFSMState();}

## Member Data Documentation

SmartIF<IInterface> ComponentManager::m_application`[protected]`

Pointer to the owner of the manager.

Definition at line 72 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.

InterfaceID ComponentManager::m_basicInterfaceId`[protected]`

Basic interface id of the managed components.

Definition at line 78 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_v21r10p1/GaudiKernel/GaudiKernel/ComponentManager.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r10p1/GaudiKernel/src/Lib/ComponentManager.cpp