ATLAS Offline Software
Loading...
Searching...
No Matches
IOVRegistrationSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
15
16#ifndef REGISTRATIONSERVICES_IOVREGISTRATIONSVC_H
17# define REGISTRATIONSERVICES_IOVREGISTRATIONSVC_H
18
19//<<<<<< INCLUDES >>>>>>
20
24#include "GaudiKernel/ServiceHandle.h"
25#include "GaudiKernel/ClassID.h"
26#include "CoolKernel/StorageType.h"
27
28//<<<<<< FORWARD DECLARATIONS >>>>>>
29
30class IIOVCondDbSvc;
31class StoreGateSvc;
32class IAddressCreator;
33class IClassIDSvc;
34
35
36//<<<<<< CLASS DECLARATIONS >>>>>>
37
53class IOVRegistrationSvc : public extends<AthService, IIOVRegistrationSvc>
54{
55
56public:
57
58 IOVRegistrationSvc( const std::string& name, ISvcLocator* svc );
59
60 virtual ~IOVRegistrationSvc();
61
63 virtual const InterfaceID& type() const;
64
68 virtual StatusCode registerIOV( const std::string& typeName ) const;
69
74 virtual StatusCode registerIOV( const std::string& typeName, const std::string& tag ) const;
75
80 virtual StatusCode registerIOV( const std::string& typeName, const std::string& key,
81 const std::string& tag ) const;
82
85 virtual StatusCode registerIOV( const std::string& typeName,
86 const std::string& tag,
87 unsigned int beginRun,
88 unsigned int endRun,
89 unsigned int beginLB,
90 unsigned int endLB ) const;
91
92
95 virtual StatusCode registerIOV( const std::string& typeName,
96 const std::string& tag,
97 uint64_t beginTime,
98 uint64_t endTime ) const;
99
102 virtual StatusCode registerIOV( const std::string& typeName,
103 const std::string& key,
104 const std::string& tag,
105 unsigned int beginRun,
106 unsigned int endRun,
107 unsigned int beginLB,
108 unsigned int endLB ) const;
109
112 virtual StatusCode registerIOV( const std::string& typeName,
113 const std::string& key,
114 const std::string& tag,
115 uint64_t beginTime,
116 uint64_t endTime ) const;
117
120 virtual StatusCode registerIOV( const std::string& typeName,
121 const std::string& key,
122 const std::string& folder,
123 const std::string& tag,
124 unsigned int beginRun,
125 unsigned int endRun,
126 unsigned int beginLB,
127 unsigned int endLB ) const;
128
131 virtual StatusCode registerIOV( const std::string& typeName,
132 const std::string& key,
133 const std::string& folder,
134 const std::string& tag,
135 uint64_t beginTime,
136 uint64_t endTime ) const;
137
139 virtual StatusCode initialize();
140
142 virtual StatusCode finalize();
143
144
145private:
146
147 // Allow SvcFactory to instantiate the service.
148 friend class SvcFactory<IOVRegistrationSvc>;
149
150 StatusCode registerIOV(const std::string& typeName,
151 const std::string& key,
152 const std::string& folder,
153 const std::string& tag,
154 const IOVTime& begin,
155 const IOVTime& end) const;
156
157 StatusCode registerIOVCOOL(const std::string& typeName,
158 const std::string& key,
159 const std::string& folderName,
160 const std::string& tag,
161 const IOVTime& begin,
162 const IOVTime& end) const;
163
164 cool::StorageType::TypeId coralToCoolType(const std::string& parname,
165 const std::string& coralName) const;
166
167 StatusCode getStringAddress(const CLID& clid,
168 const std::string& key,
169 std::string& saddr) const;
170
171 uint64_t timeToNano(const unsigned long int timesec) const;
172
175 virtual StatusCode buildDescription(const std::string& identifier,
176 const std::string& value,
177 std::string& description) const;
178
180 StatusCode splitAddress(const std::string& address,
181 std::string& address_header,
182 std::string& address_data) const;
183
184 Gaudi::Property<bool> m_recreateFolders{this, "RecreateFolders", false};
185 Gaudi::Property<unsigned int> m_beginRun{this, "BeginRun", IOVTime::MINRUN};
186 Gaudi::Property<unsigned int> m_endRun{this, "EndRun", IOVTime::MAXRUN};
187 Gaudi::Property<unsigned int> m_beginLB{this, "BeginLB", IOVTime::MINEVENT};
188 Gaudi::Property<unsigned int> m_endLB{this, "EndLB", IOVTime::MAXEVENT};
189
190 Gaudi::Property<unsigned long> m_beginTime{this, "BeginTime", IOVTime::MINTIMESTAMP};
191 Gaudi::Property<unsigned long> m_endTime{this, "EndTime", IOVTime::MAXEVENT}; // as the time parameter is only 32bit
192
193 Gaudi::Property<std::string> m_tag{this, "IOVDbTag", ""};
194 Gaudi::Property<bool> m_timeStamp{this, "IOVDbTimeStamp", false};
195 Gaudi::Property<std::string> m_tagDescription{this, "TagDescription", "Athena IOVRegistrationSvc"};
196 Gaudi::Property<bool> m_writeKeyInfo{this, "writeKeyInfo", true};
197 Gaudi::Property<bool> m_userTags{this, "userTags", true};
198 Gaudi::Property<bool> m_userTagsUH{this, "userTagsUpdateHead", false};
199 Gaudi::Property<bool> m_svFolder{this, "SVFolder", false};
200 Gaudi::Property<bool> m_payloadTable{this, "PayloadTable", false};
201 Gaudi::Property<bool> m_forceGlobalIOV{this, "UseGlobalIOVForCollections", false};
202 Gaudi::Property<std::vector<std::string>> m_overrideName{this, "OverrideNames", {}};
203 Gaudi::Property<std::vector<std::string>> m_overrideType{this, "OverrideTypes", {}};
204
209
210};
211
212
213//<<<<<< INLINE PUBLIC FUNCTIONS >>>>>>
214//<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
215
216#endif // REGISTRATIONSERVICES_IOVREGISTRATIONSVC_H
uint32_t CLID
The Class ID type.
This is an interface to a tool used to register conditions objects in the Interval of Validity (IOV) ...
Basic time unit for IOVSvc.
Gaudi::Property< bool > m_writeKeyInfo
Gaudi::Property< bool > m_recreateFolders
Gaudi::Property< bool > m_forceGlobalIOV
IOVRegistrationSvc(const std::string &name, ISvcLocator *svc)
ServiceHandle< IAddressCreator > m_persSvc
virtual StatusCode initialize()
Initialize AlgTool.
Gaudi::Property< std::string > m_tagDescription
virtual StatusCode buildDescription(const std::string &identifier, const std::string &value, std::string &description) const
Build the folder description field add in front of the description the value with identifier-markups.
ServiceHandle< IIOVCondDbSvc > m_iov_db
Gaudi::Property< bool > m_userTagsUH
Gaudi::Property< bool > m_userTags
Gaudi::Property< unsigned long > m_beginTime
ServiceHandle< IClassIDSvc > m_clidSvc
uint64_t timeToNano(const unsigned long int timesec) const
StatusCode registerIOVCOOL(const std::string &typeName, const std::string &key, const std::string &folderName, const std::string &tag, const IOVTime &begin, const IOVTime &end) const
Gaudi::Property< bool > m_timeStamp
ServiceHandle< StoreGateSvc > m_detStore
Gaudi::Property< bool > m_payloadTable
Gaudi::Property< unsigned int > m_endLB
StatusCode getStringAddress(const CLID &clid, const std::string &key, std::string &saddr) const
Gaudi::Property< unsigned int > m_beginLB
Gaudi::Property< std::string > m_tag
virtual StatusCode finalize()
Finalize AlgTool.
Gaudi::Property< std::vector< std::string > > m_overrideName
virtual StatusCode registerIOV(const std::string &typeName) const
Register IOV DB for an object given its typeName - run/LB numbers interval or times interval and tag ...
Gaudi::Property< unsigned int > m_beginRun
Gaudi::Property< unsigned int > m_endRun
Gaudi::Property< std::vector< std::string > > m_overrideType
Gaudi::Property< bool > m_svFolder
Gaudi::Property< unsigned long > m_endTime
virtual const InterfaceID & type() const
Service type.
cool::StorageType::TypeId coralToCoolType(const std::string &parname, const std::string &coralName) const
StatusCode splitAddress(const std::string &address, std::string &address_header, std::string &address_data) const
Split address in its header and data parts.
Basic time unit for IOVSvc.
Definition IOVTime.h:33
static constexpr uint32_t MAXRUN
Definition IOVTime.h:48
static constexpr uint32_t MINEVENT
Definition IOVTime.h:50
static constexpr uint64_t MINTIMESTAMP
Definition IOVTime.h:56
static constexpr uint32_t MAXEVENT
Definition IOVTime.h:51
static constexpr uint32_t MINRUN
Definition IOVTime.h:44
The Athena Transient Store API.
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:91