|
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"
41 class IAddressCreator;
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);
64 const std::string&
key()
const;
82 const std::string&
joTag()
const;
103 const unsigned int time);
111 bool cacheValid(
const cool::ValidityKey reftime)
const;
114 bool loadCache(
const cool::ValidityKey vkey,
const unsigned int cacheDiv,
115 const std::string&
globalTag,
const bool ignoreMissChan);
122 bool getAddress(
const cool::ValidityKey reftime,IAddressCreator* persSvc,
123 const unsigned int poolSvcContext,
124 std::unique_ptr<IOpaqueAddress>&
address,
130 std::unique_ptr<SG::TransientAddress>
132 const unsigned int cacheRun,
133 const unsigned int cacheTime);
141 const cool::IDatabasePtr& dbPtr,
168 std::unique_ptr<SG::TransientAddress>
172 void setCacheLength(
const bool timeIs_nsOfEpoch,
const unsigned int cacheRun,
const unsigned int cacheTime);
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"
195 if ((
iov.first < objSince) and (objSince <
iov.second)){
199 ATH_MSG_DEBUG(
"special reload needed on THIS ONE !!!!!!!!!!!");
206 if ( (objSince>=
iov.first and objSince<
iov.second) or (objUntil>
iov.first and objUntil<=
iov.second) ) covered=
true;
219 return objItr->goToNext();
224 return objItr->hasNext();
236 using IOVHash=std::pair<IOVDbNamespace::IovStore::Iov_t,std::string>;
245 , cool::ValidityKey
until
246 ,
bool vectorPayloadFlag
247 , cool::ValidityKey vkey
248 ,
const std::string& nodeDesc);
253 void dumpFile(
const std::string& dumpName
254 ,
const cool::ValidityKey& vkey
258 ,
const std::string& crestNodeDescr
259 ,
const std::string& specString
291 typedef std::pair<cool::ChannelId,cool::ChannelId>
ChanRange;
389 return ((reftime>cacheStart) and (reftime<cacheStop));
394 #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::optional< IOVDbNamespace::CrestFunctions > m_cfunctions
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::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)
std::vector< IOVHash > fetchCrestIOVs(cool::ValidityKey since, cool::ValidityKey until)
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)
Header for CrestFunctions utilities.
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)