|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef IOVDBSVC_IOVDBFOLDER_H
10 #define IOVDBSVC_IOVDBFOLDER_H
13 #include "GaudiKernel/IClassIDSvc.h"
19 #include "CoolKernel/ChannelSelection.h"
20 #include "CoolKernel/ValidityKey.h"
21 #include "CoolKernel/IFolder.h"
34 #include "nlohmann/json.hpp"
39 class IAddressCreator;
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);
62 const std::string&
key()
const;
80 const std::string&
joTag()
const;
101 const unsigned int time);
109 bool cacheValid(
const cool::ValidityKey reftime)
const;
112 bool loadCache(
const cool::ValidityKey vkey,
const unsigned int cacheDiv,
113 const std::string&
globalTag,
const bool ignoreMissChan);
120 bool getAddress(
const cool::ValidityKey reftime,IAddressCreator* persSvc,
121 const unsigned int poolSvcContext,
122 std::unique_ptr<IOpaqueAddress>&
address,
128 std::unique_ptr<SG::TransientAddress>
130 const unsigned int cacheRun,
131 const unsigned int cacheTime);
139 const cool::IDatabasePtr& dbPtr,
166 std::unique_ptr<SG::TransientAddress>
170 void setCacheLength(
const bool timeIs_nsOfEpoch,
const unsigned int cacheRun,
const unsigned int cacheTime);
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"
193 if ((
iov.first < objSince) and (objSince <
iov.second)){
197 ATH_MSG_DEBUG(
"special reload needed on THIS ONE !!!!!!!!!!!");
204 if ( (objSince>=
iov.first and objSince<
iov.second) or (objUntil>
iov.first and objUntil<=
iov.second) ) covered=
true;
217 return objItr->goToNext();
222 return objItr->hasNext();
234 using IOVHash=std::pair<IOVDbNamespace::IovStore::Iov_t,std::string>;
243 , cool::ValidityKey
until
244 ,
bool vectorPayloadFlag
245 , cool::ValidityKey vkey
246 ,
const std::string& nodeDesc);
251 void dumpFile(
const std::string& dumpName
252 ,
const cool::ValidityKey& vkey
256 ,
const std::string& crestNodeDescr
257 ,
const std::string& specString
289 typedef std::pair<cool::ChannelId,cool::ChannelId>
ChanRange;
386 return ((reftime>cacheStart) and (reftime<cacheStop));
391 #endif // IOVDBSVC_IOVDBFOLDER_H
void extendIov(const unsigned int idx, const cool::ValidityKey &newUntilTime)
Extend a specific iov at the index to a new 'until' time.
const bool m_outputToFile
std::vector< unsigned int > m_cacheccend
const bool m_crestCoolToFile
unsigned long long bytesRead() const
bool magicTag(std::string &tag)
IIOVDbMetaDataTool * p_metaDataTool
Validity Range object. Holds two IOVTimes (start and stop)
const std::string & joTag() const
std::string find(const std::string &s)
return a remapped string
unsigned int m_ncacheread
std::vector< IOVDbNamespace::BasicFolder > fetchCrestObjects(cool::ValidityKey since, cool::ValidityKey until, bool vectorPayloadFlag, cool::ValidityKey vkey, const std::string &nodeDesc)
Validity Range object. Holds two IOVTime instances (start and stop)
std::pair< cool::ChannelId, cool::ChannelId > ChanRange
const std::string m_crestTag
const std::string m_crestServer
cool::ValidityKey iovTime(const IOVTime &reftime) const
std::vector< IOVHash > fetchCrestIOVs()
std::unique_ptr< SG::TransientAddress > createTransientAddress(const std::vector< std::string > &symlinks)
void specialCacheUpdate(CoraCoolObject &obj, const ServiceHandle< IIOVSvc > &iovSvc)
nlohmann::json m_tag_info
cool::ValidityKey m_cachelength
bool getAddress(const cool::ValidityKey reftime, IAddressCreator *persSvc, const unsigned int poolSvcContext, std::unique_ptr< IOpaqueAddress > &address, IOVRange &range, bool &poolPayloadRequested)
std::pair< IOVDbNamespace::IovStore::Iov_t, std::string > IOVHash
const std::string & eventStore() const
cool::ChannelSelection m_chansel
void setTagOverride(const std::string &tag, const bool setFlag)
ITagInfoMgr * p_tagInfoMgr
This class is a collection of AttributeLists where each one is associated with a channel number....
void setSharedSpec(const coral::AttributeList &atrlist)
bool loadCache(const cool::ValidityKey vkey, const unsigned int cacheDiv, const std::string &globalTag, const bool ignoreMissChan)
const std::string & folderName() const
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
IOVDbNamespace::FolderType m_foldertype
IOVDbNamespace::FolderType folderType() const
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
The Athena Transient Store API.
cool::ValidityKey m_iovoverride
bool addMetaAttrListColl(const CondAttrListCollection *coll)
std::unique_ptr< SG::TransientAddress > preLoadFolder(ITagInfoMgr *tagInfoMgr, const unsigned int cacheRun, const unsigned int cacheTime)
bool cacheValid(const cool::ValidityKey reftime) const
std::vector< std::string > m_channames
bool loadCacheIfDbChanged(const cool::ValidityKey vkey, const std::string &globalTag, const cool::IDatabasePtr &dbPtr, const ServiceHandle< IIOVSvc > &iovSvc)
IOVDbNamespace::IovStore m_iovs
Iov_t getCacheBounds() const
Report the current cache bounds.
Class to provide easy MsgStream access and capabilities.
void setIOVOverride(const unsigned int run, const unsigned int lumiblock, const unsigned int time)
const std::string & resolvedTag() const
std::vector< TFile * > fptr
void setFlag(TrigPassFlags *flags, const T *obj, const CONTAINER *container, const std::vector< bool > &flag)
Set the flag at index position.
std::string m_folderDescription
const std::string m_source
uint32_t CLID
The Class ID type.
MsgStream & msg() const
The standard message stream.
bool addMetaAttrList(const coral::AttributeList &atrlist, const IOVRange &range)
void addIOVtoCache(cool::ValidityKey since, cool::ValidityKey until)
bool iovOverridden() const
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
std::pair< cool::ValidityKey, size_t > IOV2Index
std::vector< ChanRange > m_chanrange
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)
bool objectIteratorIsValid(CoraCoolObjectIterPtr &objItr)
std::vector< cool::ChannelId > m_channums
const std::string & key() const
unsigned int cacheUpdateImplementation(T &obj, const ServiceHandle< IIOVSvc > &iovSvc)
coral::AttributeListSpecification * m_cachespec
This is a Athena service which manages detector description tag information. It maintains a TagInfo o...
const IOVRange & currentRange() const
boost::shared_ptr< CoraCoolObjectIter > CoraCoolObjectIterPtr
bool resolveTag(const cool::IFolderPtr &fptr, const std::string &globalTag)
def time(flags, cells_name, *args, **kw)
void setCacheLength(const bool timeIs_nsOfEpoch, const unsigned int cacheRun, const unsigned int cacheTime)
bool multiVersion() const
helper class for IOVDbFolder managing cached iov since/until pairs
bool overrideOptionsFromParsedDescription(const IOVDbParser &parsedDescription)
std::vector< cool::ChannelId > m_cachechan
Iov_t at(const unsigned int idx) const
'at' to read iov at specific index
unsigned long long m_nbytesread
void setDropped(const bool dropped)
std::vector< unsigned int > m_cacheccstart
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
bool objectIteratorIsValid(cool::IObjectIteratorPtr &objItr)
std::vector< coral::AttributeList > m_cacheattr
std::string description
glabal timer - how long have I taken so far?
bool fromMetaDataOnly() const
void setFolderDescription(const std::string &description)