The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
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
33class RecordDataSvc : public extends<DataSvc, IIncidentListener> {
34public:
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
44protected:
46 void registerRecord( const std::string& data, IOpaqueAddress* pAddr );
47
49 void loadRecords( IRegistry* pReg );
50
51protected:
52 Gaudi::Property<bool> m_autoLoad{ this, "AutoLoad", true, "autoload of records" };
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};
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
Opaque address interface definition.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition IRegistry.h:29
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition ISvcLocator.h:42
Base class for all Incidents (computing events).
Definition Incident.h:24
Gaudi::Property< std::string > m_incidentName
StatusCode initialize() override
Service initialisation.
SmartIF< IConversionSvc > m_cnvSvc
Reference to the main data conversion service.
std::vector< std::string > m_incidents
Pending new file incidents.
void registerRecord(const std::string &data, IOpaqueAddress *pAddr)
Load new record into the data store if necessary.
Gaudi::Property< std::string > m_persSvcName
Gaudi::Property< bool > m_autoLoad
RecordDataSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
void handle(const Incident &incident) override
IIncidentListener override: Inform that a new incident has occured.
Gaudi::Property< std::string > m_saveIncidentName
StatusCode finalize() override
Service finalization.
void loadRecords(IRegistry *pReg)
Load dependent records into memory.
const std::string & name() const override
Retrieve name of the service.
Definition Service.cpp:333
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
Base class used to extend a class implementing other interfaces.
Definition extends.h:19