| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

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

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# AppMgrRunable Class Reference

`#include <AppMgrRunable.h>`

Inheritance diagram for AppMgrRunable:

[legend]
Collaboration diagram for AppMgrRunable:

[legend]
List of all members.

## Detailed Description

Class definition of AppMgrRunable.

This is the default runnable of the application manager. The runable handles the actual run() implementation of the ApplicationMgr object. This implementation just calls ApplicationMgr::nextEvent(...).

History:

        +---------+----------------------------------------------+---------+
        |    Date |                 Comment                      | Who     |
        +---------+----------------------------------------------+---------+
        |13/12/00 | Initial version                              | M.Frank |
        +---------+----------------------------------------------+---------+

Author:
  Markus Frank

Version:
  1.0

Definition at line 30 of file AppMgrRunable.h.

## Public Member Functions
| AppMgrRunable (const std::string &nam, ISvcLocator *svcLoc)
| Standard Constructor.
virtual | ~AppMgrRunable ()
| Standard Destructor.
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface)
| Query interfaces of Interface.
virtual StatusCode | initialize ()
| IService implementation: initialize the service.
virtual StatusCode | start ()
| IService implementation: start the service.
virtual StatusCode | stop ()
| IService implementation: stop the service.
virtual StatusCode | finalize ()
| IService implementation: finalize the service.
virtual StatusCode | run ()
| IRunable implementation : Run the class implementation.
## Protected Attributes
IAppMgrUI * | m_appMgrUI
| Reference to application manager UI.
int | m_evtMax
| Number of events to be processed.
## Friends
class | SvcFactory< AppMgrRunable >
| Creator friend.

## Constructor & Destructor Documentation

AppMgrRunable::AppMgrRunable | ( | const std::string & | nam,
|  | ISvcLocator * | svcLoc |
| ) |  |  |

Standard Constructor.

Definition at line 16 of file AppMgrRunable.cpp.

    00017 : Service(nam, svcLoc), m_appMgrUI(0)
    00018 {
    00019   declareProperty("EvtMax", m_evtMax=0xFEEDBABE);
    00020 }

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

Standard Destructor.

Definition at line 23 of file AppMgrRunable.cpp.

    00024 {
    00025 }

## Member Function Documentation

StatusCode AppMgrRunable::queryInterface | ( | const InterfaceID & | riid,
|  | void ** | ppvInterface |
| ) |  |  | `[virtual]`

Query interfaces of Interface.

Parameters:

  | riid | ID of Interface to be retrieved
  | ppvUnknown | Pointer to Location for interface pointer

Reimplemented from Service.

Definition at line 28 of file AppMgrRunable.cpp.

References Service::addRef(), IID_IRunable, Service::queryInterface(), and StatusCode::SUCCESS.

    00028                                                                                        {
    00029   if ( riid == IID_IRunable )   {
    00030     *ppvInterface = (IRunable*)this;
    00031   }
    00032   else  {
    00033     return Service::queryInterface(riid, ppvInterface);
    00034   }
    00035   addRef();
    00036   return StatusCode::SUCCESS;
    00037 }

StatusCode AppMgrRunable::initialize | ( |  | ) | `[virtual]`

IService implementation: initialize the service.

Reimplemented from Service.

Definition at line 40 of file AppMgrRunable.cpp.

References IID_IAppMgrUI, IID_IProperty, Service::initialize(), StatusCode::isSuccess(), m_appMgrUI, m_evtMax, IInterface::queryInterface(), Service::serviceLocator(), and Service::setProperty().

    00040                                        {
    00041   StatusCode sc = Service::initialize();
    00042   if ( sc.isSuccess() )     {
    00043     sc = serviceLocator()->queryInterface(IID_IAppMgrUI, pp_cast<void>(&m_appMgrUI));
    00044     // get property from application manager
    00045     if ( m_evtMax == (int)0xFEEDBABE )   {
    00046       SmartIF<IProperty> props(IID_IProperty, serviceLocator());
    00047       setProperty(props->getProperty("EvtMax")).ignore();
    00048     }
    00049   }
    00050   return sc;
    00051 }

StatusCode AppMgrRunable::start | ( |  | ) | `[virtual]`

IService implementation: start the service.

Reimplemented from Service.

Definition at line 54 of file AppMgrRunable.cpp.

References Service::start().

    00054                                   {
    00055   StatusCode sc = Service::start();
    00056   return sc;
    00057 }

StatusCode AppMgrRunable::stop | ( |  | ) | `[virtual]`

IService implementation: stop the service.

Reimplemented from Service.

Definition at line 60 of file AppMgrRunable.cpp.

References Service::stop().

    00060                                  {
    00061   StatusCode sc = Service::stop();
    00062   return sc;
    00063 }

StatusCode AppMgrRunable::finalize | ( |  | ) | `[virtual]`

IService implementation: finalize the service.

Reimplemented from Service.

Definition at line 66 of file AppMgrRunable.cpp.

References Service::finalize(), m_appMgrUI, and IInterface::release().

    00066                                        {
    00067   StatusCode sc = Service::finalize();
    00068   if ( 0 != m_appMgrUI ) m_appMgrUI->release();
    00069   m_appMgrUI = 0;
    00070   return sc;
    00071 }

StatusCode AppMgrRunable::run | ( |  | ) | `[virtual]`

IRunable implementation : Run the class implementation.

Implements IRunable.

Definition at line 74 of file AppMgrRunable.cpp.

References StatusCode::FAILURE, m_appMgrUI, m_evtMax, and IAppMgrUI::nextEvent().

    00074                                 {
    00075   if ( 0 != m_appMgrUI )    {
    00076     // loop over the events
    00077     return m_appMgrUI->nextEvent(m_evtMax);
    00078   }
    00079   return StatusCode::FAILURE;
    00080 }

## Friends And Related Function Documentation

friend class SvcFactory< AppMgrRunable >`[friend]`

Creator friend.

Definition at line 32 of file AppMgrRunable.h.

## Member Data Documentation

IAppMgrUI* AppMgrRunable::m_appMgrUI`[protected]`

Reference to application manager UI.

Definition at line 36 of file AppMgrRunable.h.

Referenced by finalize(), initialize(), and run().

int AppMgrRunable::m_evtMax`[protected]`

Number of events to be processed.

Definition at line 38 of file AppMgrRunable.h.

Referenced by initialize(), and run().

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiSvc/v17r1/src/ApplicationMgr/AppMgrRunable.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiSvc/v17r1/src/ApplicationMgr/AppMgrRunable.cpp