ATLAS Offline Software
Loading...
Searching...
No Matches
IIOVDbSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ATHENAKERNEL_IIOVDBSVC_H
6#define ATHENAKERNEL_IIOVDBSVC_H
7
18
19#include "GaudiKernel/IInterface.h"
20#include "GaudiKernel/StatusCode.h"
21#include "GaudiKernel/ClassID.h"
22
24
25#include <string>
26#include <memory>
27
28class IOVTime;
29class IOpaqueAddress;
30class EventContext;
31
38class IIOVDbSvc : virtual public IInterface {
39public:
42
44 struct KeyInfo {
45 std::string folderName;
46 std::string tag;
48 float readTime{0};
49 unsigned long long bytesRead{0};
50 bool retrieved{false};
51 bool extensible{false};
52 };
53
55 virtual StatusCode getRange(const CLID& clid,
56 const std::string& dbKey,
57 const IOVTime& time,
58 IOVRange& range,
59 std::string& tag,
60 std::unique_ptr<IOpaqueAddress>& ioa) = 0;
61
63 virtual StatusCode setRange(const CLID& clid,
64 const std::string& dbKey,
65 const IOVRange& range,
66 const std::string& tag ) = 0;
67
69 virtual StatusCode signalBeginRun(const IOVTime& beginRunTime,
70 const EventContext& ctx) = 0;
71
73 virtual void signalEndProxyPreload() = 0;
74
76 virtual void postConditionsLoad() = 0;
77
79 virtual StatusCode processTagInfo() = 0;
80
82 virtual std::vector<std::string> getKeyList() = 0;
83
86 virtual bool getKeyInfo(const std::string& key, IIOVDbSvc::KeyInfo& info) = 0;
87
88 // drop an IOVDbSvc-managed object from Storegate, indicating we will
89 // not read it again and can free up memory
90 // If resetCache=True, also drop the corresponding folder cache
91 // so any subsequent reads will access the database again
92 // returns False if key not known to IOVDbSvc
93 virtual bool dropObject(const std::string& key,
94 const bool resetCache=false) = 0;
95};
96
97#endif
uint32_t CLID
The Class ID type.
Validity Range object.
Abstract interface to IOVDbSvc to access IOVRange and tag information.
Definition IIOVDbSvc.h:38
virtual void postConditionsLoad()=0
May be called once conditions are loaded to let IOVDbSvc release resources.
virtual bool dropObject(const std::string &key, const bool resetCache=false)=0
virtual StatusCode getRange(const CLID &clid, const std::string &dbKey, const IOVTime &time, IOVRange &range, std::string &tag, std::unique_ptr< IOpaqueAddress > &ioa)=0
Get range for a particular data object.
virtual StatusCode setRange(const CLID &clid, const std::string &dbKey, const IOVRange &range, const std::string &tag)=0
Set range for a particular data object.
virtual StatusCode signalBeginRun(const IOVTime &beginRunTime, const EventContext &ctx)=0
Set time for begin run.
virtual bool getKeyInfo(const std::string &key, IIOVDbSvc::KeyInfo &info)=0
Return information about SG key return false if this key is not known to IOVDbSvc.
DeclareInterfaceID(IIOVDbSvc, 1, 0)
Declare interface ID.
virtual void signalEndProxyPreload()=0
Signal that callback has been fired.
virtual std::vector< std::string > getKeyList()=0
return list of SG keys being provided by IOVDbSvc
virtual StatusCode processTagInfo()=0
Process TagInfo.
Validity Range object.
Definition IOVRange.h:30
Basic time unit for IOVSvc.
Definition IOVTime.h:33
Filled by IIOVDbSvc::getKeyInfo.
Definition IIOVDbSvc.h:44
std::string tag
Definition IIOVDbSvc.h:46
std::string folderName
Definition IIOVDbSvc.h:45
unsigned long long bytesRead
Definition IIOVDbSvc.h:49