|
Gaudi Framework, version v22r4 |
| Home | Generated: Fri Sep 2 2011 |
Data service for objects of type TransientFastContainer. More...
#include <FastContainersSvc/FastContainersSvc.h>


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 > |
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.
Definition at line 22 of file FastContainersSvc.h.
| 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] |
| 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.
{
traverseTree(&m_storeResetter).ignore();
}
friend class SvcFactory< FastContainersSvc > [friend] |
Definition at line 53 of file FastContainersSvc.h.
std::string FastContainersSvc::m_rootDirName [private] |
Name of the root node (property "RootDirName").
Definition at line 56 of file FastContainersSvc.h.