The Gaudi Framework  v33r1 (b1225454)
RecordDataSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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
StatusCode finalize() override
Service finalization.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:35
Implementation of property with value of concrete type.
Definition: Property.h:370
Gaudi::Property< std::string > m_saveIncidentName
Definition: RecordDataSvc.h:56
A RecordDataSvc is the base class for event services.
Definition: RecordDataSvc.h:34
STL class.
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:284
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
std::vector< std::string > m_incidents
Pending new file incidents.
Definition: RecordDataSvc.h:61
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:32
Gaudi::Property< std::string > m_incidentName
Definition: RecordDataSvc.h:54
Base class used to extend a class implementing other interfaces.
Definition: extends.h:20
Gaudi::Property< bool > m_autoLoad
Definition: RecordDataSvc.h:53
Gaudi::Property< std::string > m_persSvcName
Definition: RecordDataSvc.h:57
Base class for all Incidents (computing events).
Definition: Incident.h:27
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:63
void loadRecords(IRegistry *pReg)
Load dependent records into memory.