ATLAS Offline Software
CoralCrestManager.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 // @file CoralCrestManager.cxx
5 // Implementation for CrestFunctions utilities
6 // @author Evgeny Alexandrov
7 // @date 24 February 2025
8 
9 #include "CoralCrestManager.h"
10 #include "CrestApi/CrestApi.h"
11 #include "CrestApi/CrestApiFs.h"
12 #include "CoralBase/AttributeList.h"
13 #include "CoralBase/Attribute.h"
14 #include "CoolKernel/StorageType.h"
15 #include "CoolKernel/RecordSpecification.h"
16 #include "CoolKernel/Record.h"
18 #include "CxxUtils/base64.h"
19 
21 #include "GaudiKernel/MsgStream.h"
22 #include "GaudiKernel/SystemOfUnits.h"
23 
24  const std::map<std::string, cool::StorageType::TypeId> typeCorrespondance={
25  {"Bool", cool::StorageType::Bool},
26  {"UChar",cool::StorageType::UChar},
27  {"Int16", cool::StorageType::Int16},
28  {"UInt16", cool::StorageType::UInt16},
29  {"Int32", cool::StorageType::Int32},
30  {"UInt32", cool::StorageType::UInt32},
31  {"UInt63",cool::StorageType::UInt63},
32  {"Int64", cool::StorageType::Int64},
33  {"Float", cool::StorageType::Float},
34  {"Double", cool::StorageType::Double},
35  {"String255", cool::StorageType::String255},
36  {"String4k", cool::StorageType::String4k},
37  {"String64k", cool::StorageType::String64k},
38  {"String16M", cool::StorageType::String16M},
39  {"String128M", cool::StorageType::String128M},
40  {"Blob64k", cool::StorageType::Blob64k},
41  {"Blob16M", cool::StorageType::Blob16M},
42  {"Blob128M", cool::StorageType::Blob128M}
43  };
44 
45  CoralCrestManager::CoralCrestManager(const std::string & crest_path, const std::string & crestTag):m_crestTag(crestTag){ //AthMessaging("CoralCrestManager")
46  if(crest_path.length()==0)
47  return;
48  if (crest_path.starts_with(CoralCrestManager::prefix1) || crest_path.starts_with(CoralCrestManager::prefix2)){
49  m_crestCl = std::make_unique<Crest::CrestApi>(Crest::CrestApi(crest_path));
50  }
51  else{
52  m_crestCl = std::make_unique<Crest::CrestApiFs>(Crest::CrestApiFs(true,crest_path));
53  }
54 
55  }
56 
57  std::map<std::string, std::string> CoralCrestManager::getGlobalTagMap(const std::string & crest_path, const std::string& globaltag){
58  Crest::CrestApiBase* crestCl=NULL;
59  if (crest_path.starts_with(CoralCrestManager::prefix1) || crest_path.starts_with(CoralCrestManager::prefix2)){
60  crestCl = new Crest::CrestApi(crest_path);
61  }
62  else{
63  crestCl = new Crest::CrestApiFs(true,crest_path);
64  }
65  std::map<std::string, std::string> tagmap;
66  try{
67  Crest::GlobalTagMapSetDto dto = crestCl->findGlobalTagMap(globaltag,"Trace");
68  for (const auto &tagMapDto : dto.getResources()){
69  tagmap[tagMapDto.getLabel()]=tagMapDto.getTagName();
70  }
71  } catch (std::exception & e){
72  MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
73  gLog << MSG::ERROR << __FILE__<<":"<<__LINE__<< ": " << e.what() << " Cannot get a global tag map for " << globaltag<<endmsg;
74  }
75  if(crestCl!=NULL){
76  delete crestCl;
77  crestCl=NULL;
78  }
79  return tagmap;
80  }
81 
82  std::string CoralCrestManager::parseTypeName(const std::string & description){
83  std::string regex=R"delim(<typeName>\s*([^\s]+)\s*</typeName>)delim";
85  std::smatch typeMatch;
86  bool match=std::regex_search(description, typeMatch,re);
87  return (match) ? std::string(typeMatch[1]) : std::string("");
88  }
89 
91  Crest::TagInfoDto info = getTagInfoDto();
92  std::string folderDescription = info.getFolderDescription();
93  if (folderDescription.find("<coracool>") != std::string::npos) return IOVDbNamespace::CoraCool;
94  const std::string typeName = parseTypeName(folderDescription);
95  if (typeName=="CondAttrListVec"){
96  m_isVectorPayload = true;
98  }
99  m_isVectorPayload = false;
100  std::vector< std::pair<std::string,std::string> > spec= info.getPayloadSpec().getColumns();
101  std::vector< std::pair<std::string,std::string> > chs = info.getChannels().getChannels();
102  for (auto &p : spec){
103  if(p.first=="PoolRef" && p.second=="String4k"){
104  int id=std::stoll(chs[0].first);
105  if(chs.size()==1 && id==0)
107  else
109  }
110  }
111  if (typeName == "CondAttrListCollection") return IOVDbNamespace::AttrListColl;
113  }
114 
116  if(!m_isVectorPayload.has_value())
118  return m_isVectorPayload.value();
119  }
120 
122  if(m_TagMeta.has_value()){
123  return;
124  }
125 
126  try{
127  m_TagMeta = m_crestCl->findTagMeta(m_crestTag);
128  } catch (std::exception & e){
129  MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
130  gLog << MSG::ERROR << __FILE__<<":"<<__LINE__<< ": " << e.what() << " Cannot get a tag meta info " << m_crestTag<<endmsg;
131  }
132  return;
133  }
134 
135  Crest::TagInfoDto CoralCrestManager::getTagInfoDto(){
136  if(!m_TagMeta.has_value())
137  loadTagInfo();
138  return m_TagMeta.value().getTagInfoDto();
139  }
140 
142  if(!m_Tag.has_value()){
143  m_Tag = m_crestCl->findTag(m_crestTag);
144  }
145  return m_Tag.value();
146  }
147 
149  return getTagInfoDto().getPayloadSpec().toJson().dump();
150  }
151 
153  Crest::TagInfoDto info = getTagInfoDto();
154  return info.getFolderDescription();
155  }
156 
157  std::pair<std::vector<cool::ChannelId> , std::vector<std::string>> CoralCrestManager::getChannelList(){
158  if(!m_TagMeta.has_value())
159  loadTagInfo();
160  Crest::TagInfoDto info = getTagInfoDto();
161  std::vector<cool::ChannelId> list;
162  std::vector<std::string> names;
163  std::vector< std::pair<std::string,std::string> > res = info.getChannels().getChannels();
164  for (auto &p : res){
165  list.push_back(std::stoll(p.first));
166  names.push_back(p.second);
167  }
168  return std::make_pair(std::move(list), std::move(names));
169  }
170 
171  coral::AttributeListSpecification* CoralCrestManager::getAttributeListSpec(){
172  Crest::TagInfoDto info = getTagInfoDto();
173  std::vector< std::pair<std::string,std::string> > spec_vec= info.getPayloadSpec().getColumns();
174  auto * spec = new coral::AttributeListSpecification();
175  for (auto &p : spec_vec){
176  auto it = typeCorrespondance.find(p.second);
177  if (it != typeCorrespondance.end()) {
178  spec->extend(p.first,cool::StorageType::storageType(it->second).cppType());
179  }
180  }
181  return spec;
182  }
183 
185  if(m_crest_cont.has_value())
186  return;
187  Crest::TagInfoDto info = getTagInfoDto();
188  Crest::TagDto tag = getTagDto();
190  if(tag.getObjectType()=="crest-json-multi-iov")
192  Crest::CrestContainer cr_cont(mId);
193  std::vector< std::pair<std::string,std::string> > spec= info.getPayloadSpec().getColumns();
194  for (auto &p : spec){
195  cr_cont.addColumn(p.first,p.second.c_str());
196  }
197  if(!m_isVectorPayload.has_value()) determineFolderType();
198  cr_cont.setVectorPayload(m_isVectorPayload.value());
199  m_crest_cont.emplace(cr_cont);
200  return;
201  }
202 
203  std::pair<uint64_t,uint64_t>
204  CoralCrestManager::getSinceUntilPair(std::vector<uint64_t>& v, const uint64_t since, const uint64_t until){
205  uint64_t new_since = 0;
206  uint64_t new_until = 0;
207 
208  if (until < since){
209  MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
210  gLog << MSG::ERROR << "Wrong since/until."<<endmsg;
211  return std::make_pair(0,0);
212  }
213  const std::size_t N = v.size();
214  std::size_t i = 0;
215  for (; i < N; ++i) {
216  if(v[i] <= since && since < v[i+1]){
217  new_since = v[i];
218  break;
219  }
220  }
221 
222  for (; i < N; ++i) {
223  if(v[i] < until && until <= v[i+1]){
224  new_until = v[i+1];
225  break;
226  }
227  }
228 
229  return std::make_pair(new_since,new_until);
230  }
231 
232  std::pair<uint64_t,uint64_t>
234  Crest::IovSetDto dto = m_crestCl->selectGroups(tag, 0, 10000, 0, "id.since:ASC");
235  std::vector<uint64_t> v = dto.getListSince();
236  v.push_back(cool::ValidityKeyMax); // added "infinity" as the last item 9223372036854775807
237  return getSinceUntilPair(v, since, until);
238  }
239 
240  std::vector<std::pair<cool::ValidityKey,std::string>> CoralCrestManager::getIovsForTag(uint64_t since, uint64_t until){
242  int iovNumber = m_crestCl->getSize(m_crestTag);
243  std::vector<std::pair<cool::ValidityKey,std::string>> res;
244  Crest::IovSetDto dto;
245  if(iovNumber <=1000){
246  dto = m_crestCl->selectIovs(m_crestTag, 0, -1, 0, 10000, 0, "id.since:ASC");
247  }
248  else{
249  std::pair<uint64_t,uint64_t> ppt = getIovInterval(m_crestTag, since, until);
250  uint64_t s_time = ppt.first;
251  uint64_t u_time = ppt.second;
252 
253  if (s_time == 0 && u_time == 0){ // data out of range
254  return res;
255  }
256  else {
257  dto = m_crestCl->selectIovs(m_crestTag, s_time, u_time, 0, 10000, 0, "id.since:ASC");
258  }
259  }
260  for (auto &p : dto.getResources()){
261  res.push_back(std::make_pair((cool::ValidityKey)p.getSince(),p.getPayloadHash()));
262  }
263  return res;
264  }
265 
266  std::vector<uint64_t> CoralCrestManager::loadPayloadForHash(uint64_t since, const std::string & hash){
268  std::string reply;
269  try{
270  // get payload from Crest server
271  reply = m_crestCl->getPayload(hash);
272  } catch (std::exception & e){
273  MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
274  gLog << MSG::ERROR << __FILE__<<":"<<__LINE__<< ": "<<e.what()<<" while trying to find the payload"<<endmsg;
275  throw std::runtime_error(e.what());
276  }
277  try{
278  // parse payload according to type of payload and put it to CrestConteiner.
279  // Store only one value before 'since'.
280  // Returns a list of timestamp for which data has been loaded
281  return m_crest_cont.value().fromJson(since,reply);
282  } catch (std::exception & e){
283  MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
284  gLog << MSG::ERROR << "LoadPayloadForHash:"<<e.what()<<" while trying to parse the payload. Since="<<since<<", hash="<<hash<<endmsg;
285  throw std::runtime_error(e.what());
286  }
287  }
288 
289  //put payload for selected since in json string
290  std::string CoralCrestManager::dumpPayload(cool::ValidityKey since){
291  m_crest_cont.value().selectIov(since);
293  std::stringstream res;
294  res<<"[";
295  std::vector<std::string> chIds = m_crest_cont.value().channelIds();
296  auto* pspec=getAttributeListSpec();
297  std::string sep="";
298  for (auto &ch : chIds){
299  res<<sep;
300  res<<IOVDbNamespace::s_openJson<<"\""<<ch<<"\" : ";
301  switch (ftype){
303  {
304  std::vector<coral::AttributeList> attr=getVectorPayload(pspec,ch);
305  res<<"[";
306  std::string sep2="";
307  for (const auto & vitr:attr){
309  if (sep2.empty()) sep2 =IOVDbNamespace::s_delimiterJson;
310  }
311  res<<"]";
312  break;
313  }
317  {
318  coral::AttributeList attr=getPayload(pspec,ch);
320  break;
321  }
323  {
324  coral::AttributeList attr=getPayload(pspec,ch);
325  std::ostringstream os;
326  attr[0].toOutputStream(os);
327  auto str=os.str();
328  const std::string del(" : ");
329  const auto separatorPosition = str.find(del);
330  const std::string payloadOnly=str.substr(separatorPosition+3);
331  res<<"\""<<payloadOnly<<"\"";
332  break;
333  }
335  res<< " CoraCool";
336  break;
337  default:
338  res<<" a_data_value";
339  }
340  if (sep.empty()) sep=",";
341  res<<IOVDbNamespace::s_closeJson;
342  }
343  res<<"]";
344  pspec->release();
345  return res.str();
346  }
347 
348  coral::AttributeList CoralCrestManager::getPayload(coral::AttributeListSpecification * pSpec,const std::string & chId){
349  nlohmann::json j=m_crest_cont.value().getPayloadChannel(chId.c_str());
350  return createAttributeList(pSpec,j,m_crest_cont.value().getMPayloadSpec());
351  }
352 
353  std::vector<coral::AttributeList> CoralCrestManager::getVectorPayload(coral::AttributeListSpecification* pSpec,const std::string & chId){
354  std::vector<coral::AttributeList> res;
355  nlohmann::json vecJ=m_crest_cont.value().getPayloadChannel(chId.c_str());
356  for (auto &p : vecJ){
357  coral::AttributeList att=createAttributeList(pSpec,p,m_crest_cont.value().getMPayloadSpec());
358  res.push_back(att);
359  }
360  return res;
361  }
362 
363  void CoralCrestManager::selectIov(cool::ValidityKey since){
364  m_crest_cont.value().selectIov(since);
365  }
366 
367  std::vector<std::string> CoralCrestManager::channelIds(cool::ValidityKey since){
368  selectIov(since);
369  return m_crest_cont.value().channelIds();
370  }
371 
372  coral::AttributeList CoralCrestManager::createAttributeList(coral::AttributeListSpecification * pSpec,nlohmann::json& j,const std::vector<std::pair<std::string, Crest::TypeId>> & tSpec){
373  coral::AttributeList attr(*pSpec,true);
374  unsigned int s=attr.size();
375 
376  json::const_iterator it = j.begin();
377  for (unsigned int i(0);i!=s;++i){
378  // cool::Record does not provide non-const access to AttributeList.
379  // But this is safe because we are filling a local instance.
380  auto & att = const_cast<coral::Attribute&>(attr[i]);
381  if (it == j.end()){
382  continue;
383  }
384  const auto thisVal = it.value();
385  ++it;
386 
387  try{
388  if (thisVal.is_null()){
389  att.setNull();
390  continue;
391  }
392  cool::StorageType::TypeId typespec=cool::StorageType::Bool;
393  for(auto &p : tSpec){
394  if(p.first.compare(att.specification().name())==0){
395  auto pElement = Crest::s_typeToString.find(p.second);
396  if (pElement == Crest::s_typeToString.end()){
397  throw std::runtime_error("CoralCrestManager::createAttributeList: name not found.");
398  }
399  std::string str_spec = pElement ->second;
400  auto pTypespec = typeCorrespondance.find(str_spec);
401  if (pTypespec == typeCorrespondance.end()){
402  throw std::runtime_error("CoralCrestManager::createAttributeList: typespec not found.");
403  }
404  typespec=pTypespec->second;
405  break;
406  }
407  }
408  std::string strVal = to_string(thisVal);
409  if(strVal.size()>2&& strVal[0]=='"'&& strVal[strVal.size()-1]=='"')
410  strVal=strVal.substr(1,strVal.size()-2);
411 
412  if((strVal.compare("NULL")==0||strVal.compare("null")==0)&&
413  (typespec==cool::StorageType::Bool || typespec==cool::StorageType::Int16 || typespec==cool::StorageType::UInt16
414  || typespec==cool::StorageType::Int32 || typespec==cool::StorageType::UInt32
415  || typespec==cool::StorageType::Int64 || typespec==cool::StorageType::UInt63
416  || typespec==cool::StorageType::Float || typespec==cool::StorageType::Double)){
417  att.setNull();
418  continue;
419  }
420  switch (typespec) {
421  case cool::StorageType::Bool:
422  {
423  const bool newVal=(strVal == "true");
424  att.setValue<bool>(newVal);
425  break;
426  }
427  case cool::StorageType::UChar:
428  {
429  const unsigned char newVal=std::stoul(strVal);
430  att.setValue<unsigned char>(newVal);
431  break;
432  }
433  case cool::StorageType::Int16:
434  {
435  const short newVal=std::stol(strVal);
436  att.setValue<short>(newVal);
437  break;
438  }
439  case cool::StorageType::UInt16:
440  {
441  const unsigned short newVal=std::stoul(strVal);
442  att.setValue<unsigned short>(newVal);
443  break;
444  }
445  case cool::StorageType::Int32:
446  {
447  const int newVal=std::stoi(strVal);
448  att.setValue<int>(newVal);
449  break;
450  }
451  case cool::StorageType::UInt32:
452  {
453  const unsigned int newVal=std::stoull(strVal);
454  att.setValue<unsigned int>(newVal);
455  break;
456  }
457  case cool::StorageType::UInt63:
458  {
459  const unsigned long long newVal=std::stoull(strVal);
460  att.setValue<unsigned long long>(newVal);
461  break;
462  }
463  case cool::StorageType::Int64:
464  {
465  const long long newVal=std::stoll(strVal);
466  att.setValue< long long>(newVal);
467  break;
468  }
470  {
471  const float newVal=std::stof(strVal);
472  att.setValue<float>(newVal);
473  break;
474  }
475  case cool::StorageType::Double:
476  {
477  const double newVal=std::stod(strVal);
478  att.setValue<double>(newVal);
479  break;
480  }
481  case cool::StorageType::String255:
482  case cool::StorageType::String4k:
483  case cool::StorageType::String64k:
484  case cool::StorageType::String16M:
485  case cool::StorageType::String128M:
486  {
487  att.setValue<std::string>(thisVal.get<std::string>());
488  break;
489  }
490  case cool::StorageType::Blob128M:
491  case cool::StorageType::Blob16M:
492  case cool::StorageType::Blob64k:
493  {
494  const auto &charVec = CxxUtils::base64_decode(strVal);
495  coral::Blob blob(charVec.size());
496  memcpy(blob.startingAddress(), charVec.data(), charVec.size());
497  att.setValue<coral::Blob>(blob);
498  break;
499  }
500  default:
501  {
502  std::string errorMessage("UNTREATED TYPE! " + std::to_string(typespec));
503  MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
504  gLog << MSG::ERROR << "LoadPayloadForHash:" <<errorMessage<<endmsg;
505  throw std::runtime_error(errorMessage);
506  }
507  }
508  }
509  catch (json::exception& e){
510  MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
511  gLog << MSG::ERROR << "Error CoralCrestManager::createAttributeList: "<<e.what()<<endmsg;
512  throw std::runtime_error(e.what());
513  }
514  }
515  return attr;
516  }
517 
518 
519 
520 
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
CoralCrestManager::getIovsForTag
std::vector< std::pair< cool::ValidityKey, std::string > > getIovsForTag(uint64_t since, uint64_t until)
Definition: CoralCrestManager.cxx:240
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
CoralCrestManager::getTagDto
Crest::TagDto & getTagDto()
Definition: CoralCrestManager.cxx:141
Crest::CrestContainer::addColumn
void addColumn(const std::string &name, TypeId type)
It adds a column to the payload specification.
Definition: CrestContainer.cxx:34
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
CoralCrestManager::initCrestContainer
void initCrestContainer()
Definition: CoralCrestManager.cxx:184
CoralCrestManager::m_crestTag
const std::string m_crestTag
Definition: CoralCrestManager.h:65
json
nlohmann::json json
Definition: HistogramDef.cxx:9
CoralCrestManager::m_crestCl
std::unique_ptr< Crest::CrestApiBase > m_crestCl
Definition: CoralCrestManager.h:64
CaloCondBlobAlgs_fillNoiseFromASCII.spec
spec
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:46
CoralCrestManager::loadTagInfo
void loadTagInfo()
Definition: CoralCrestManager.cxx:121
CoralCrestManager::m_isVectorPayload
std::optional< bool > m_isVectorPayload
Definition: CoralCrestManager.h:68
Crest::CrestContainer::setVectorPayload
void setVectorPayload(bool isVectorPayload)
Set the Vectore mode of the container.
Definition: CrestContainer.cxx:23
CoralCrestManager::getPayload
coral::AttributeList getPayload(coral::AttributeListSpecification *pSpec, const std::string &chId)
Definition: CoralCrestManager.cxx:348
skel.it
it
Definition: skel.GENtoEVGEN.py:407
CoralCrestManager::getAttributeListSpec
coral::AttributeListSpecification * getAttributeListSpec()
Definition: CoralCrestManager.cxx:171
CoralCrestManager::dumpPayload
std::string dumpPayload(cool::ValidityKey since)
Definition: CoralCrestManager.cxx:290
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
IOVDbNamespace::PoolRefColl
@ PoolRefColl
Definition: FolderTypes.h:31
Crest::ModeId::DCS_FULL
@ DCS_FULL
defaults::Float
constexpr float Float
Definition: MSVtxValidationAlg.h:45
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
IOVDbNamespace::PoolRef
@ PoolRef
Definition: FolderTypes.h:30
CoralCrestManager::m_crest_cont
std::optional< Crest::CrestContainer > m_crest_cont
Definition: CoralCrestManager.h:74
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
MuonR4::to_string
std::string to_string(const SectorProjector proj)
Definition: MsTrackSeeder.cxx:74
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
CoralCrestManager::getGlobalTagMap
static std::map< std::string, std::string > getGlobalTagMap(const std::string &crest_path, const std::string &globaltag)
Definition: CoralCrestManager.cxx:57
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
dq_defect_copy_defect_database.since
def since
Definition: dq_defect_copy_defect_database.py:54
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
CoralCrestManager::getTagInfoDto
Crest::TagInfoDto getTagInfoDto()
Definition: CoralCrestManager.cxx:135
dq_defect_copy_defect_database.until
def until
Definition: dq_defect_copy_defect_database.py:55
Crest::ModeId
ModeId
Definition: CrestContainer.h:49
IOVDbJsonStringFunctions.h
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
CoralCrestManager::getIovInterval
std::pair< uint64_t, uint64_t > getIovInterval(const std::string &tag, const uint64_t since, const uint64_t until)
Definition: CoralCrestManager.cxx:233
CxxUtils::base64_decode
std::vector< unsigned char > base64_decode(const std::string &)
Definition: base64.cxx:97
lumiFormat.i
int i
Definition: lumiFormat.py:85
CoralCrestManager::getSinceUntilPair
std::pair< uint64_t, uint64_t > getSinceUntilPair(std::vector< uint64_t > &v, const uint64_t since, const uint64_t until)
Definition: CoralCrestManager.cxx:204
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
python.subdetectors.mmg.names
names
Definition: mmg.py:8
calibdata.exception
exception
Definition: calibdata.py:495
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:11
base64.h
IOVDbNamespace::CoolVector
@ CoolVector
Definition: FolderTypes.h:33
IOVDbNamespace::CoraCool
@ CoraCool
Definition: FolderTypes.h:32
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
IOVDbNamespace::AttrListColl
@ AttrListColl
Definition: FolderTypes.h:29
CoralCrestManager::channelIds
std::vector< std::string > channelIds(cool::ValidityKey since)
Definition: CoralCrestManager.cxx:367
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
CheckTagAssociation.globaltag
globaltag
Definition: CheckTagAssociation.py:18
typeCorrespondance
const std::map< std::string, cool::StorageType::TypeId > typeCorrespondance
Definition: CoralCrestManager.cxx:24
CoralCrestManager::determineFolderType
IOVDbNamespace::FolderType determineFolderType()
Definition: CoralCrestManager.cxx:90
grepfile.sep
sep
Definition: grepfile.py:38
CoralCrestManager::getVectorPayload
std::vector< coral::AttributeList > getVectorPayload(coral::AttributeListSpecification *pSpec, const std::string &chId)
Definition: CoralCrestManager.cxx:353
Crest::CrestContainer
It compares timestamp in string format.
Definition: CrestContainer.h:58
CoralCrestManager::prefix2
static const std::string prefix2
Definition: CoralCrestManager.h:32
CoralCrestManager::isVectorPayload
bool isVectorPayload()
Definition: CoralCrestManager.cxx:115
Crest::ModeId::Standard
@ Standard
CoralCrestManager::getChannelList
std::pair< std::vector< cool::ChannelId >, std::vector< std::string > > getChannelList()
Definition: CoralCrestManager.cxx:157
IOVDbNamespace::jsonAttributeList
std::string jsonAttributeList(const coral::AttributeList &atrlist)
Produce a representation of a coral::AttributeList as a json string.
Definition: IOVDbJsonStringFunctions.cxx:35
CoralCrestManager::getFolderDescription
std::string getFolderDescription()
Definition: CoralCrestManager.cxx:152
CoralCrestManager::selectIov
void selectIov(cool::ValidityKey since)
Definition: CoralCrestManager.cxx:363
python.PyAthena.v
v
Definition: PyAthena.py:154
CoralCrestManager.h
Header for CoralCrestManager class.
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:108
CoralCrestManager::prefix1
static const std::string prefix1
Definition: CoralCrestManager.h:31
DeMoScan.first
bool first
Definition: DeMoScan.py:534
re
const boost::regex re(r_e)
IOVDbNamespace::AttrList
@ AttrList
Definition: FolderTypes.h:28
CoralCrestManager::m_TagMeta
std::optional< Crest::TagMetaDto > m_TagMeta
Definition: CoralCrestManager.h:66
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
CoralCrestManager::loadPayloadForHash
std::vector< uint64_t > loadPayloadForHash(uint64_t since, const std::string &hash)
Definition: CoralCrestManager.cxx:266
CoralCrestManager::CoralCrestManager
CoralCrestManager(const std::string &crest_path, const std::string &crestTag)
Definition: CoralCrestManager.cxx:45
str
Definition: BTagTrackIpAccessor.cxx:11
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:23
CoralCrestManager::m_Tag
std::optional< Crest::TagDto > m_Tag
Definition: CoralCrestManager.h:67
CoralCrestManager::parseTypeName
std::string parseTypeName(const std::string &description)
Definition: CoralCrestManager.cxx:82
Crest::TypeId
TypeId
Definition: CrestContainer.h:22
python.ParticleTypeUtil.info
def info
Definition: ParticleTypeUtil.py:87
CoralCrestManager::createAttributeList
coral::AttributeList createAttributeList(coral::AttributeListSpecification *pSpec, nlohmann::json &j, const std::vector< std::pair< std::string, Crest::TypeId >> &tSpec)
Definition: CoralCrestManager.cxx:372
CoralCrestManager::getPayloadSpec
std::string getPayloadSpec()
Definition: CoralCrestManager.cxx:148
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:95
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
IOVDbNamespace::FolderType
FolderType
Definition: FolderTypes.h:26
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88