Gaudi Framework, version v22r4

Home   Generated: Fri Sep 2 2011
Classes | Public Member Functions | Protected Member Functions | Private Attributes | Friends

FastContainersSvc Class Reference

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

#include <FastContainersSvc/FastContainersSvc.h>

Inheritance diagram for FastContainersSvc:
Inheritance graph
[legend]
Collaboration diagram for FastContainersSvc:
Collaboration graph
[legend]

List of all members.

Classes

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

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

Friends

class SvcFactory< FastContainersSvc >

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.

                                                                          :
  base_class(name,svc)
{
  declareProperty("RootDirName", m_rootDirName = "fc" );
  m_rootName = "/" + m_rootDirName;
}
FastContainersSvc::~FastContainersSvc (  ) [protected, virtual]

Destructor.

Definition at line 36 of file FastContainersSvc.cpp.

{}

Member Function Documentation

StatusCode FastContainersSvc::finalize ( void   ) [virtual]

Finalize the service.

Reimplemented from DataSvc.

Definition at line 73 of file FastContainersSvc.cpp.

                                       {
  MsgStream log(msgSvc(), name());
  // de-register to the incident service
  log << MSG::VERBOSE << "de-registering from the incident service" << endmsg;
  m_incidentSvc->removeListener(this,IncidentType::BeginEvent);

  return DataSvc::finalize();
}
void FastContainersSvc::handle ( const Incident incident ) [virtual]

Handle the new incident.

Implements IIncidentListener.

Definition at line 92 of file FastContainersSvc.cpp.

                                                       {
  if (incident.type() == IncidentType::BeginEvent)
    resetStore();
}
StatusCode FastContainersSvc::initialize ( void   ) [virtual]

Initialize the service.

Reimplemented from DataSvc.

Definition at line 41 of file FastContainersSvc.cpp.

                                         {
  // initialize base class
  StatusCode status = DataSvc::initialize();
  if (!status.isSuccess()) return status;

  MsgStream log(msgSvc(), name());
  // create root node
  log << MSG::VERBOSE << "creating root node" << endmsg;
  status = setRoot(m_rootName,new DataObject);
  if (!status.isSuccess()){
    log << MSG::FATAL << "failed to create the root node" << endmsg;
    return status;
  }

  // register to the incident service
  log << MSG::VERBOSE << "registering to the incident service for " << IncidentType::BeginEvent << endmsg;
  m_incidentSvc->addListener(this,IncidentType::BeginEvent);

  return status;
}
StatusCode FastContainersSvc::reinitialize (  ) [virtual]

Initialize the service.

Reimplemented from DataSvc.

Definition at line 65 of file FastContainersSvc.cpp.

                                           {
  // do nothing
  return StatusCode::SUCCESS;
}
void FastContainersSvc::resetStore (  ) [virtual]

Reset all the instances of TransientFastContainerBase in the store.

Definition at line 85 of file FastContainersSvc.cpp.


Friends And Related Function Documentation

friend class SvcFactory< FastContainersSvc > [friend]

Definition at line 53 of file FastContainersSvc.h.


Member Data Documentation

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

Definition at line 56 of file FastContainersSvc.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Fri Sep 2 2011 16:25:19 for Gaudi Framework, version v22r4 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004