The Gaudi Framework  master (d98a2936)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
RecordDataSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 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 #pragma once
12 
13 #include <GaudiKernel/DataSvc.h>
16 
33 class RecordDataSvc : public extends<DataSvc, IIncidentListener> {
34 public:
35  StatusCode initialize() override;
36  StatusCode finalize() override;
37 
39  void handle( const Incident& incident ) override;
40 
42  RecordDataSvc( const std::string& name, ISvcLocator* svc );
43 
44 protected:
46  void registerRecord( const std::string& data, IOpaqueAddress* pAddr );
47 
49  void loadRecords( IRegistry* pReg );
50 
51 protected:
52  Gaudi::Property<bool> m_autoLoad{ this, "AutoLoad", true, "autoload of records" };
53  Gaudi::Property<std::string> m_incidentName{ this, "IncidentName", "",
54  "name of incident to be fired if new record arrives" };
55  Gaudi::Property<std::string> m_saveIncidentName{ this, "SaveIncident", "SAVE_RECORD", "name of the 'save' incident" };
56  Gaudi::Property<std::string> m_persSvcName{ this, "PersistencySvc", "PersistencySvc/RecordPersistencySvc",
57  "name of the persistency service" };
58 
60  std::vector<std::string> m_incidents;
63 };
RecordDataSvc::m_incidents
std::vector< std::string > m_incidents
Pending new file incidents.
Definition: RecordDataSvc.h:60
IOpaqueAddress
Definition: IOpaqueAddress.h:28
ISvcLocator
Definition: ISvcLocator.h:42
RecordDataSvc::m_incidentName
Gaudi::Property< std::string > m_incidentName
Definition: RecordDataSvc.h:53
RecordDataSvc::m_persSvcName
Gaudi::Property< std::string > m_persSvcName
Definition: RecordDataSvc.h:56
RecordDataSvc::m_autoLoad
Gaudi::Property< bool > m_autoLoad
Definition: RecordDataSvc.h:52
IRegistry
Definition: IRegistry.h:29
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:62
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:333
StatusCode
Definition: StatusCode.h:64
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:19
RecordDataSvc::m_saveIncidentName
Gaudi::Property< std::string > m_saveIncidentName
Definition: RecordDataSvc.h:55
RecordDataSvc
Definition: RecordDataSvc.h:33
IIncidentListener.h
IConversionSvc.h
Incident
Definition: Incident.h:24
DataSvc.h
Gaudi::Property< bool >