ATLAS Offline Software
IIOVSvcTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef IOVSVC_IIOVSVCTOOL_H
6 #define IOVSVC_IIOVSVCTOOL_H 1
7 
8 // Include files
9 #include "GaudiKernel/IAlgTool.h"
10 
11 #include <string>
12 #include <memory>
13 #include <set>
14 #include "GaudiKernel/ClassID.h"
16 #include "SGTools/CallBackID.h"
17 
18 class IOVRange;
19 class IOVTime;
20 class IOpaqueAddress;
21 
22 namespace SG {
23  class TransientAddress;
24  class DataProxy;
25 }
26 
27 class IIOVSvcTool : virtual public IAlgTool {
28 public:
30 
31  virtual void setStoreName(const std::string& storeName) = 0;
32  virtual const std::string& getStoreName() const = 0;
33 
34  // register callback functions
36  const IOVSvcCallBackFcn& fcn, bool trigger) = 0;
37 
38  virtual StatusCode regFcn(const CallBackID& c1,
39  const CallBackID& c2,
40  const IOVSvcCallBackFcn& fcn2,
41  bool trigger) = 0;
42 
43  virtual StatusCode regFcn(const IAlgTool* ia,
44  const CallBackID& c2, const IOVSvcCallBackFcn& fcn2,
45  bool trigger) = 0;
46 
47  // Update Range from dB
48  virtual StatusCode setRange(const CLID& clid, const std::string& key,
49  IOVRange&) = 0;
50 
51  virtual StatusCode getRange(const CLID& clid, const std::string& key,
52  IOVRange& iov) const = 0;
53 
54  // Subscribe method for DataProxy. key StoreGate key
56  const std::string& key ) = 0;
57 
59  virtual StatusCode deregProxy( const CLID& clid, const std::string& key ) = 0;
60 
61 
62  // Replace a registered proxy with a new version
64  SG::DataProxy *pNew ) = 0;
65 
66  // Another way to subscribe
67  virtual StatusCode regProxy( const CLID& clid, const std::string& key ) = 0;
68 
69  // Get IOVRange from db for current event
70  virtual StatusCode getRangeFromDB(const CLID& clid, const std::string& key,
71  IOVRange& range, std::string &tag,
72  std::unique_ptr<IOpaqueAddress>& ioa,
73  const IOVTime& curTime) const = 0;
74 
75  // Get IOVRange from db for a particular event
76  virtual StatusCode getRangeFromDB(const CLID& clid, const std::string& key,
77  const IOVTime& time,
78  IOVRange& range, std::string &tag,
79  std::unique_ptr<IOpaqueAddress>& ioa) const = 0;
80 
81  // Set a particular IOVRange in db (and memory)
82  virtual StatusCode setRangeInDB(const CLID& clid, const std::string& key,
83  const IOVRange& range,
84  const std::string &tag) = 0;
85 
86  // supply a list of TADs whose proxies will be preloaded
87  virtual StatusCode preLoadTAD( const SG::TransientAddress * ) = 0;
88 
89  // supply a list of TADs whose data will be preloaded
91 
92  // return list of tools (or functions) that have been triggered by key
93  // will return FAILURE if no tools found, or no key found
94  virtual StatusCode getTriggeredTools(const std::string& key,
95  std::set<std::string>& tools) = 0;
96 
97  virtual bool holdsProxy( SG::DataProxy* proxy ) const = 0;
98  virtual bool holdsProxy( const CLID& clid, const std::string& key ) const = 0;
99  virtual bool holdsCallback( const CallBackID& ) const = 0;
100  virtual bool holdsAlgTool( const IAlgTool* ia ) const = 0;
101 
102  virtual void resetAllProxies() = 0;
103 
104  virtual void ignoreProxy(SG::DataProxy* proxy) = 0;
105  virtual void ignoreProxy( const CLID& clid, const std::string& key) = 0;
106 
107 };
108 
109 #endif
CallBackID
Definition: CallBackID.h:24
TileDCSDataPlotter.dp
dp
Definition: TileDCSDataPlotter.py:840
IIOVSvcTool::holdsAlgTool
virtual bool holdsAlgTool(const IAlgTool *ia) const =0
IIOVSvcTool::preLoadTAD
virtual StatusCode preLoadTAD(const SG::TransientAddress *)=0
IIOVSvcTool::setRangeInDB
virtual StatusCode setRangeInDB(const CLID &clid, const std::string &key, const IOVRange &range, const std::string &tag)=0
dqt_zlumi_alleff_HIST.iov
iov
Definition: dqt_zlumi_alleff_HIST.py:119
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
CallBackID.h
IIOVSvcTool::regFcn
virtual StatusCode regFcn(const CallBackID &c1, const CallBackID &c2, const IOVSvcCallBackFcn &fcn2, bool trigger)=0
extractSporadic.c1
c1
Definition: extractSporadic.py:134
SG::TransientAddress
Definition: TransientAddress.h:32
IIOVSvcTool::getRangeFromDB
virtual StatusCode getRangeFromDB(const CLID &clid, const std::string &key, const IOVTime &time, IOVRange &range, std::string &tag, std::unique_ptr< IOpaqueAddress > &ioa) const =0
IIOVSvcTool::ignoreProxy
virtual void ignoreProxy(const CLID &clid, const std::string &key)=0
IIOVSvcTool::ignoreProxy
virtual void ignoreProxy(SG::DataProxy *proxy)=0
IIOVSvcTool::getTriggeredTools
virtual StatusCode getTriggeredTools(const std::string &key, std::set< std::string > &tools)=0
IIOVSvcTool::holdsCallback
virtual bool holdsCallback(const CallBackID &) const =0
IIOVSvcTool::deregProxy
virtual StatusCode deregProxy(SG::DataProxy *proxy)=0
IIOVSvcTool::regProxy
virtual StatusCode regProxy(const CLID &clid, const std::string &key)=0
IIOVSvcTool
Definition: IIOVSvcTool.h:27
IIOVSvcTool::holdsProxy
virtual bool holdsProxy(SG::DataProxy *proxy) const =0
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
IIOVSvcTool::resetAllProxies
virtual void resetAllProxies()=0
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IIOVSvcTool::getStoreName
virtual const std::string & getStoreName() const =0
DataProxy
DataProxy provides the registry services for StoreGate.
Definition: DataProxy.h:31
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
IOVSvcCallBackFcn
boost::function< StatusCode(IOVSVC_CALLBACK_ARGS) > IOVSvcCallBackFcn
the type of an IOVSvc call back: it wraps both the method and the object the method is called on
Definition: IOVSvcDefs.h:58
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
IIOVSvcTool::getRangeFromDB
virtual StatusCode getRangeFromDB(const CLID &clid, const std::string &key, IOVRange &range, std::string &tag, std::unique_ptr< IOpaqueAddress > &ioa, const IOVTime &curTime) const =0
IIOVSvcTool::replaceProxy
virtual StatusCode replaceProxy(SG::DataProxy *pOld, SG::DataProxy *pNew)=0
IIOVSvcTool::regFcn
virtual StatusCode regFcn(const IAlgTool *ia, const CallBackID &c2, const IOVSvcCallBackFcn &fcn2, bool trigger)=0
tools
Definition: DataQuality/ZLumiScripts/python/tools/__init__.py:1
IIOVSvcTool::getRange
virtual StatusCode getRange(const CLID &clid, const std::string &key, IOVRange &iov) const =0
python.DataFormatRates.c2
c2
Definition: DataFormatRates.py:123
IIOVSvcTool::setStoreName
virtual void setStoreName(const std::string &storeName)=0
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
IIOVSvcTool::regFcn
virtual StatusCode regFcn(SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger)=0
IIOVSvcTool::preLoadDataTAD
virtual StatusCode preLoadDataTAD(const SG::TransientAddress *)=0
IOVSvcDefs.h
defines and typedefs for IOVSvc
IIOVSvcTool::regProxy
virtual StatusCode regProxy(SG::DataProxy *proxy, const std::string &key)=0
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
IIOVSvcTool::DeclareInterfaceID
DeclareInterfaceID(IIOVSvcTool, 1, 0)
SG::DataProxy
Definition: DataProxy.h:44
IIOVSvcTool::holdsProxy
virtual bool holdsProxy(const CLID &clid, const std::string &key) const =0
python.compressB64.c
def c
Definition: compressB64.py:93
IIOVSvcTool::setRange
virtual StatusCode setRange(const CLID &clid, const std::string &key, IOVRange &)=0
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
IIOVSvcTool::deregProxy
virtual StatusCode deregProxy(const CLID &clid, const std::string &key)=0