| # Gaudi Framework, version v21r9 |

Home |  | Generated: 3 May 2010

# FastContainersSvc Class Reference

Data service for objects of type TransientFastContainer. More...

`#include <FastContainersSvc/FastContainersSvc.h>`

Inheritance diagram for FastContainersSvc:

[legend]
Collaboration diagram for FastContainersSvc:

[legend]

List of all members.

## Public Member Functions
virtual StatusCode | initialize ()
| Initialize the service.
virtual StatusCode | reinitialize ()
| Initialize the service.
virtual StatusCode | finalize ()
| Finalize the service.
virtual void | resetStore ()
| Reset all the instances of TransientFastContainerBase in the store.
virtual void | handle (const Incident &incident)
| Handle the new incident.
## Protected Member Functions
| FastContainersSvc (const std::string &name, ISvcLocator *svc)
| Standard service constructor.
virtual | ~FastContainersSvc ()
| Destructor.
## Private Attributes
std::string | m_rootDirName
| Name of the root node (property "RootDirName").
FastContainersSvc::StoreResetter | m_storeResetter
| Internal data store agent used to find and clear objects of type TransientFastContainerBase.
## Friends
class | SvcFactory< FastContainersSvc >
## Classes
class | StoreResetter
| Internal data store agent used to find and clear objects of type TransientFastContainerBase. More...

## Detailed Description

Data service for objects of type TransientFastContainer.

Pointers to objects in this transient store are always valid. The instances of TransientFastContainer are cleared before each event.

Author:
  Marco Clemencic

Date:
  2006-05-03

Definition at line 22 of file FastContainersSvc.h.

## Constructor & Destructor Documentation

FastContainersSvc::FastContainersSvc | ( | const std::string & | name,
|  | ISvcLocator * | svc |
| ) |  |  | `[protected]`

Standard service constructor.

Definition at line 26 of file FastContainersSvc.cpp.

    00026                                                                           :
    00027   base_class(name,svc)
    00028 {
    00029   declareProperty("RootDirName", m_rootDirName = "fc" );
    00030   m_rootName = "/" + m_rootDirName;
    00031 }

FastContainersSvc::~FastContainersSvc | ( |  | ) | `[protected, virtual]`

Destructor.

Definition at line 36 of file FastContainersSvc.cpp.

    00036 {}

## Member Function Documentation

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

Initialize the service.

Reimplemented from DataSvc.

Definition at line 41 of file FastContainersSvc.cpp.

    00041                                          {
    00042   // initialize base class
    00043   StatusCode status = DataSvc::initialize();
    00044   if (!status.isSuccess()) return status;
    00045
    00046   MsgStream log(msgSvc(), name());
    00047   // create root node
    00048   log << MSG::VERBOSE << "creating root node" << endmsg;
    00049   status = setRoot(m_rootName,new DataObject);
    00050   if (!status.isSuccess()){
    00051     log << MSG::FATAL << "failed to create the root node" << endmsg;
    00052     return status;
    00053   }
    00054
    00055   // register to the incident service
    00056   log << MSG::VERBOSE << "registering to the incident service for " << IncidentType::BeginEvent << endmsg;
    00057   m_incidentSvc->addListener(this,IncidentType::BeginEvent);
    00058
    00059   return status;
    00060 }

StatusCode FastContainersSvc::reinitialize | ( |  | ) | `[virtual]`

Initialize the service.

Reimplemented from DataSvc.

Definition at line 65 of file FastContainersSvc.cpp.

    00065                                            {
    00066   // do nothing
    00067   return StatusCode::SUCCESS;
    00068 }

StatusCode FastContainersSvc::finalize | ( | void |  | ) | `[virtual]`

Finalize the service.

Reimplemented from DataSvc.

Definition at line 73 of file FastContainersSvc.cpp.

    00073                                        {
    00074   MsgStream log(msgSvc(), name());
    00075   // de-register to the incident service
    00076   log << MSG::VERBOSE << "de-registering from the incident service" << endmsg;
    00077   m_incidentSvc->removeListener(this,IncidentType::BeginEvent);
    00078
    00079   return DataSvc::finalize();
    00080 }

void FastContainersSvc::resetStore | ( |  | ) | `[virtual]`

Reset all the instances of TransientFastContainerBase in the store.

Definition at line 85 of file FastContainersSvc.cpp.

    00085                                    {
    00086   traverseTree(&m_storeResetter).ignore();
    00087 }

void FastContainersSvc::handle | ( | const Incident & | incident | ) | `[virtual]`

Handle the new incident.

Implements IIncidentListener.

Definition at line 92 of file FastContainersSvc.cpp.

    00092                                                        {
    00093   if (incident.type() == IncidentType::BeginEvent)
    00094     resetStore();
    00095 }

## Friends And Related Function Documentation

friend class SvcFactory< FastContainersSvc >`[friend]`

Definition at line 53 of file FastContainersSvc.h.

## Member Data Documentation

std::string FastContainersSvc::m_rootDirName`[private]`

Name of the root node (property "RootDirName").

Definition at line 56 of file FastContainersSvc.h.

FastContainersSvc::StoreResetter FastContainersSvc::m_storeResetter`[private]`

Internal data store agent used to find and clear objects of type TransientFastContainerBase.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r9/GaudiSvc/src/FastContainersSvc/FastContainersSvc.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r9/GaudiSvc/src/FastContainersSvc/FastContainersSvc.cpp