The Gaudi Framework  master (37c0b60a)
RecordDataSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef DATASVC_RECORDDATASVC_H
12 #define DATASVC_RECORDDATASVC_H
13 
14 #include <GaudiKernel/DataSvc.h>
17 
34 class RecordDataSvc : public extends<DataSvc, IIncidentListener> {
35 public:
36  StatusCode initialize() override;
37  StatusCode finalize() override;
38 
40  void handle( const Incident& incident ) override;
41 
43  RecordDataSvc( const std::string& name, ISvcLocator* svc );
44 
45 protected:
47  void registerRecord( const std::string& data, IOpaqueAddress* pAddr );
48 
50  void loadRecords( IRegistry* pReg );
51 
52 protected:
53  Gaudi::Property<bool> m_autoLoad{ this, "AutoLoad", true, "autoload of records" };
54  Gaudi::Property<std::string> m_incidentName{ this, "IncidentName", "",
55  "name of incident to be fired if new record arrives" };
56  Gaudi::Property<std::string> m_saveIncidentName{ this, "SaveIncident", "SAVE_RECORD", "name of the 'save' incident" };
57  Gaudi::Property<std::string> m_persSvcName{ this, "PersistencySvc", "PersistencySvc/RecordPersistencySvc",
58  "name of the persistency service" };
59 
64 };
65 #endif // DATASVC_RECORDDATASVC_H
RecordDataSvc::m_incidents
std::vector< std::string > m_incidents
Pending new file incidents.
Definition: RecordDataSvc.h:61
std::string
STL class.
IOpaqueAddress
Definition: IOpaqueAddress.h:33
std::vector< std::string >
ISvcLocator
Definition: ISvcLocator.h:46
RecordDataSvc::m_incidentName
Gaudi::Property< std::string > m_incidentName
Definition: RecordDataSvc.h:54
RecordDataSvc::m_persSvcName
Gaudi::Property< std::string > m_persSvcName
Definition: RecordDataSvc.h:57
RecordDataSvc::m_autoLoad
Gaudi::Property< bool > m_autoLoad
Definition: RecordDataSvc.h:53
IRegistry
Definition: IRegistry.h:32
RecordDataSvc::initialize
StatusCode initialize() override
Service initialisation.
Definition: RecordDataSvc.cpp:48
RecordDataSvc::RecordDataSvc
RecordDataSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: RecordDataSvc.cpp:157
RecordDataSvc::handle
void handle(const Incident &incident) override
IIncidentListener override: Inform that a new incident has occured.
Definition: RecordDataSvc.cpp:100
RecordDataSvc::m_cnvSvc
SmartIF< IConversionSvc > m_cnvSvc
Reference to the main data conversion service.
Definition: RecordDataSvc.h:63
RecordDataSvc::registerRecord
void registerRecord(const std::string &data, IOpaqueAddress *pAddr)
Load new record into the data store if necessary.
Definition: RecordDataSvc.cpp:139
Service::name
const std::string & name() const override
Retrieve name of the service
Definition: Service.cpp:332
StatusCode
Definition: StatusCode.h:65
RecordDataSvc::finalize
StatusCode finalize() override
Service finalization.
Definition: RecordDataSvc.cpp:92
RecordDataSvc::loadRecords
void loadRecords(IRegistry *pReg)
Load dependent records into memory.
Definition: RecordDataSvc.cpp:120
SmartIF< IConversionSvc >
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:20
RecordDataSvc::m_saveIncidentName
Gaudi::Property< std::string > m_saveIncidentName
Definition: RecordDataSvc.h:56
RecordDataSvc
Definition: RecordDataSvc.h:34
IIncidentListener.h
IConversionSvc.h
Incident
Definition: Incident.h:27
DataSvc.h
Gaudi::Property< bool >