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