ATLAS Offline Software
Loading...
Searching...
No Matches
IOVRegistrationSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
15
16#ifndef REGISTRATIONSERVICES_IOVREGISTRATIONSVC_H
17# define REGISTRATIONSERVICES_IOVREGISTRATIONSVC_H
18
19
23#include "GaudiKernel/ServiceHandle.h"
24#include "GaudiKernel/ClassID.h"
25#include "CoolKernel/StorageType.h"
26
27
28class IIOVCondDbSvc;
29class StoreGateSvc;
30class IAddressCreator;
31class IClassIDSvc;
32
33
49class IOVRegistrationSvc : public extends<AthService, IIOVRegistrationSvc>
50{
51
52public:
53
54 IOVRegistrationSvc( const std::string& name, ISvcLocator* svc );
55
56 virtual ~IOVRegistrationSvc();
57
59 virtual const InterfaceID& type() const;
60
64 virtual StatusCode registerIOV( std::string_view typeName ) const;
65
70 virtual StatusCode registerIOV( std::string_view typeName, std::string_view tag ) const;
71
76 virtual StatusCode registerIOV( std::string_view typeName, std::string_view key,
77 std::string_view tag ) const;
78
81 virtual StatusCode registerIOV( std::string_view typeName,
82 std::string_view tag,
83 unsigned int beginRun,
84 unsigned int endRun,
85 unsigned int beginLB,
86 unsigned int endLB ) const;
87
88
91 virtual StatusCode registerIOV( std::string_view typeName,
92 std::string_view tag,
93 uint64_t beginTime,
94 uint64_t endTime ) const;
95
98 virtual StatusCode registerIOV( std::string_view typeName,
99 std::string_view key,
100 std::string_view tag,
101 unsigned int beginRun,
102 unsigned int endRun,
103 unsigned int beginLB,
104 unsigned int endLB ) const;
105
108 virtual StatusCode registerIOV( std::string_view typeName,
109 std::string_view key,
110 std::string_view tag,
111 uint64_t beginTime,
112 uint64_t endTime ) const;
113
116 virtual StatusCode registerIOV( std::string_view typeName,
117 std::string_view key,
118 std::string_view folder,
119 std::string_view tag,
120 unsigned int beginRun,
121 unsigned int endRun,
122 unsigned int beginLB,
123 unsigned int endLB ) const;
124
127 virtual StatusCode registerIOV( std::string_view typeName,
128 std::string_view key,
129 std::string_view folder,
130 std::string_view tag,
131 uint64_t beginTime,
132 uint64_t endTime ) const;
133
135 virtual StatusCode initialize();
136
138 virtual StatusCode finalize();
139
140
141private:
142
143 // Allow SvcFactory to instantiate the service.
144 friend class SvcFactory<IOVRegistrationSvc>;
145
146 StatusCode registerIOV(std::string_view typeName,
147 std::string_view key,
148 std::string_view folder,
149 std::string_view tag,
150 const IOVTime& begin,
151 const IOVTime& end) const;
152
153 StatusCode registerIOVCOOL(std::string_view typeName,
154 std::string_view key,
155 std::string_view folderName,
156 std::string_view tag,
157 const IOVTime& begin,
158 const IOVTime& end) const;
159
160 cool::StorageType::TypeId coralToCoolType(const std::string& parname,
161 const std::string& coralName) const;
162
163 StatusCode getStringAddress(const CLID& clid,
164 const std::string& key,
165 std::string& saddr) const;
166
167 uint64_t timeToNano(const unsigned long int timesec) const;
168
171 virtual StatusCode buildDescription(std::string_view identifier,
172 std::string_view value,
173 std::string & description) const;
174
176 StatusCode splitAddress(const std::string& address,
177 std::string& address_header,
178 std::string& address_data) const;
179
180 Gaudi::Property<bool> m_recreateFolders{this, "RecreateFolders", false};
181 Gaudi::Property<unsigned int> m_beginRun{this, "BeginRun", IOVTime::MINRUN};
182 Gaudi::Property<unsigned int> m_endRun{this, "EndRun", IOVTime::MAXRUN};
183 Gaudi::Property<unsigned int> m_beginLB{this, "BeginLB", IOVTime::MINEVENT};
184 Gaudi::Property<unsigned int> m_endLB{this, "EndLB", IOVTime::MAXEVENT};
185
186 Gaudi::Property<unsigned long> m_beginTime{this, "BeginTime", IOVTime::MINTIMESTAMP};
187 Gaudi::Property<unsigned long> m_endTime{this, "EndTime", IOVTime::MAXEVENT}; // as the time parameter is only 32bit
188
189 Gaudi::Property<std::string> m_tag{this, "IOVDbTag", ""};
190 Gaudi::Property<bool> m_timeStamp{this, "IOVDbTimeStamp", false};
191 Gaudi::Property<std::string> m_tagDescription{this, "TagDescription", "Athena IOVRegistrationSvc"};
192 Gaudi::Property<bool> m_writeKeyInfo{this, "writeKeyInfo", true};
193 Gaudi::Property<bool> m_userTags{this, "userTags", true};
194 Gaudi::Property<bool> m_userTagsUH{this, "userTagsUpdateHead", false};
195 Gaudi::Property<bool> m_svFolder{this, "SVFolder", false};
196 Gaudi::Property<bool> m_payloadTable{this, "PayloadTable", false};
197 Gaudi::Property<bool> m_forceGlobalIOV{this, "UseGlobalIOVForCollections", false};
198 Gaudi::Property<std::vector<std::string>> m_overrideName{this, "OverrideNames", {}};
199 Gaudi::Property<std::vector<std::string>> m_overrideType{this, "OverrideTypes", {}};
200
205
206};
207
208#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
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
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.
virtual StatusCode registerIOV(std::string_view typeName) const
Register IOV DB for an object given its typeName - run/LB numbers interval or times interval and tag ...
Gaudi::Property< std::vector< std::string > > m_overrideName
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
StatusCode registerIOVCOOL(std::string_view typeName, std::string_view key, std::string_view folderName, std::string_view tag, const IOVTime &begin, const IOVTime &end) const
virtual const InterfaceID & type() const
Service type.
cool::StorageType::TypeId coralToCoolType(const std::string &parname, const std::string &coralName) const
virtual StatusCode buildDescription(std::string_view identifier, std::string_view value, std::string &description) const
Build the folder description field add in front of the description the value with identifier-markups.
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:93