RecordDataSvc.h
Go to the documentation of this file.
1 #ifndef DATASVC_RECORDDATASVC_H
2 #define DATASVC_RECORDDATASVC_H
3 
4 #include "GaudiKernel/DataSvc.h"
5 #include "GaudiKernel/IIncidentListener.h"
6 #include "GaudiKernel/IConversionSvc.h"
7 
8 
25 class RecordDataSvc : public extends1<DataSvc, IIncidentListener> {
26  public:
27  StatusCode initialize() override;
28  StatusCode finalize() override;
29 
31  void handle(const Incident& incident) override;
32 
34  RecordDataSvc(const std::string& name, ISvcLocator* svc);
35 
37  ~RecordDataSvc() override = default;
38 
39  protected:
41  void registerRecord(const std::string& data, IOpaqueAddress* pAddr);
42 
44  void loadRecords(IRegistry* pReg);
45 
46  protected:
48  bool m_autoLoad;
50  std::string m_incidentName;
52  std::string m_saveIncidentName;
54  std::string m_persSvcName;
56  std::vector<std::string> m_incidents;
59 };
60 #endif // DATASVC_RECORDDATASVC_H
StatusCode finalize() override
Service finalization.
std::string m_persSvcName
Property: name of the persistency service.
Definition: RecordDataSvc.h:54
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
std::string m_incidentName
Property: name of incident to be fired if new record arrives.
Definition: RecordDataSvc.h:50
bool m_autoLoad
Property: autoload of records (default: true)
Definition: RecordDataSvc.h:48
A RecordDataSvc is the base class for event services.
Definition: RecordDataSvc.h:25
std::string m_saveIncidentName
Property: name of the "save" incident.
Definition: RecordDataSvc.h:52
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::vector< std::string > m_incidents
Pending new file incidents.
Definition: RecordDataSvc.h:56
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
Base class for all Incidents (computing events).
Definition: Incident.h:16
RecordDataSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
void handle(const Incident &incident) override
IIncidentListener override: Inform that a new incident has occured.
StatusCode initialize() override
Service initialisation.
void registerRecord(const std::string &data, IOpaqueAddress *pAddr)
Load new record into the data store if necessary.
Opaque address interface definition.
SmartIF< IConversionSvc > m_cnvSvc
Reference to the main data conversion service.
Definition: RecordDataSvc.h:58
~RecordDataSvc() override=default
Standard Destructor.
void loadRecords(IRegistry *pReg)
Load dependent records into memory.