ATLAS Offline Software
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 
19 #include "GaudiKernel/IInterface.h"
20 #include "GaudiKernel/StatusCode.h"
21 #include "GaudiKernel/ClassID.h"
22 
23 #include "AthenaKernel/IOVRange.h"
24 
25 #include <string>
26 #include <memory>
27 
28 class IOVTime;
29 class IOpaqueAddress;
30 class EventContext;
31 
38 class IIOVDbSvc : virtual public IInterface {
39 public:
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
grepfile.info
info
Definition: grepfile.py:38
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
IOVRange.h
Validity Range object. Holds two IOVTime instances (start and stop)
IIOVDbSvc::KeyInfo::retrieved
bool retrieved
Definition: IIOVDbSvc.h:50
IIOVDbSvc::KeyInfo::range
IOVRange range
Definition: IIOVDbSvc.h:47
IIOVDbSvc
Abstract interface to IOVDbSvc to access IOVRange and tag information.
Definition: IIOVDbSvc.h:38
IIOVDbSvc::signalEndProxyPreload
virtual void signalEndProxyPreload()=0
Signal that callback has been fired.
IIOVDbSvc::postConditionsLoad
virtual void postConditionsLoad()=0
May be called once conditions are loaded to let IOVDbSvc release resources.
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
IIOVDbSvc::getRange
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.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IIOVDbSvc::getKeyInfo
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.
IIOVDbSvc::processTagInfo
virtual StatusCode processTagInfo()=0
Process TagInfo.
IIOVDbSvc::setRange
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.
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
IIOVDbSvc::dropObject
virtual bool dropObject(const std::string &key, const bool resetCache=false)=0
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
IIOVDbSvc::KeyInfo::tag
std::string tag
Definition: IIOVDbSvc.h:46
IIOVDbSvc::DeclareInterfaceID
DeclareInterfaceID(IIOVDbSvc, 1, 0)
Declare interface ID.
IIOVDbSvc::signalBeginRun
virtual StatusCode signalBeginRun(const IOVTime &beginRunTime, const EventContext &ctx)=0
Set time for begin run.
IIOVDbSvc::KeyInfo::readTime
float readTime
Definition: IIOVDbSvc.h:48
IIOVDbSvc::KeyInfo::folderName
std::string folderName
Definition: IIOVDbSvc.h:45
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
IIOVDbSvc::getKeyList
virtual std::vector< std::string > getKeyList()=0
return list of SG keys being provided by IOVDbSvc
IIOVDbSvc::KeyInfo
Filled by IIOVDbSvc::getKeyInfo.
Definition: IIOVDbSvc.h:44
IIOVDbSvc::KeyInfo::bytesRead
unsigned long long bytesRead
Definition: IIOVDbSvc.h:49
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
IIOVDbSvc::KeyInfo::extensible
bool extensible
Definition: IIOVDbSvc.h:51
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37