![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/Bootstrap.h"
9 #include "GaudiKernel/IOpaqueAddress.h"
10 #include "GaudiKernel/GenericAddress.h"
11 #include "GaudiKernel/IAddressCreator.h"
12 #include "GaudiKernel/ISvcLocator.h"
15 #include "CoolKernel/IObject.h"
16 #include "CoolKernel/IObjectIterator.h"
17 #include "CoolKernel/IRecord.h"
18 #include "CoolKernel/IRecordIterator.h"
19 #include "CoralBase/AttributeList.h"
20 #include "CoralBase/AttributeListSpecification.h"
21 #include "CoralBase/Attribute.h"
22 #include "CoralBase/AttributeSpecification.h"
23 #include "CoralBase/Blob.h"
24 #include "TStopwatch.h"
65 const std::string fileSuffix{
".json"};
73 const bool checklock,
const bool outputToFile,
74 const std::string & source,
const bool crestToFile,
75 const std::string & crestServer,
const std::string & crestTag,
76 const bool crestCoolToFile):
79 p_metaDataTool(metadatatool),
81 m_checklock(checklock),
83 m_chansel(
cool::ChannelSelection::
all()),
84 m_outputToFile{outputToFile},
85 m_crestToFile{crestToFile},
86 m_crestCoolToFile{crestCoolToFile},
88 m_crestServer{crestServer},
95 m_foldername=folderprop.folderName();
99 m_key=folderprop.key();
100 m_jokey=folderprop.hasKey();
102 m_jotag=folderprop.tag();
104 m_eventstore=folderprop.eventStoreName();
106 m_cachepar = folderprop.cache();
108 m_notagoverride=folderprop.noTagOverride();
109 if (m_notagoverride)
ATH_MSG_INFO(
"Inputfile tag override disabled for " << m_foldername );
114 std::string chanspec;
115 if (folderprop.getKey(
"channelSelection",
"",chanspec) && !chanspec.empty()) {
116 m_chanrange=IOVDbNamespace::parseChannelSpec<cool::ChannelId>(chanspec);
121 for(
const auto &
i:m_chanrange){
124 m_chansel = cool::ChannelSelection(
i.first,
i.second);
126 m_chansel.addRange(
i.first,
i.second);
129 }
catch (cool::Exception&
e) {
130 ATH_MSG_ERROR(
"defining channel range (must be given in ascending order)");
134 if (folderprop.overridesIov(
msg)){
135 m_iovoverridden=
true;
136 m_iovoverride=folderprop.iovOverrideValue(
msg);
138 ATH_MSG_INFO(
"Override timestamp to " << m_iovoverride <<
" for folder " << m_foldername );
141 ATH_MSG_INFO(
"Override run/LB number to [" <<
run <<
":" <<
lumi <<
"] for folder " << m_foldername );
145 m_fromMetaDataOnly=folderprop.onlyReadMetadata();
146 if (m_fromMetaDataOnly) {
147 ATH_MSG_INFO(
"Read from meta data only for folder " << m_foldername );
150 m_extensible=folderprop.extensible();
189 const unsigned int time) {
216 return (
m_timestamp ? reftime.timestamp() : reftime.re_time());
222 const unsigned int cacheDiv,
224 const bool ignoreMissChan) {
231 TStopwatch cachetimer;
234 bool vectorPayload{};
235 std::string strCrestNodeDesc;
246 vectorPayload = (strCrestNodeDesc.find(
"CondAttrListVec") != std::string::npos);
265 if (cacheq>0) changedCacheLo=vkey - vkey % cacheq;
271 changedCacheLo=vkey & (0x7FFFFFFFLL << 32);
277 if (changedCacheHi>cool::ValidityKeyMax) changedCacheHi=cool::ValidityKeyMax;
308 bool retrievedone=
false;
317 unsigned int attempts=0;
319 ATH_MSG_DEBUG(
"loadCache: Expecting to see " << nChannelsExpected <<
" channels" );
321 while (attempts<2 && !retrievedone) {
328 if (not
m_conn->
valid())
throw std::runtime_error(
"COOL database pointer invalidated");
344 while (itr->hasNext()) {
374 while (itr->goToNext()) {
375 const cool::IObject&
ref=itr->currentRef();
383 cool::IRecordIterator& pitr=
ref.payloadIterator();
384 const cool::IRecordVectorPtr&
pvec=pitr.fetchAllAsVector();
385 for (cool::IRecordVector::const_iterator vitr=
pvec->begin();vitr!=
pvec->end();++vitr) {
417 ATH_MSG_WARNING(
"COOL retrieve attempt " << attempts <<
" failed: " <<
e.what() );
426 std::vector<BasicFolder> crestObjs;
434 unsigned int iadd = 0;
437 ATH_MSG_DEBUG(
"loadCache: Expecting to see " << nChannelsExpected <<
" channels" );
440 const auto & channelNumbers=basicFolder.channelIds();
441 ATH_MSG_DEBUG(
"ChannelIds is " << channelNumbers.size() <<
" long" );
442 for (
const auto &
chan: channelNumbers){
443 addIOVtoCache(basicFolder.iov().first, basicFolder.iov().second);
445 if (basicFolder.isVectorPayload()) {
446 const auto & vPayload = basicFolder.getVectorPayload(
chan);
448 for (
const auto & attList:vPayload){
458 auto const & attList = basicFolder.getPayload(
chan);
477 "," <<
until <<
"]" );
483 const auto missing=std::pair<unsigned int, unsigned int>(nChannelsExpected-nChannelsLo, nChannelsExpected-nChannelsHi);
484 ATH_MSG_DEBUG(
"Cache retrieve missing " << missing.first <<
" lower and " << missing.second <<
" upper channels" );
490 ATH_MSG_DEBUG(
"Lower cache limit extended from " << cacheStart <<
" to " <<
span.first );
494 ATH_MSG_DEBUG(
"Upper cache limit extended from " << cacheStop <<
" tp " <<
span.second );
498 const float timeinc=cachetimer.RealTime();
501 m_iovs.
size() <<
" objects stored in" << std::fixed <<
502 std::setw(8) << std::setprecision(2) << timeinc <<
" s" );
508 const cool::IDatabasePtr& ,
517 unsigned int attempts = 0;
518 bool retrievedone =
false;
521 ATH_MSG_DEBUG(
"loadCacheIfDbChanged: Expecting to see " << nChannelsExpected <<
" channels" );
523 while (attempts<2 && !retrievedone) {
552 const cool::IObject&
ref=itr->currentRef();
562 ATH_MSG_WARNING(
"COOL retrieve attempt " << attempts <<
" failed: " <<
e.what() );
576 ATH_MSG_ERROR(
"IOVDbFolder::specialCacheUpdate - setRange failed for folder "
602 ATH_MSG_ERROR(
"IOVDbFolder::specialCacheUpdate - setRange failed for folder "
632 IAddressCreator* persSvc,
633 const unsigned int poolSvcContext,
634 std::unique_ptr<IOpaqueAddress>&
address,
635 IOVRange&
range,
bool& poolPayloadReq) {
639 std::string strAddress;
643 cool::ValidityKey naystart=0;
644 cool::ValidityKey naystop=cool::ValidityKeyMax;
648 if (not readFromMetaData.
isValid()){
678 if (thisIov.first<=reftime && reftime<thisIov.second) {
684 strAddress=
"POOLContainer_AthenaAttributeList][CLID=x";
702 ATH_MSG_ERROR(
"Writing of CoraCool folders to file metadata not implemented");
709 }
else if (thisIov.second<=reftime && thisIov.second>naystart) {
710 naystart=thisIov.second;
711 }
else if (thisIov.first>reftime && thisIov.first<naystop) {
712 naystop=thisIov.first;
719 std::vector<std::string>::const_iterator nitr=
m_channames.begin();
720 for (std::vector<cool::ChannelId>::const_iterator chitr=
m_channums.begin();
722 attrListColl->
add(*chitr,*nitr);
727 strAddress=
"POOLContainer_CondAttrListCollection][CLID=x";
730 strAddress=
"POOLContainer_CondAttrListVec][CLID=x";
734 ATH_MSG_ERROR(
"COOL object not found in single-channel retrieve, folder "
739 " valid objects found for single-channel retrieve, folder " <<
745 <<
" at IOV " << reftime <<
" channels " << nobj <<
" has range "
750 IOVTime rstart=
range.start();
751 IOVTime rstop=
range.stop();
752 if (tnaystart > rstart || rstop > tnaystop) {
754 <<
" from [" << rstart <<
":" << rstop <<
"] to ["
755 << tnaystart <<
":" << tnaystop <<
"]" );
756 if (tnaystart > rstart) rstart=tnaystart;
757 if (tnaystop < rstop) rstop=tnaystop;
758 range=IOVRange(rstart,rstop);
776 IOpaqueAddress* addrp =
nullptr;
777 if (StatusCode::SUCCESS!=persSvc->createAddress(0,0,strAddress,addrp)) {
778 ATH_MSG_ERROR(
"Could not get IOpaqueAddress from string address "<< strAddress );
781 address = std::unique_ptr<IOpaqueAddress>(addrp);
782 GenericAddress* gAddr=
dynamic_cast<GenericAddress*
>(
address.get());
784 ATH_MSG_ERROR(
"Could not cast IOpaqueAddress to GenericAddress");
789 auto addr = std::make_unique<CondAttrListCollAddress>(*gAddr);
790 addr->setAttrListColl(attrListColl);
793 auto addr = std::make_unique<CondAttrListCollAddress>(gAddr->svcType(),
794 gAddr->clID(),gAddr->par()[0],gAddr->par()[1],
795 poolSvcContext,gAddr->ipar()[1]);
797 addr->setAttrListColl(attrListColl);
802 auto addr = std::make_unique<AthenaAttrListAddress>(*gAddr);
803 addr->setAttrList(attrList);
806 auto addr = std::make_unique<CondAttrListVecAddress>(*gAddr);
807 addr->setAttrListVec(attrListVec);
821 << std::setprecision(2) <<
m_readtime <<
" ))s" );
834 if (
auto newkey=parsedDescription.
key(); not newkey.empty() and not
m_jokey) {
845 if (
auto newAddrHeader = parsedDescription.
addressHeader();not newAddrHeader.empty()){
870 std::unique_ptr<SG::TransientAddress>
872 auto tad = std::make_unique<SG::TransientAddress>(
m_clid,
m_key);
874 for (
const auto & linkname:symlinks){
875 if (not linkname.empty()) {
877 if (StatusCode::SUCCESS==
p_clidSvc->getIDOfTypeName(linkname,sclid)) {
878 tad->setTransientID(sclid);
881 ATH_MSG_ERROR(
"Could not get clid for symlink: "<< linkname );
889 std::unique_ptr<SG::TransientAddress>
940 for (
int i = 0;
i < n_size;
i++) {
945 chan_list.push_back(elem);
949 int colsize =
std::count(payloadSpec.begin(), payloadSpec.end(),
ch);
953 tag_meta[
"description"] =
"";
954 tag_meta[
"chansize"] = n_size;
955 tag_meta[
"colsize"] = colsize;
958 tagInfo[
"channel_list"] = chan_list;
960 tagInfo[
"payload_spec"] = payloadSpec;
962 tag_meta[
"tagInfo"] = tagInfo;
964 std::string crest_work_dir=std::filesystem::current_path();
965 crest_work_dir +=
"/crest_data";
966 bool crest_rewrite =
true;
996 const auto & linknameVector = folderpar.
symLinks();
1008 if (timeIs_nsOfEpoch){
1009 long long int clen=600;
1018 ATH_MSG_DEBUG(
"Cache length set to " << clen <<
" seconds" );
1051 if (
tag==
"HEAD")
return true;
1054 ATH_MSG_ERROR(
"No IOVDbSvc.GlobalTag specified on job options or input file" );
1067 const std::vector<std::string>&
taglist=
fptr->listTags();
1074 std::string restag=
fptr->resolveTag(
tag);
1079 }
catch (cool::Exception&
e) {
1088 if (not tagLock.has_value()){
1092 if (not tagLock.value()){
1093 ATH_MSG_ERROR(
"Tag " <<
tag <<
" is not locked and IOVDbSvc.CheckLock is set" );
1104 return (not
tag.empty());
1111 const IOVRange&
range) {
1116 tmpColl.
add(0xFFFF,atrlist);
1137 m_cachespec=
new coral::AttributeListSpecification;
1138 for (
const auto & attribute:atrlist){
1139 const coral::AttributeSpecification& aspec=attribute.specification();
1143 " in folder " <<
m_foldername <<
" will not be counted for bytes-read statistics" );
1165 ATH_MSG_DEBUG(
"channelID:\t"<<(*ci++)<<
"\t since: "<<
iov.first<<
"\t until: "<<
iov.second);
1173 std::vector<IOVHash>
result;
1179 if(crestIOVs.empty()){
1182 std::vector<IOV2Index> iov2IndexVect;
1183 iov2IndexVect.reserve(crestIOVs.size());
1185 for(
const auto& crestIOV : crestIOVs) {
1186 iov2IndexVect.emplace_back(std::stoull(crestIOV.first),hashInd++);
1189 std::sort(iov2IndexVect.begin(),iov2IndexVect.end(),
1192 return a.first < b.first;
1195 size_t nIOVs = iov2IndexVect.size();
1206 , cool::ValidityKeyMax)
1214 ,
const cool::ValidityKey& vkey
1218 ,
const std::string& crestNodeDescr
1219 ,
const std::string& specString)
const
1222 std::string fMain(dumpName);
1225 std::filesystem::create_directory(fMain);
1227 if (not
myFile.is_open()) {
1228 std::string errorMessage{
"File creation for "+fabricatedName+
" failed."};
1230 throw std::runtime_error(errorMessage);
1239 myFile<<
json->description()<<s_delimiterJson<<std::endl;
1240 myFile<<
json->payloadSpec()<<s_delimiterJson<<std::endl;
1242 myFile<<
json->iov()<<s_delimiterJson<<std::endl;
1248 std::string newNodeDescription = std::regex_replace(crestNodeDescr,
std::regex(
"\""),
"\\\"");
1249 std::string newSpecString = std::regex_replace(specString,
std::regex(
":"),
": ");
1250 newSpecString = std::regex_replace(newSpecString,
std::regex(
","), s_delimiterJson);
1251 myFile<<
"\"node_description\" : \""<<newNodeDescription<<
'\"'<<s_delimiterJson<<std::endl;
1252 myFile<<
"\"folder_payloadspec\": \""<<newSpecString<<
'\"'<<s_delimiterJson<<std::endl;
1259 , cool::ValidityKey
until
1260 ,
bool vectorPayloadFlag
1261 , cool::ValidityKey vkey
1262 ,
const std::string& nodeDesc)
1266 std::string crestPayloadType=
"crest-json-single-iov";
1268 if(tagProperties!=
nullptr
1269 && tagProperties.contains(
"payloadSpec")) {
1270 crestPayloadType=tagProperties[
"payloadSpec"].get<std::string>();
1273 if(crestPayloadType.compare(
"crest-json-multi-iov")==0) {
1359 std::string errorMessage =
m_foldername +
": has multi-iov payload. Folders with multi-iov payloads currently not supported!";
1361 throw std::runtime_error{errorMessage};
1365 if (specString.empty()) {
1366 std::string errorMessage =
"Reading payload spec from " +
m_foldername +
" failed.";
1368 throw std::runtime_error{errorMessage};
1371 std::vector<BasicFolder> retVector;
1376 if(iovHashVect.empty() ||
until<=iovHashVect[0].first.first) {
1377 if(iovHashVect.empty()) {
1385 retVector.push_back(basicFolder);
1389 unsigned indIOVStart = 0;
1390 for(
const auto& iovhash : iovHashVect) {
1391 if(
since < iovhash.first.first)
break;
1392 if(
since < iovhash.first.second
1393 &&
since >= iovhash.first.first) {
1398 unsigned indIOVEnd = indIOVStart;
1399 while(indIOVEnd < iovHashVect.size()) {
1400 if(iovHashVect[indIOVEnd].
first.first <
until
1401 && iovHashVect[indIOVEnd].first.second >=
until) {
1407 for(
unsigned ind = indIOVStart;
ind <= indIOVEnd; ++
ind) {
1411 unsigned long long sinceT = iovHashVect[
ind].first.first;
1413 std::string crest_work_dir=std::filesystem::current_path();
1414 crest_work_dir +=
"/crest_data";
1415 bool crest_rewrite =
true;
1444 std::istringstream
ss(reply);
1446 if (basicFolder.
empty()){
1447 std::string errorMessage =
"Reading channel data from "+
m_foldername+
" failed.";
1449 throw std::runtime_error{errorMessage};
1453 dumpFile(
"crest_dump",vkey,
nullptr,
false,&basicFolder,nodeDesc,specString);
1456 retVector.push_back(basicFolder);
JetConstituentVector::iterator iterator
std::string spaceStrip(const std::string &input)
Trim leading and trailing spaces,return a new trimmed string.
const bool m_outputToFile
span(T *ptr, std::size_t sz) -> span< T >
A couple needed deduction guides.
std::vector< unsigned int > m_cacheccend
const bool m_crestCoolToFile
bool magicTag(std::string &tag)
IIOVDbMetaDataTool * p_metaDataTool
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
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)
std::vector< Iov_t > & vectorStore()
Return the internal vector store.
This file contains the class definition for the CondAttrListCollAddress class.
void createTag(nlohmann::json &js)
This method creates a tag in the CREST database.
IOVRange minRange() const
Current minimal IOVRange.
Iov_t getMinimumStraddlingSpan() const
Get the minimum straddling span (max 'since' to min 'until')
void addNewStop(const IOVTime &stop)
Add new stop time to minRange - make sure that stop is <= to new stop
const std::string m_crestTag
const std::string m_crestServer
constexpr unsigned long long ALL_LUMI_BLOCKS
All the lumi blocks in one run.
cool::ValidityKey iovTime(const IOVTime &reftime) const
std::pair< unsigned int, unsigned int > numberOfIovsOnBoundaries() const
Return the current count of added Iovs which straddled cache boundaries.
const std::string & name() const
std::vector< IOVHash > fetchCrestIOVs()
void clear()
clear the store
std::unique_ptr< SG::TransientAddress > createTransientAddress(const std::vector< std::string > &symlinks)
unsigned int size() const
length of store
void specialCacheUpdate(CoraCoolObject &obj, const ServiceHandle< IIOVSvc > &iovSvc)
int run(int argc, char *argv[])
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)
nlohmann::json getTagProperties(const std::string &tag)
void addNewStart(const IOVTime &start)
Add new start time to minRange - make sure that start is >= to new start.
unsigned long long iovTimeFromSeconds(const unsigned long long seconds)
Create a long long time in ns from s.
const std::string & eventStore() const
cool::ChannelSelection m_chansel
void setTagOverride(const std::string &tag, const bool setFlag)
ITagInfoMgr * p_tagInfoMgr
IOVRange minRange() const
IOVTime makeEpochOrRunLumi(const cool::ValidityKey key, const bool timeIsEpoch)
Create an IOVTime in ns of epoch or run-lumi (determined by the bool) from a ValidityKey.
This class is a collection of AttributeLists where each one is associated with a channel number....
std::pair< cool::ValidityKey, cool::ValidityKey > Iov_t
void setSharedSpec(const coral::AttributeList &atrlist)
bool loadCache(const cool::ValidityKey vkey, const unsigned int cacheDiv, const std::string &globalTag, const bool ignoreMissChan)
Header file for CREST C++ Client Library.
bool replaceServiceType71(std::string &addrHeader)
const std::string & folderName() const
T getFolderPtr(const std::string &folderName)
IOVDbNamespace::FolderType m_foldertype
Produces cool objects from their JSON representation, storing them in a 'BasicFolder'.
void setLevel(MsgLevel l)
AttrListVec::const_iterator const_iterator
cool::ValidityKey m_iovoverride
A CondAttrListVec is an Athena DataObject holding a vector of CORAL AttributeLists,...
bool addMetaAttrListColl(const CondAttrListCollection *coll)
std::unique_ptr< SG::TransientAddress > preLoadFolder(ITagInfoMgr *tagInfoMgr, const unsigned int cacheRun, const unsigned int cacheTime)
def iadd(self, tool)
associator for public tools -------------------------------------------—
std::optional< bool > checkTagLock(const cool::IFolderPtr &fptr, const std::string &tag)
Check whether a tag is locked on a folder, if possible.
std::vector< std::string > m_channames
std::string cache() const
This file contains the class definition for theAthenaAttrListAddress class.
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)
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
std::pair< std::vector< cool::ChannelId >, std::vector< std::string > > channelList(IOVDbConn *pConnection, const std::string &folderName, const bool named)
Retrieve channel information.
void setCacheBounds(const Iov_t &cacheBounds)
Set the cache bound variables.
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.
boost::shared_ptr< CoraCoolFolder > CoraCoolFolderPtr
bool addMetaAttrList(const coral::AttributeList &atrlist, const IOVRange &range)
void addIOVtoCache(cool::ValidityKey since, cool::ValidityKey until)
void storePayloadDump(const std::string &tag, uint64_t since, const std::string &js)
Method to store a payload in the local file system.
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
boost::shared_ptr< CoraCoolDatabase > CoraCoolDatabasePtr
std::pair< cool::ValidityKey, size_t > IOV2Index
IOVRange makeRange(const cool::ValidityKey since, const cool::ValidityKey until, const bool timeIsEpoch)
Make an IOVRange from two validity keys.
void addIov(const Iov_t &iov)
Add an iov to the store and update the span variables.
bool getKey(const std::string &key, const std::string &devvalue, std::string &value) const
original 'getKey' method, now implemented using 'at'
std::string to_string(const DetectorType &type)
std::string sanitiseFilename(const std::string &fname)
Replace the '/' of a file path with '^'.
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)
std::vector< cool::ChannelId > m_channums
const std::string & key() const
bool typeSizeIsKnown(const coral::Attribute &attribute)
Return a bool indicating whether the size of a given Attribute can be determined.
bool timebaseIs_nsOfEpoch() const
std::string getTagInfoElement(nlohmann::json tag_info, const std::string &key)
nlohmann::json getTagInfo(const std::string &tag)
unsigned int cacheUpdateImplementation(T &obj, const ServiceHandle< IIOVSvc > &iovSvc)
std::string resolveUsingTagInfo(const std::string &tag, const ITagInfoMgr *tagInfoMgr)
coral::AttributeListSpecification * m_cachespec
std::pair< std::vector< cool::ChannelId >, std::vector< std::string > > extractChannelListFromString(const std::string &chanString)
std::vector< std::string > symLinks() const
std::pair< unsigned long long, unsigned long long > runLumiFromIovTime(const unsigned long long iovTime)
Return a [run,lumi] pair from an IOV time.
This is a Athena service which manages detector description tag information. It maintains a TagInfo o...
boost::shared_ptr< CoraCoolObjectIter > CoraCoolObjectIterPtr
unsigned int attributeListSize(const coral::AttributeList &atrlist)
return the size (in bytes) of an AttributeList
bool resolveTag(const cool::IFolderPtr &fptr, const std::string &globalTag)
def time(flags, cells_name, *args, **kw)
std::pair< bool, std::string > folderMetadata(IOVDbConn *pConnection, const std::string &folderName)
Retrieve (bool) multiversion flag and folder description
void setCacheLength(const bool timeIs_nsOfEpoch, const unsigned int cacheRun, const unsigned int cacheTime)
#define ATH_MSG_WARNING(x)
const boost::regex ref(r_ef)
bool extendCacheHi()
Extend upper cache bound to the minimum 'until' time; return whether this changes its value.
boost::shared_ptr< CoraCoolObject > CoraCoolObjectPtr
void createTagMetaInfo(nlohmann::json &js)
This method creates a tag meta info in the CREST database.
bool overrideOptionsFromParsedDescription(const IOVDbParser &parsedDescription)
std::vector< IovHashPair > getIovsForTag(const std::string &tag, const bool testing=false)
std::vector< cool::ChannelId > m_cachechan
Iov_t at(const unsigned int idx) const
'at' to read iov at specific index
std::string getPayloadForHash(const std::string &hash, const bool testing=false)
std::string folderTypeName(const FolderType f)
Give a string name for the folder type.
void setVectorPayloadFlag(const bool flag)
CLID classId(MsgStream &msg) const
unsigned long long iovTimeFromRunLumi(const unsigned long long run, const unsigned long long lumi)
Create a long long representing the IOV from run, lumi.
FolderType determineFolderType(const std::string &folderDescription, const std::string &spec, const std::vector< cool::ChannelId > &chans)
Determine folder type with optional check using clid service to check clid matches typename.
bool extendCacheLo()
Extend lower cache bound to the maximum 'since' time; return whether this changes its value.
unsigned long long m_nbytesread
int countSelectedChannels(const std::vector< cool::ChannelId > &channels, const cool::ChannelSelection &selected)
Count the number of selected channels in a vector of channels according to cool::Channel selection.
bool looksLikeMagicTag(const std::string &candidateTag)
Looks like it should be magic.
void addSlice(const IOVRange &range, const unsigned int chan, const std::vector< coral::AttributeList > &data, const unsigned int datastart, const unsigned int dataend)
std::vector< unsigned int > m_cacheccstart
std::string jsonPayload(const std::string &folderDescription, const std::string &spec)
std::string addressHeader() const
bool add(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs.
bool empty() const
is the store empty?
void setIovSpan(const Iov_t &span)
Set span.
CoraCoolDatabasePtr getCoraCoolDb()
This file contains the class definition for the CondAttrListVecAddress class.
bool objectIteratorIsValid(cool::IObjectIteratorPtr &objItr)
Header for CrestFunctions utilities.
std::vector< coral::AttributeList > m_cacheattr
void addShared(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs with shared data.