ATLAS Offline Software
IOVDbFolder.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 // IOVDbFolder.h
6 // helper class for IOVDbSvc managing folder access
7 // Richard Hawkings, started 24/11/08
8 
9 #ifndef IOVDBSVC_IOVDBFOLDER_H
10 #define IOVDBSVC_IOVDBFOLDER_H
11 
12 #include <string>
13 #include "GaudiKernel/IClassIDSvc.h"
15 #include "AthenaKernel/IOVTime.h"
16 #include "AthenaKernel/IOVRange.h"
17 #include "AthenaKernel/IIOVSvc.h"
18 
19 #include "CoolKernel/ChannelSelection.h"
20 #include "CoolKernel/ValidityKey.h"
21 #include "CoolKernel/IFolder.h"
23 #include "IOVDbParser.h"
24 
27 #include <memory>
28 #include <algorithm>
29 #include "FolderTypes.h"
30 #include "BasicFolder.h"
31 #include "IovStore.h"
32 
33 #include <map>
34 #include "nlohmann/json.hpp"
35 
36 class MsgStream;
37 class IOVDbConn;
38 class IOpaqueAddress;
39 class IAddressCreator;
40 class StoreGateSvc;
41 class IIOVDbMetaDataTool;
43 class ITagInfoMgr;
44 
45 namespace IOVDbNamespace {
46  class Cool2Json;
47  class BasicFolder;
48 }
49 
50 class IOVDbFolder : public AthMessaging {
51 public:
52  IOVDbFolder(IOVDbConn* conn, const IOVDbParser& folderprop, MsgStream& msg,
53  IClassIDSvc* clidsvc, IIOVDbMetaDataTool* metadatatool,
54  const bool checklock, const bool outputToFile=false,
55  const std::string & source="COOL_DATABASE", const bool crestToFile=false,
56  const std::string & crestServer="",const std::string & crestTag="",const bool crestCoolToFile=false);
57  ~IOVDbFolder();
58 
59 
60  // access methods to various internal information
61  const std::string& folderName() const;
62  const std::string& key() const;
63  IOVDbConn* conn();
64  bool multiVersion() const;
65  bool timeStamp() const;
66  bool tagOverride() const;
67  bool retrieved() const;
68  bool noOverride() const;
70  bool readMeta() const;
71  bool writeMeta() const;
72  // read from meta data only, otherwise ignore folder
73  bool fromMetaDataOnly() const;
74  // If true, then the end time for an open-ended range will be set to just
75  // past the current event. The end time will be automatically updated on accesses
76  // in subsequent events.
77  bool extensible() const;
78  bool dropped() const;
79  bool iovOverridden() const;
80  const std::string& joTag() const;
81  const std::string& resolvedTag() const;
82  const std::string& eventStore() const;
83  CLID clid() const;
84  unsigned long long bytesRead() const;
85  float readTime() const;
86  const IOVRange& currentRange() const;
87 
88  // set methods - used after folder creation to set properties externally
89 
90  // mark this folder as using metadata from an input file
91  void useFileMetaData();
92  // set folder description
93  void setFolderDescription(const std::string& description);
94  // set tag override, set override flag as well if setFlag is true
95  // override flag prevents reading of FLMD for this folder if present
96  void setTagOverride(const std::string& tag,const bool setFlag);
97  // set writeMeta flag
98  void setWriteMeta();
99  // set IOV overrides
100  void setIOVOverride(const unsigned int run,const unsigned int lumiblock,
101  const unsigned int time);
102  // mark object as dropped from Storegate
103  void setDropped(const bool dropped);
104 
105  // get validityKey for folder, given current time (accounting for overrides)
106  cool::ValidityKey iovTime(const IOVTime& reftime) const;
107 
108  // check cache is valid for current time
109  bool cacheValid(const cool::ValidityKey reftime) const;
110 
111  // load cache for given validitykey and globalTag
112  bool loadCache(const cool::ValidityKey vkey, const unsigned int cacheDiv,
113  const std::string& globalTag, const bool ignoreMissChan);
114 
115  // reset cache to empty
116  void resetCache();
117 
118  // fill in object details from cache
119  // set poolPayloadRequested flag if a POOL file was referenced
120  bool getAddress(const cool::ValidityKey reftime,IAddressCreator* persSvc,
121  const unsigned int poolSvcContext,
122  std::unique_ptr<IOpaqueAddress>& address,
123  IOVRange& range,bool& poolPayloadRequested);
124 
125  // make summary of usage
126  void summary();
127  // preload address to Storegate (does folder initialisation from COOL)
128  std::unique_ptr<SG::TransientAddress>
129  preLoadFolder(ITagInfoMgr *tagInfoMgr,
130  const unsigned int cacheRun,
131  const unsigned int cacheTime);
132 
133  // print out cache
134  void printCache();
135  // reload cache in online mode if ValidityKey returns a new object
136  // with start > previously used start
137  bool loadCacheIfDbChanged(const cool::ValidityKey vkey,
138  const std::string& globalTag,
139  const cool::IDatabasePtr& dbPtr,
140  const ServiceHandle<IIOVSvc>& iovSvc);
141 
142 private:
143  // clear cache vectors
144  void clearCache();
145  // resolve tag in given folder, using global tag if needed
146  bool resolveTag(const cool::IFolderPtr& fptr, const std::string& globalTag);
147  // interpret given tag as a magic tag
148  bool magicTag(std::string& tag);
149  // call metadata writing tool for given list and range
150  // - version for single channel AttributeList
151  bool addMetaAttrList(const coral::AttributeList& atrlist,
152  const IOVRange& range);
153  // - version for multichannel collection
155 
156  // setup shared AttributeListSpecification cache
157  void setSharedSpec(const coral::AttributeList& atrlist);
158 
159  // add this IOV to cache, including channel counting if over edge of cache
160  void addIOVtoCache(cool::ValidityKey since, cool::ValidityKey until);
161 
162  //override intrinsic (member variable) options from the from a parsed folder description
163  bool overrideOptionsFromParsedDescription(const IOVDbParser & parsedDescription);
164 
165  //create transient address, processing symlinks if given
166  std::unique_ptr<SG::TransientAddress>
167  createTransientAddress(const std::vector<std::string> & symlinks);
168 
169  //setup cache length according to whether timestamp==ns of epoch
170  void setCacheLength(const bool timeIs_nsOfEpoch, const unsigned int cacheRun, const unsigned int cacheTime);
171 
172  //update the cache using either a Cool or CoraCool object (templated)
173  template<class T>
174  unsigned int
176  const auto & objSince = obj.since();
177  const auto & objUntil = obj.until();
178  const auto & objChannel = obj.channelId();
179  ATH_MSG_DEBUG("from DB \t chID: "<<objChannel<<"\tobjstart:\t"<<objSince<<"\t objstop: \t"
180  << objUntil );
181  // The covered flag is used to check whether the
182  // requested IOV time is inside the range covered
183  // by the current cache. If not, a cache reset
184  // will be done.
185  unsigned int counter{};
186  bool covered{false};
187  //find the iterator distance into the channel array which gives the sought ChannelId
188  const auto pCacheChannel = std::find(m_cachechan.begin(), m_cachechan.end(), objChannel);
189  if (pCacheChannel != m_cachechan.end()){
190  //find corresponding iov, which we shall modify
191  const auto iovIdx = std::distance(m_cachechan.begin(), pCacheChannel);
192  const auto & iov = m_iovs.at(iovIdx);
193  if ((iov.first < objSince) and (objSince < iov.second)){
194  // obj time is larger than cache start (and less than cache stop)
195  // ==> update cache
196  ++counter;
197  ATH_MSG_DEBUG("special reload needed on THIS ONE !!!!!!!!!!!");
198  // just change existing IOVRange
199  ATH_MSG_DEBUG("changing "<<iov.second<<" to "<<objSince-1);
200  m_iovs.extendIov(iovIdx, objSince-1);
201  specialCacheUpdate(obj, iovSvc); // reset proxy, add to cache, addIOV
202  covered = true;
203  }
204  if ( (objSince>=iov.first and objSince<iov.second) or (objUntil>iov.first and objUntil<=iov.second) ) covered=true;
205  }
206  if (!covered) {
207  // cache range has not been covered, so update the cache
208  ++counter;
209  specialCacheUpdate(obj, iovSvc);
210  }
211  return counter;
212  }
213 
214 
215  bool
216  objectIteratorIsValid( cool::IObjectIteratorPtr & objItr){
217  return objItr->goToNext();
218  }
219 
220  bool
222  return objItr->hasNext();
223  }
224 
225 
226  // cache update for online mode
227  void
229 
230  void
231  specialCacheUpdate(const cool::IObject& obj,const ServiceHandle<IIOVSvc>& iovSvc);
232 
233  // _________ Helper functions for the CREST reading _________
234  using IOVHash=std::pair<IOVDbNamespace::IovStore::Iov_t,std::string>;
235  using IOV2Index=std::pair<cool::ValidityKey,size_t>;
236 
237  // Function which converts openended CREST IOVs into non-overlapping IOVs
238  // It returns a vector of non-overlapping IOVs + corresponding Hashes
239  std::vector<IOVHash> fetchCrestIOVs();
240 
241  // Function which reads CREST objects by the cache IOV boundaries
242  std::vector<IOVDbNamespace::BasicFolder> fetchCrestObjects(cool::ValidityKey since
243  , cool::ValidityKey until
244  , bool vectorPayloadFlag
245  , cool::ValidityKey vkey /* Temporary! */
246  , const std::string& nodeDesc);
247 
248  // __________________________________________________________
249 
250  // Function for generating dump files
251  void dumpFile(const std::string& dumpName
252  , const cool::ValidityKey& vkey
253  , IOVDbNamespace::Cool2Json* json // Argument for dumping COOL data
254  , bool skipCoolIoV // Argument for dumping COOL data
255  , IOVDbNamespace::BasicFolder* basicFolder // Argument for dumping CREST data
256  , const std::string& crestNodeDescr // Argument for dumping CREST data
257  , const std::string& specString // Argument for dumping CREST data
258  ) const;
259 
260  ITagInfoMgr* p_tagInfoMgr{nullptr}; // pointer to TagInfoMgr
261  IClassIDSvc* p_clidSvc{nullptr}; // pointer to CLID service
262  IIOVDbMetaDataTool* p_metaDataTool{nullptr}; // pointer to metadata tool (writing)
263  IOVDbConn* m_conn{nullptr}; // pointer to corresponding IOVDbConn object (=0 FLMD)
264  std::string m_foldername; // COOL foldername
265  std::string m_key; // SG key where data is loaded (unique)
266  std::string m_folderDescription;// folder description
267  bool m_multiversion{false}; // is folder multiversion
268  bool m_timestamp{false}; // is folder indexed by timestamp (else runLB)
269  bool m_tagoverride{false}; // is tag reset from override (needed for FLMD)
270  bool m_notagoverride{false}; // tag must not be overridden from input file
271  bool m_writemeta{false}; // is writing to metadata
272  bool m_useFileMetaData{false}; // is using input File MetaData
273  bool m_fromMetaDataOnly{false}; // to be read from metadata only
274  bool m_extensible{false}; // is this an extensible folder?
275  bool m_named{false}; // folder has named channels
276  bool m_iovoverridden{false}; // folder has IOV override
277  bool m_jokey{false}; // folder has non-default key from joboptions
278  bool m_dropped{false}; // data object was dropped from SG
279  bool m_autocache{true}; // indicates if cache length was automatically set
280  bool m_checklock{true}; // indicates if global tags should be checked locked
281  cool::ValidityKey m_iovoverride{0}; // validity key to use
282  IOVDbNamespace::FolderType m_foldertype; // type of data in folder (enum)
283 
284  cool::ValidityKey m_cachelength{0}; // length of cache
285  int m_cachehint{0}; // cachehint value (set initial size to Nxchan)
286  int m_cacheinc{0}; // number of cache increments performed
287 
288  cool::ChannelSelection m_chansel; // COOL channel selection
289  typedef std::pair<cool::ChannelId,cool::ChannelId> ChanRange;
290  std::vector<ChanRange> m_chanrange; // explicit list of channel ranges
291  // channel range list needed to work around COOL bug 42708 which does not
292  // properly select channels in non-contiguous ranges
293  std::string m_jotag; // raw tag found on job options
294  std::string m_tag; // resolved tag actually used for lookup
295  std::string m_typename; // typename, read from folder description
296  std::string m_eventstore; // associated event store name
297  std::string m_cachepar; // folder cache parameter read from jobopt/desc
298  std::string m_addrheader; // address header string from folder description
299  CLID m_clid{0}; // CLID, read from folder description or ClassIDSvc
300 
301  unsigned int m_ndbread{0}; // number of times data read from DB
302  unsigned int m_ncacheread{0}; // number of times data read from cache
303  unsigned int m_nobjread{0}; // number of objects read from DB
304  unsigned long long m_nbytesread{0}; // number of bytes read from DB
305  float m_readtime{0}; // time spent reading data from COOL (in loadcache)
306 
307  // channel number and names (latter only filled for 'named' folders)
308  unsigned int m_nchan{0};
309  std::vector<cool::ChannelId> m_channums;
310  std::vector<std::string> m_channames;
311 
312  // current range and validity flag
313  bool m_retrieved{false};
315 
316  // COOL data cache and limits
317  coral::AttributeListSpecification* m_cachespec{nullptr};
318  std::vector<cool::ChannelId> m_cachechan;
319  std::vector<coral::AttributeList> m_cacheattr;
320  std::vector<unsigned int> m_cacheccstart;
321  std::vector<unsigned int> m_cacheccend;
323  const bool m_outputToFile{false};
324  const bool m_crestToFile{false};
325  const bool m_crestCoolToFile{false};
326  const std::string m_source;
327  const std::string m_crestServer;
328  const std::string m_crestTag;
329  std::string m_crest_tag = "";
331 };
332 
333 inline const std::string& IOVDbFolder::folderName() const {return m_foldername;}
334 inline const std::string& IOVDbFolder::key() const { return m_key;}
335 
336 inline IOVDbConn* IOVDbFolder::conn() { return m_conn;}
337 
338 inline bool IOVDbFolder::multiVersion() const { return m_multiversion; }
339 
340 inline bool IOVDbFolder::timeStamp() const { return m_timestamp; }
341 
342 inline bool IOVDbFolder::tagOverride() const { return m_tagoverride; }
343 
344 inline bool IOVDbFolder::noOverride() const { return m_notagoverride; }
345 
346 inline bool IOVDbFolder::retrieved() const { return m_retrieved; }
347 
349 {return m_foldertype;}
350 
351 inline void IOVDbFolder::setFolderDescription(const std::string& description)
353 
354 inline bool IOVDbFolder::readMeta() const { return m_useFileMetaData; }
355 
356 inline bool IOVDbFolder::writeMeta() const { return m_writemeta; }
357 
358 inline bool IOVDbFolder::fromMetaDataOnly() const { return m_fromMetaDataOnly; }
359 
360 inline bool IOVDbFolder::extensible() const { return m_extensible; }
361 
362 inline bool IOVDbFolder::dropped() const { return m_dropped; }
363 
364 inline bool IOVDbFolder::iovOverridden() const { return m_iovoverridden; }
365 
366 inline const std::string& IOVDbFolder::joTag() const { return m_jotag; }
367 
368 inline const std::string& IOVDbFolder::resolvedTag() const { return m_tag; }
369 
370 inline const std::string& IOVDbFolder::eventStore() const
371 { return m_eventstore; }
372 
373 inline CLID IOVDbFolder::clid() const { return m_clid; }
374 
375 inline unsigned long long IOVDbFolder::bytesRead() const
376 { return m_nbytesread; }
377 
378 inline float IOVDbFolder::readTime() const
379 { return m_readtime; }
380 
381 inline const IOVRange& IOVDbFolder::currentRange() const { return m_currange; }
382 
383 inline bool IOVDbFolder::cacheValid(const cool::ValidityKey reftime) const {
384  const auto & [cacheStart, cacheStop]=m_iovs.getCacheBounds();
385  // cppcheck-suppress incorrectLogicOperator; cppcheck 2.6 false positive: it doesn't understand destructuring
386  return ((reftime>cacheStart) and (reftime<cacheStop));
387 }
388 
389 inline void IOVDbFolder::setDropped(const bool dropped) { m_dropped=dropped; }
390 
391 #endif // IOVDBSVC_IOVDBFOLDER_H
392 
IOVDbFolder::m_dropped
bool m_dropped
Definition: IOVDbFolder.h:278
IOVDbNamespace::IovStore::extendIov
void extendIov(const unsigned int idx, const cool::ValidityKey &newUntilTime)
Extend a specific iov at the index to a new 'until' time.
Definition: IovStore.cxx:77
IOVDbFolder::writeMeta
bool writeMeta() const
Definition: IOVDbFolder.h:356
IOVDbFolder::m_outputToFile
const bool m_outputToFile
Definition: IOVDbFolder.h:323
IOVDbFolder::m_cacheccend
std::vector< unsigned int > m_cacheccend
Definition: IOVDbFolder.h:321
IOVDbNamespace::Cool2Json
Definition: Cool2Json.h:26
CoraCoolObject
Definition: CoraCoolObject.h:20
IOVDbFolder::tagOverride
bool tagOverride() const
Definition: IOVDbFolder.h:342
IOVDbFolder::m_crestCoolToFile
const bool m_crestCoolToFile
Definition: IOVDbFolder.h:325
IOVDbFolder::bytesRead
unsigned long long bytesRead() const
Definition: IOVDbFolder.h:375
IOVDbFolder::m_useFileMetaData
bool m_useFileMetaData
Definition: IOVDbFolder.h:272
IOVDbFolder::magicTag
bool magicTag(std::string &tag)
Definition: IOVDbFolder.cxx:1102
IOVDbFolder::dropped
bool dropped() const
Definition: IOVDbFolder.h:362
IOVDbFolder::m_checklock
bool m_checklock
Definition: IOVDbFolder.h:280
IOVDbFolder::p_metaDataTool
IIOVDbMetaDataTool * p_metaDataTool
Definition: IOVDbFolder.h:262
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
IOVDbFolder::m_foldername
std::string m_foldername
Definition: IOVDbFolder.h:264
IOVDbFolder::m_tagoverride
bool m_tagoverride
Definition: IOVDbFolder.h:269
IOVDbFolder::conn
IOVDbConn * conn()
Definition: IOVDbFolder.h:336
IOVDbFolder::m_retrieved
bool m_retrieved
Definition: IOVDbFolder.h:313
IOVDbFolder::joTag
const std::string & joTag() const
Definition: IOVDbFolder.h:366
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
IOVDbFolder::noOverride
bool noOverride() const
Definition: IOVDbFolder.h:344
IOVDbFolder::m_ncacheread
unsigned int m_ncacheread
Definition: IOVDbFolder.h:302
python.MagFieldUtils.lumiblock
lumiblock
Definition: MagFieldUtils.py:188
IOVDbFolder::fetchCrestObjects
std::vector< IOVDbNamespace::BasicFolder > fetchCrestObjects(cool::ValidityKey since, cool::ValidityKey until, bool vectorPayloadFlag, cool::ValidityKey vkey, const std::string &nodeDesc)
Definition: IOVDbFolder.cxx:1258
IOVRange.h
Validity Range object. Holds two IOVTime instances (start and stop)
json
nlohmann::json json
Definition: HistogramDef.cxx:9
IOVDbFolder::m_jokey
bool m_jokey
Definition: IOVDbFolder.h:277
IOVDbFolder::ChanRange
std::pair< cool::ChannelId, cool::ChannelId > ChanRange
Definition: IOVDbFolder.h:289
IOVDbFolder::m_crestTag
const std::string m_crestTag
Definition: IOVDbFolder.h:328
IOVDbFolder::m_crestServer
const std::string m_crestServer
Definition: IOVDbFolder.h:327
IOVDbFolder::iovTime
cool::ValidityKey iovTime(const IOVTime &reftime) const
Definition: IOVDbFolder.cxx:212
IOVDbFolder::m_currange
IOVRange m_currange
Definition: IOVDbFolder.h:314
IOVDbFolder::m_cacheinc
int m_cacheinc
Definition: IOVDbFolder.h:286
IOVDbFolder::fetchCrestIOVs
std::vector< IOVHash > fetchCrestIOVs()
Definition: IOVDbFolder.cxx:1171
IOVDbFolder::extensible
bool extensible() const
Definition: IOVDbFolder.h:360
IOVDbFolder::timeStamp
bool timeStamp() const
Definition: IOVDbFolder.h:340
IOVDbFolder::createTransientAddress
std::unique_ptr< SG::TransientAddress > createTransientAddress(const std::vector< std::string > &symlinks)
Definition: IOVDbFolder.cxx:871
IOVDbFolder::useFileMetaData
void useFileMetaData()
Definition: IOVDbFolder.cxx:161
IOVDbFolder::specialCacheUpdate
void specialCacheUpdate(CoraCoolObject &obj, const ServiceHandle< IIOVSvc > &iovSvc)
Definition: IOVDbFolder.cxx:570
IOVDbFolder::m_tag_info
nlohmann::json m_tag_info
Definition: IOVDbFolder.h:330
IOVDbFolder::m_cachelength
cool::ValidityKey m_cachelength
Definition: IOVDbFolder.h:284
IOVDbFolder::getAddress
bool getAddress(const cool::ValidityKey reftime, IAddressCreator *persSvc, const unsigned int poolSvcContext, std::unique_ptr< IOpaqueAddress > &address, IOVRange &range, bool &poolPayloadRequested)
Definition: IOVDbFolder.cxx:631
AthTPCnvSvc_test.clidsvc
clidsvc
Definition: AthTPCnvSvc_test.py:10
IOVDbFolder::m_tag
std::string m_tag
Definition: IOVDbFolder.h:294
IOVDbFolder::IOVHash
std::pair< IOVDbNamespace::IovStore::Iov_t, std::string > IOVHash
Definition: IOVDbFolder.h:234
IOVDbFolder::eventStore
const std::string & eventStore() const
Definition: IOVDbFolder.h:370
IOVDbFolder::m_chansel
cool::ChannelSelection m_chansel
Definition: IOVDbFolder.h:288
IOVDbFolder::setTagOverride
void setTagOverride(const std::string &tag, const bool setFlag)
Definition: IOVDbFolder.cxx:172
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
IOVDbFolder::p_tagInfoMgr
ITagInfoMgr * p_tagInfoMgr
Definition: IOVDbFolder.h:260
IOVDbFolder::m_fromMetaDataOnly
bool m_fromMetaDataOnly
Definition: IOVDbFolder.h:273
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
IOVDbFolder
Definition: IOVDbFolder.h:50
IOVDbFolder::setSharedSpec
void setSharedSpec(const coral::AttributeList &atrlist)
Definition: IOVDbFolder.cxx:1136
IOVDbFolder::loadCache
bool loadCache(const cool::ValidityKey vkey, const unsigned int cacheDiv, const std::string &globalTag, const bool ignoreMissChan)
Definition: IOVDbFolder.cxx:221
IOVDbFolder::summary
void summary()
Definition: IOVDbFolder.cxx:814
CoraCoolObject.h
IOVDbFolder::folderName
const std::string & folderName() const
Definition: IOVDbFolder.h:333
IOVTime.h
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
IOVDbFolder::m_foldertype
IOVDbNamespace::FolderType m_foldertype
Definition: IOVDbFolder.h:282
dq_defect_copy_defect_database.since
def since
Definition: dq_defect_copy_defect_database.py:54
IOVDbFolder::folderType
IOVDbNamespace::FolderType folderType() const
Definition: IOVDbFolder.h:348
dq_defect_copy_defect_database.until
def until
Definition: dq_defect_copy_defect_database.py:55
IOVDbFolder::m_addrheader
std::string m_addrheader
Definition: IOVDbFolder.h:298
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
IOVDbFolder::clid
CLID clid() const
Definition: IOVDbFolder.h:373
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
IOVDbFolder::m_readtime
float m_readtime
Definition: IOVDbFolder.h:305
IOVDbFolder::m_jotag
std::string m_jotag
Definition: IOVDbFolder.h:293
IOVDbFolder::m_iovoverride
cool::ValidityKey m_iovoverride
Definition: IOVDbFolder.h:281
IOVDbFolder::addMetaAttrListColl
bool addMetaAttrListColl(const CondAttrListCollection *coll)
Definition: IOVDbFolder.cxx:1122
IOVDbFolder::preLoadFolder
std::unique_ptr< SG::TransientAddress > preLoadFolder(ITagInfoMgr *tagInfoMgr, const unsigned int cacheRun, const unsigned int cacheTime)
Definition: IOVDbFolder.cxx:890
IOVDbFolder::p_clidSvc
IClassIDSvc * p_clidSvc
Definition: IOVDbFolder.h:261
IOVDbFolder::~IOVDbFolder
~IOVDbFolder()
Definition: IOVDbFolder.cxx:157
IOVDbFolder::cacheValid
bool cacheValid(const cool::ValidityKey reftime) const
Definition: IOVDbFolder.h:383
IOVDbFolder::m_cachehint
int m_cachehint
Definition: IOVDbFolder.h:285
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IOVDbFolder::m_clid
CLID m_clid
Definition: IOVDbFolder.h:299
IOVDbFolder::m_cachepar
std::string m_cachepar
Definition: IOVDbFolder.h:297
IOVDbFolder::m_channames
std::vector< std::string > m_channames
Definition: IOVDbFolder.h:310
IOVDbParser.h
IOVDbFolder::loadCacheIfDbChanged
bool loadCacheIfDbChanged(const cool::ValidityKey vkey, const std::string &globalTag, const cool::IDatabasePtr &dbPtr, const ServiceHandle< IIOVSvc > &iovSvc)
Definition: IOVDbFolder.cxx:506
IOVDbFolder::m_iovs
IOVDbNamespace::IovStore m_iovs
Definition: IOVDbFolder.h:322
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
IOVDbNamespace::IovStore::getCacheBounds
Iov_t getCacheBounds() const
Report the current cache bounds.
Definition: IovStore.cxx:31
IOVDbFolder::m_iovoverridden
bool m_iovoverridden
Definition: IOVDbFolder.h:276
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
IOVDbFolder::setIOVOverride
void setIOVOverride(const unsigned int run, const unsigned int lumiblock, const unsigned int time)
Definition: IOVDbFolder.cxx:187
IOVDbFolder::resolvedTag
const std::string & resolvedTag() const
Definition: IOVDbFolder.h:368
IOVDbFolder::m_crest_tag
std::string m_crest_tag
Definition: IOVDbFolder.h:329
IOVDbFolder::m_autocache
bool m_autocache
Definition: IOVDbFolder.h:279
IOVDbFolder::printCache
void printCache()
Definition: IOVDbFolder.cxx:1157
run
Definition: run.py:1
IIOVDbMetaDataTool
This is an interface to a tool used to manage the IOV Meta Data for a given object in the MetaData St...
Definition: IIOVDbMetaDataTool.h:44
fptr
std::vector< TFile * > fptr
Definition: hcg.cxx:48
HLT::setFlag
void setFlag(TrigPassFlags *flags, const T *obj, const CONTAINER *container, const std::vector< bool > &flag)
Set the flag at index position.
Definition: TrigPassFlags.h:121
IOVDbFolder::m_folderDescription
std::string m_folderDescription
Definition: IOVDbFolder.h:266
IOVDbFolder::m_source
const std::string m_source
Definition: IOVDbFolder.h:326
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
IOVDbFolder::addMetaAttrList
bool addMetaAttrList(const coral::AttributeList &atrlist, const IOVRange &range)
Definition: IOVDbFolder.cxx:1110
IOVDbFolder::m_writemeta
bool m_writemeta
Definition: IOVDbFolder.h:271
IOVDbFolder::addIOVtoCache
void addIOVtoCache(cool::ValidityKey since, cool::ValidityKey until)
Definition: IOVDbFolder.cxx:1150
IOVDbFolder::iovOverridden
bool iovOverridden() const
Definition: IOVDbFolder.h:364
IOVDbFolder::dumpFile
void dumpFile(const std::string &dumpName, const cool::ValidityKey &vkey, IOVDbNamespace::Cool2Json *json, bool skipCoolIoV, IOVDbNamespace::BasicFolder *basicFolder, const std::string &crestNodeDescr, const std::string &specString) const
Definition: IOVDbFolder.cxx:1213
IOVDbFolder::IOV2Index
std::pair< cool::ValidityKey, size_t > IOV2Index
Definition: IOVDbFolder.h:235
IOVDbConn
Definition: IOVDbConn.h:18
IOVDbNamespace::BasicFolder
Definition: BasicFolder.h:21
IOVDbParser
Definition: IOVDbParser.h:19
IOVDbFolder::m_chanrange
std::vector< ChanRange > m_chanrange
Definition: IOVDbFolder.h:290
IOVDbFolder::IOVDbFolder
IOVDbFolder(IOVDbConn *conn, const IOVDbParser &folderprop, MsgStream &msg, IClassIDSvc *clidsvc, IIOVDbMetaDataTool *metadatatool, const bool checklock, const bool outputToFile=false, const std::string &source="COOL_DATABASE", const bool crestToFile=false, const std::string &crestServer="", const std::string &crestTag="", const bool crestCoolToFile=false)
Definition: IOVDbFolder.cxx:70
IOVDbFolder::objectIteratorIsValid
bool objectIteratorIsValid(CoraCoolObjectIterPtr &objItr)
Definition: IOVDbFolder.h:221
IOVDbFolder::readTime
float readTime() const
Definition: IOVDbFolder.h:378
IOVDbFolder::m_channums
std::vector< cool::ChannelId > m_channums
Definition: IOVDbFolder.h:309
IOVDbFolder::m_nobjread
unsigned int m_nobjread
Definition: IOVDbFolder.h:303
IOVDbFolder::key
const std::string & key() const
Definition: IOVDbFolder.h:334
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
IIOVSvc.h
IOVDbFolder::cacheUpdateImplementation
unsigned int cacheUpdateImplementation(T &obj, const ServiceHandle< IIOVSvc > &iovSvc)
Definition: IOVDbFolder.h:175
IOVDbFolder::m_cachespec
coral::AttributeListSpecification * m_cachespec
Definition: IOVDbFolder.h:317
IOVDbFolder::m_nchan
unsigned int m_nchan
Definition: IOVDbFolder.h:308
IOVDbFolder::m_crestToFile
const bool m_crestToFile
Definition: IOVDbFolder.h:324
IOVDbFolder::m_named
bool m_named
Definition: IOVDbFolder.h:275
IOVDbFolder::clearCache
void clearCache()
Definition: IOVDbFolder.cxx:1035
ITagInfoMgr
This is a Athena service which manages detector description tag information. It maintains a TagInfo o...
Definition: ITagInfoMgr.h:58
IOVDbFolder::currentRange
const IOVRange & currentRange() const
Definition: IOVDbFolder.h:381
CoraCoolObjectIterPtr
boost::shared_ptr< CoraCoolObjectIter > CoraCoolObjectIterPtr
Definition: CoraCoolTypes.h:21
IOVDbFolder::resolveTag
bool resolveTag(const cool::IFolderPtr &fptr, const std::string &globalTag)
Definition: IOVDbFolder.cxx:1045
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
IOVDbFolder::m_notagoverride
bool m_notagoverride
Definition: IOVDbFolder.h:270
IOVDbFolder::retrieved
bool retrieved() const
Definition: IOVDbFolder.h:346
IOVDbFolder::setCacheLength
void setCacheLength(const bool timeIs_nsOfEpoch, const unsigned int cacheRun, const unsigned int cacheTime)
Definition: IOVDbFolder.cxx:1007
TransientAddress.h
IOVDbFolder::multiVersion
bool multiVersion() const
Definition: IOVDbFolder.h:338
IovStore.h
helper class for IOVDbFolder managing cached iov since/until pairs
AthMessaging.h
IOVDbFolder::overrideOptionsFromParsedDescription
bool overrideOptionsFromParsedDescription(const IOVDbParser &parsedDescription)
Definition: IOVDbFolder.cxx:829
FolderTypes.h
IOVDbFolder::m_cachechan
std::vector< cool::ChannelId > m_cachechan
Definition: IOVDbFolder.h:318
IOVDbFolder::m_ndbread
unsigned int m_ndbread
Definition: IOVDbFolder.h:301
IOVDbNamespace::IovStore::at
Iov_t at(const unsigned int idx) const
'at' to read iov at specific index
Definition: IovStore.h:49
Example_ReadSampleNoise.globalTag
globalTag
Definition: Example_ReadSampleNoise.py:15
CoraCoolObjectIter.h
BasicFolder.h
IOVDbFolder::m_multiversion
bool m_multiversion
Definition: IOVDbFolder.h:267
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
IOVDbFolder::m_nbytesread
unsigned long long m_nbytesread
Definition: IOVDbFolder.h:304
IOVDbFolder::resetCache
void resetCache()
Definition: IOVDbFolder.cxx:623
IOVDbFolder::setDropped
void setDropped(const bool dropped)
Definition: IOVDbFolder.h:389
IOVDbFolder::m_key
std::string m_key
Definition: IOVDbFolder.h:265
IOVDbFolder::m_cacheccstart
std::vector< unsigned int > m_cacheccstart
Definition: IOVDbFolder.h:320
test_pyathena.counter
counter
Definition: test_pyathena.py:15
python.PyAthena.obj
obj
Definition: PyAthena.py:135
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
IOVDbFolder::m_conn
IOVDbConn * m_conn
Definition: IOVDbFolder.h:263
IOVDbFolder::readMeta
bool readMeta() const
Definition: IOVDbFolder.h:354
IOVDbFolder::m_typename
std::string m_typename
Definition: IOVDbFolder.h:295
IOVDbFolder::objectIteratorIsValid
bool objectIteratorIsValid(cool::IObjectIteratorPtr &objItr)
Definition: IOVDbFolder.h:216
IOVDbFolder::m_timestamp
bool m_timestamp
Definition: IOVDbFolder.h:268
IOVDbFolder::m_cacheattr
std::vector< coral::AttributeList > m_cacheattr
Definition: IOVDbFolder.h:319
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
IOVDbFolder::setWriteMeta
void setWriteMeta()
Definition: IOVDbFolder.cxx:182
IOVDbNamespace::FolderType
FolderType
Definition: FolderTypes.h:26
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
IOVDbNamespace
Definition: Base64Codec.cxx:16
IOVDbFolder::fromMetaDataOnly
bool fromMetaDataOnly() const
Definition: IOVDbFolder.h:358
IOVDbNamespace::IovStore
Definition: IovStore.h:20
IOVDbFolder::setFolderDescription
void setFolderDescription(const std::string &description)
Definition: IOVDbFolder.h:351
IOVDbFolder::m_eventstore
std::string m_eventstore
Definition: IOVDbFolder.h:296
ServiceHandle< IIOVSvc >
IOVDbFolder::m_extensible
bool m_extensible
Definition: IOVDbFolder.h:274