ATLAS Offline Software
Loading...
Searching...
No Matches
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
18class IOVRange;
19class IOVTime;
20class IOpaqueAddress;
21
22namespace SG {
23 class TransientAddress;
24 class DataProxy;
25}
26
27class IIOVSvcTool : virtual public IAlgTool {
28public:
30
31 virtual void setStoreName(const std::string& storeName) = 0;
32 virtual const std::string& getStoreName() const = 0;
33
34 // register callback functions
35 virtual StatusCode regFcn(SG::DataProxy *dp, const CallBackID& c,
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
55 virtual StatusCode regProxy( SG::DataProxy *proxy,
56 const std::string& key ) = 0;
57
58 virtual StatusCode deregProxy( SG::DataProxy *proxy ) = 0;
59 virtual StatusCode deregProxy( const CLID& clid, const std::string& key ) = 0;
60
61
62 // Replace a registered proxy with a new version
63 virtual StatusCode replaceProxy( SG::DataProxy *pOld,
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
90 virtual StatusCode preLoadDataTAD( const SG::TransientAddress * ) = 0;
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
uint32_t CLID
The Class ID type.
defines and typedefs for IOVSvc
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
virtual StatusCode regProxy(const CLID &clid, const std::string &key)=0
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
virtual void setStoreName(const std::string &storeName)=0
virtual StatusCode deregProxy(const CLID &clid, const std::string &key)=0
DeclareInterfaceID(IIOVSvcTool, 1, 0)
virtual StatusCode regFcn(const CallBackID &c1, const CallBackID &c2, const IOVSvcCallBackFcn &fcn2, bool trigger)=0
virtual StatusCode regFcn(SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger)=0
virtual StatusCode setRangeInDB(const CLID &clid, const std::string &key, const IOVRange &range, const std::string &tag)=0
virtual bool holdsAlgTool(const IAlgTool *ia) const =0
virtual void resetAllProxies()=0
virtual StatusCode setRange(const CLID &clid, const std::string &key, IOVRange &)=0
virtual bool holdsProxy(SG::DataProxy *proxy) const =0
virtual StatusCode preLoadTAD(const SG::TransientAddress *)=0
virtual StatusCode preLoadDataTAD(const SG::TransientAddress *)=0
virtual bool holdsProxy(const CLID &clid, const std::string &key) const =0
virtual StatusCode regFcn(const IAlgTool *ia, const CallBackID &c2, const IOVSvcCallBackFcn &fcn2, bool trigger)=0
virtual StatusCode replaceProxy(SG::DataProxy *pOld, SG::DataProxy *pNew)=0
virtual void ignoreProxy(const CLID &clid, const std::string &key)=0
virtual StatusCode regProxy(SG::DataProxy *proxy, const std::string &key)=0
virtual bool holdsCallback(const CallBackID &) const =0
virtual const std::string & getStoreName() const =0
virtual void ignoreProxy(SG::DataProxy *proxy)=0
virtual StatusCode getTriggeredTools(const std::string &key, std::set< std::string > &tools)=0
virtual StatusCode deregProxy(SG::DataProxy *proxy)=0
virtual StatusCode getRange(const CLID &clid, const std::string &key, IOVRange &iov) const =0
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
Validity Range object.
Definition IOVRange.h:30
Basic time unit for IOVSvc.
Definition IOVTime.h:33
Forward declaration.