| # Gaudi Framework, version v23r0 |

Home |  | Generated: Mon Jan 30 2012

Public Member Functions | Protected Attributes

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

                                                                                         :
      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 AlgorithmManager, and ServiceManager.

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 AlgorithmManager, and ServiceManager.

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

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 AlgorithmManager, and ServiceManager.

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 AlgorithmManager, and ServiceManager.

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 AlgorithmManager, and ServiceManager.

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 AlgorithmManager, and ServiceManager.

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_v23r0/GaudiKernel/GaudiKernel/ComponentManager.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r0/GaudiKernel/src/Lib/ComponentManager.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines