ATLAS Offline Software
Loading...
Searching...
No Matches
CoralCrestManager.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
10#include "CoralCrestManager.h"
11#include "CrestApi/CrestApi.h"
12#include "CrestApi/CrestApiFs.h"
13#include "CoralBase/AttributeList.h"
14#include "CoralBase/Attribute.h"
15#include "CoolKernel/StorageType.h"
16#include "CoolKernel/RecordSpecification.h"
17#include "CoolKernel/Record.h"
19#include "CxxUtils/base64.h"
20
22#include "GaudiKernel/MsgStream.h"
23#include "GaudiKernel/SystemOfUnits.h"
24#include <chai/Converter.h>
25#include <chai/Types.h>
26#include <typeinfo>
27namespace{
28 // The COOL storage type whose C++ type CORAL should use for each CHAI payload type.
29 // Going through COOL keeps the CORAL column types identical to those the folder
30 // carried in COOL. Only one representative per CHAI type is needed: an
31 // AttributeListSpecification records the C++ type alone, and every String variant
32 // yields std::string while every Blob variant yields coral::Blob, so the COOL width
33 // never reaches CORAL.
34 const std::map<chai::Type, cool::StorageType::TypeId> coolTypeForChaiType={
35 {chai::Bool, cool::StorageType::Bool},
36 {chai::UInt8, cool::StorageType::UChar},
37 {chai::Int16, cool::StorageType::Int16},
38 {chai::UInt16, cool::StorageType::UInt16},
39 {chai::Int32, cool::StorageType::Int32},
40 {chai::UInt32, cool::StorageType::UInt32},
41 {chai::UInt64, cool::StorageType::UInt63},
42 {chai::Int64, cool::StorageType::Int64},
43 {chai::Float, cool::StorageType::Float},
44 {chai::Double, cool::StorageType::Double},
45 {chai::String, cool::StorageType::String16M},
46 {chai::Blob, cool::StorageType::Blob128M}
47 };
48
55 const std::type_info * coralTypeFor(chai::Type type){
56 // Int8 is the one CHAI type COOL cannot express, so it never arrives from a
57 // COOL-migrated tag. Map it directly for the sake of natively created CREST tags.
58 if (type == chai::Int8) return &typeid(char);
59 auto it = coolTypeForChaiType.find(type);
60 if (it == coolTypeForChaiType.end()) return nullptr;
61 return &cool::StorageType::storageType(it->second).cppType();
62 }
63
64 const std::string colonDelimiter{" : "};
65}
66
67 CoralCrestManager::CoralCrestManager(const std::string & crest_path, const std::string & crestTag):m_crestTag(crestTag),m_id(Crest::ModeId::Standard){ //AthMessaging("CoralCrestManager")
68 if(crest_path.length()==0)
69 return;
70 if (crest_path.starts_with(CoralCrestManager::prefix1) || crest_path.starts_with(CoralCrestManager::prefix2)){
71 m_crestCl = std::make_unique<Crest::CrestApi>(Crest::CrestApi(crest_path));
72 }
73 else{
74 m_crestCl = std::make_unique<Crest::CrestApiFs>(Crest::CrestApiFs(false,crest_path));
75 }
76 }
77
78 std::map<std::string, std::string> CoralCrestManager::getGlobalTagMap(const std::string & crest_path, const std::string& globaltag){
79 std::unique_ptr<Crest::CrestApiBase> crestCl;
80 if (crest_path.starts_with(CoralCrestManager::prefix1) || crest_path.starts_with(CoralCrestManager::prefix2)){
81 crestCl.reset(new Crest::CrestApi(crest_path));
82 }
83 else{
84 crestCl.reset(new Crest::CrestApiFs(true,crest_path));
85 }
86 std::map<std::string, std::string> tagmap;
87 try{
88 Crest::GlobalTagMapSetDto dto = crestCl->findGlobalTagMap(globaltag,"Trace");
89 for (const auto &tagMapDto : dto.getResources()){
90 tagmap[tagMapDto.getLabel()]=tagMapDto.getTagName();
91 }
92 } catch (std::exception & e){
93 MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
94 gLog << MSG::ERROR << __FILE__<<":"<<__LINE__<< ": " << e.what() << " Cannot get a global tag map for " << globaltag<<endmsg;
95 }
96 return tagmap;
97 }
98
99 std::string CoralCrestManager::parseTypeName(const std::string & description){
100 std::string regex=R"delim(<typeName>\s*([^\s]+)\s*</typeName>)delim";
101 std::regex re(regex);
102 std::smatch typeMatch;
103 bool match=std::regex_search(description, typeMatch,re);
104 return (match) ? std::string(typeMatch[1]) : std::string("");
105 }
106
108 Crest::TagInfoDto info = getTagInfoDto();
109 std::string folderDescription = info.getFolderDescription();
110 if (folderDescription.find("<coracool>") != std::string::npos) return IOVDbNamespace::CoraCool;
111 const std::string typeName = parseTypeName(folderDescription);
112 if (typeName=="CondAttrListVec"){
113 m_isVectorPayload = true;
115 }
116 m_isVectorPayload = false;
117 std::vector< std::pair<std::string,std::string> > spec= info.getPayloadSpec().getColumns();
118 std::vector< std::pair<std::string,std::string> > chs = info.getChannels().getChannels();
119 for (auto &p : spec){
120 // Match on any string width: a POOL reference is String4k in COOL, but a CREST
121 // payload spec may name the type generically as "String".
122 if(p.first=="PoolRef" && chai::typeFromString(p.second)==chai::String){
123 int id=std::stoll(chs[0].first);
124 if(chs.size()==1 && id==0)
126 else
128 }
129 }
130 if (typeName == "CondAttrListCollection") return IOVDbNamespace::AttrListColl;
132 }
133
135 if(!m_isVectorPayload.has_value())
137 return m_isVectorPayload.value();
138 }
139
141 if(m_TagMeta.has_value()){
142 return;
143 }
144
145 try{
146 m_TagMeta = m_crestCl->findTagMeta(m_crestTag);
147 } catch (std::exception & e){
148 MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
149 gLog << MSG::ERROR << __FILE__<<":"<<__LINE__<< ": " << e.what() << " Cannot get a tag meta info " << m_crestTag<<endmsg;
150 }
151 return;
152 }
153
155 if(!m_TagMeta.has_value())
156 loadTagInfo();
157 return m_TagMeta.value().getTagInfoDto();
158 }
159
161 if(!m_Tag.has_value()){
162 m_Tag = m_crestCl->findTag(m_crestTag);
163 }
164 return m_Tag.value();
165 }
166
168 return getTagInfoDto().getPayloadSpec().toJson().dump();
169 }
170
172 Crest::TagInfoDto info = getTagInfoDto();
173 return info.getFolderDescription();
174 }
175
176 std::pair<std::vector<cool::ChannelId> , std::vector<std::string>> CoralCrestManager::getChannelList(){
177 if(!m_TagMeta.has_value())
178 loadTagInfo();
179 Crest::TagInfoDto info = getTagInfoDto();
180 std::vector<cool::ChannelId> list;
181 std::vector<std::string> names;
182 std::vector< std::pair<std::string,std::string> > res = info.getChannels().getChannels();
183 for (auto &p : res){
184 list.push_back(std::stoll(p.first));
185 names.push_back(p.second);
186 }
187 return std::make_pair(std::move(list), std::move(names));
188 }
189
190 coral::AttributeListSpecification* CoralCrestManager::getAttributeListSpec(){
191 Crest::TagInfoDto info = getTagInfoDto();
192 std::vector< std::pair<std::string,std::string> > spec_vec= info.getPayloadSpec().getColumns();
193 auto * spec = new coral::AttributeListSpecification();
194 for (auto &p : spec_vec){
195 const std::type_info * coralType = coralTypeFor(chai::typeFromString(p.second));
196 if (coralType == nullptr){
197 // Skipping the column instead would leave an AttributeList missing a field that
198 // the consuming algorithm looks up by name, which surfaces far downstream as an
199 // opaque CORAL "variable does not exist" error. Fail at the source instead.
200 spec->release();
201 const std::string errorMessage("Unsupported type \"" + p.second + "\" for payload spec column \"" + p.first + "\" of CREST tag " + m_crestTag);
202 MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
203 gLog << MSG::ERROR << "getAttributeListSpec: " << errorMessage << endmsg;
204 throw std::runtime_error(errorMessage);
205 }
206 spec->extend(p.first,*coralType);
207 }
208 return spec;
209 }
211 if(m_chai_cont.has_value()){
212 return;
213 }
214 Crest::TagInfoDto info = getTagInfoDto();
215 Crest::TagDto tag = getTagDto();
216 const std::string & objectType = tag.getObjectType();
217 if(objectType=="crest-json-multi-iov-sparse"){
219 }
220 else if(objectType=="crest-json-multi-iov"){
221 // Transitional heuristic, mirroring chai::Tag::initConverterFromObjectType():
222 // a multi-channel block in the unsuffixed format is delta encoded all the same,
223 // so it still needs the sparse converter. Only a single-channel block is dense.
224 // Retire this branch once every such tag in CREST carries the "-sparse" suffix
225 // and the objectType alone is authoritative.
226 const bool multiChannel = info.getChannels().getChannels().size() > 1;
228 }
229 m_chai_cont.emplace();
230 }
231
232 std::pair<uint64_t,uint64_t>
233 CoralCrestManager::getSinceUntilPair(std::vector<uint64_t>& v, const uint64_t since, const uint64_t until){
234 uint64_t new_since = 0;
235 uint64_t new_until = 0;
236
237 if (until < since){
238 MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
239 gLog << MSG::ERROR << "Wrong since/until."<<endmsg;
240 return std::make_pair(0,0);
241 }
242 const std::size_t N = v.size();
243 std::size_t i = 0;
244 for (; i < N; ++i) {
245 if(v[i] <= since && since < v[i+1]){
246 new_since = v[i];
247 break;
248 }
249 }
250
251 for (; i < N; ++i) {
252 if(v[i] < until && until <= v[i+1]){
253 new_until = v[i+1];
254 break;
255 }
256 }
257
258 return std::make_pair(new_since,new_until);
259 }
260
261 std::pair<uint64_t,uint64_t>
262 CoralCrestManager::getIovInterval(const std::string& tag, const uint64_t since, const uint64_t until){
263 Crest::IovSetDto dto = m_crestCl->selectGroups(tag, 0, 10000, 0, "id.since:ASC");
264 std::vector<uint64_t> v = dto.getListSince();
265 v.push_back(cool::ValidityKeyMax); // added "infinity" as the last item 9223372036854775807
266 return getSinceUntilPair(v, since, until);
267 }
268
269 std::vector<std::pair<cool::ValidityKey,std::string>> CoralCrestManager::getIovsForTag(uint64_t since, uint64_t until){
271 int iovNumber = m_crestCl->getSize(m_crestTag);
272 std::vector<std::pair<cool::ValidityKey,std::string>> res;
273 Crest::IovSetDto dto;
274 if(iovNumber <=1000){
275 dto = m_crestCl->selectIovs(m_crestTag, 0, -1, 0, 10000, 0, "id.since:ASC");
276 }
277 else{
278 std::pair<uint64_t,uint64_t> ppt = getIovInterval(m_crestTag, since, until);
279 uint64_t s_time = ppt.first;
280 uint64_t u_time = ppt.second;
281
282 if (s_time == 0 && u_time == 0){ // data out of range
283 return res;
284 }
285 else {
286 dto = m_crestCl->selectIovs(m_crestTag, s_time, u_time, 0, 10000, 0, "id.since:ASC");
287 }
288 }
289 for (auto &p : dto.getResources()){
290 res.push_back(std::make_pair((cool::ValidityKey)p.getSince(),p.getPayloadHash()));
291 }
292 return res;
293 }
294
295 std::vector<uint64_t> CoralCrestManager::loadPayloadForHash(uint64_t since, const std::string & hash){
297 std::string reply;
298 try{
299 // get payload from Crest server
300 reply = m_crestCl->getPayload(hash);
301 } catch (std::exception & e){
302 MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
303 gLog << MSG::ERROR << __FILE__<<":"<<__LINE__<< ": "<<e.what()<<" while trying to find the payload"<<endmsg;
304 throw std::runtime_error(e.what());
305 }
306 try{
307 Crest::TagInfoDto info = getTagInfoDto();
308 nlohmann::json j_spec=info.getPayloadSpec().toJson();
309 nlohmann::json j_chs=info.getChannels().toJson();
310 chai::PayloadSpec chaiSpec(j_spec,j_chs);
311 nlohmann::json j = reply;
312 if (j.is_string()){
313 std::istringstream ss(to_string(j));
314 std::string st;
315 ss >> std::quoted(st);
316 j = json::parse(st);
317 }
318 m_since=since;
320 if(isVectorPayload()){
321 std::shared_ptr<chai::VectorContainer> cont = std::make_shared<chai::VectorContainer>(chai::VectorContainer::fromJson(j,chaiSpec));
322 m_chai_cont->insert(std::pair<uint64_t,chai::ContainerBasePtr>(since,cont));
323 }
324 else{
325 std::shared_ptr<chai::Container> cont = std::make_shared<chai::Container>(chai::Container::fromJson(j,chaiSpec));
326 m_chai_cont->insert(std::pair<uint64_t,chai::ContainerBasePtr>(since,cont));
327 }
328 std::vector<uint64_t> res;
329 res.push_back(m_since);
330 return res;
331 }
332 else{
333 std::unique_ptr<chai::ClobMultiIovConverter> converter;
335 converter = std::make_unique<chai::JsonMultiIovSparseConverter>(chaiSpec);
336 else
337 converter = std::make_unique<chai::JsonMultiIovConverter>(chaiSpec);
338 std::unique_ptr<chai::ContainerMapBase> chai_map_cont = converter->deserialize(j.dump());
339 std::vector<uint64_t> res=chai_map_cont->keys();
340 for(auto const& key: res){
341 chai::ConstContainerPtr const_cont = chai_map_cont->getContainer(key);
342 // Share the map's control block rather than building a second one over the same
343 // object: chai_map_cont is destroyed on leaving this scope, and a shared_ptr built
344 // from the bare pointer would own the Container all over again and free it twice.
345 // Dropping const is safe because every consumer of m_chai_cont only reads. It has
346 // to stay read-only: a sparse block shares its Values between sub-IOVs, so writing
347 // through one Container would silently alter the others.
348 chai::ContainerPtr cont ATLAS_THREAD_SAFE = std::const_pointer_cast<chai::Container>(const_cont);
349 m_chai_cont->insert(std::pair<uint64_t,chai::ContainerBasePtr>(key,cont));
350 }
351 return res;
352 }
353 } catch (std::exception & e){
354 MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
355 gLog << MSG::ERROR << "LoadPayloadForHash:"<<e.what()<<" while trying to parse the payload. Since="<<since<<", hash="<<hash<<endmsg;
356 throw std::runtime_error(e.what());
357 }
358 }
359
360 //put payload for selected since in json string
361 std::string CoralCrestManager::dumpPayload(cool::ValidityKey since){
362 std::vector<std::string> chIds=channelIds(since);
364 std::stringstream res;
365 res<<"[";
366 auto* pspec=getAttributeListSpec();
367 std::string sep="";
368 for (auto &ch : chIds){
369 res<<sep;
370 res<<IOVDbNamespace::s_openJson<<"\""<<ch<<"\" : ";
371 switch (ftype){
373 {
374 std::vector<coral::AttributeList> attr=getVectorPayload(pspec,ch);
375 res<<"[";
376 std::string sep2="";
377 for (const auto & vitr:attr){
379 if (sep2.empty()) sep2 =IOVDbNamespace::s_delimiterJson;
380 }
381 res<<"]";
382 break;
383 }
387 {
388 coral::AttributeList attr=getPayload(pspec,ch);
390 break;
391 }
393 {
394 coral::AttributeList attr=getPayload(pspec,ch);
395 std::ostringstream os;
396 attr[0].toOutputStream(os);
397 auto str=os.str();
398 const auto separatorPosition = str.find(colonDelimiter);
399 const std::string payloadOnly=str.substr(separatorPosition+3);
400 res<<"\""<<payloadOnly<<"\"";
401 break;
402 }
404 res<< " CoraCool";
405 break;
406 default:
407 res<<" a_data_value";
408 }
409 if (sep.empty()) sep=",";
411 }
412 res<<"]";
413 pspec->release();
414 return res.str();
415 }
416 coral::AttributeList CoralCrestManager::getPayload(coral::AttributeListSpecification * pSpec,const std::string & chId){
417 chai::ContainerBasePtr cont=m_chai_cont->operator[](m_since);
418 if(cont==nullptr){
419 std::string errorMessage("Timestamp not found! timestamp=" + std::to_string(m_since));
420 MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
421 gLog << MSG::ERROR << "getPayload:" <<errorMessage<<endmsg;
422 throw std::runtime_error(errorMessage);
423 }
424 uint64_t id = std::stoul(chId);
425 chai::Container* cont2 = dynamic_cast<chai::Container*>(cont.get());
426 chai::Values& row = cont2->at(id);
427 return createAttributeList(pSpec,row);
428
429 }
430
431 std::vector<coral::AttributeList> CoralCrestManager::getVectorPayload(coral::AttributeListSpecification* pSpec,const std::string & chId){
432 std::vector<coral::AttributeList> res;
433 uint64_t id = std::stoul(chId);
434 chai::ContainerBasePtr cont=m_chai_cont->operator[](m_since);
435 if(cont==nullptr){
436 std::string errorMessage("Timestamp not found! timestamp=" + std::to_string(m_since));
437 MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
438 gLog << MSG::ERROR << "getPayload:" <<errorMessage<<endmsg;
439 throw std::runtime_error(errorMessage);
440 }
441 chai::VectorContainer* cont2 = dynamic_cast<chai::VectorContainer*>(cont.get());
442 const std::vector<chai::ValuesPtr>& rows = cont2->rows(id);
443 for (auto &row : rows){
444 chai::Values* val = row.get();
445 coral::AttributeList att=createAttributeList(pSpec,*val);
446 res.push_back(att);
447 }
448 return res;
449 }
450
451 void CoralCrestManager::selectIov(cool::ValidityKey since){
452 m_since=since;
453 }
454
455 std::vector<std::string> CoralCrestManager::channelIds(cool::ValidityKey since){
456 selectIov(since);
457 std::vector<std::string> chIds;
458 std::vector<uint64_t> channels;
459 chai::ContainerBasePtr cont=m_chai_cont->operator[](since);
460 if(cont==nullptr)
461 return chIds;
462 if(chai::Container* v = dynamic_cast<chai::Container*>(cont.get()))
463 channels=v->channelIds();
464 else if(chai::VectorContainer* v = dynamic_cast<chai::VectorContainer*>(cont.get()))
465 channels=v->channelIds();
466 //channels=cont->channelSpec().ids();
467 /*if(isVectorPayload()){
468 ContainerBasePtr cont=m_chai_cont->getVectorContainer(since);
469 if(cont==nullptr)
470 return chIds;
471 channels = cont->channelIds();
472 }
473 else{
474 chai::ConstContainerPtr cont=m_chai_cont->getContainer(since);
475 if(cont==nullptr)
476 return chIds;
477 channels = cont->channelIds(); ;
478 }*/
479 for (auto id : channels) {
480 //if(cont.get()->at(id).size()==0)
481 //continue;
482 chIds.push_back(std::to_string(id));
483 }
484 return chIds;
485 }
486
487 coral::AttributeList CoralCrestManager::createAttributeList(coral::AttributeListSpecification * pSpec, chai::Values& row){
488 coral::AttributeList attr(*pSpec,true);
489 unsigned int s=attr.size();
490 for (unsigned int i(0);i!=s;++i){
491 //cool::Record does not provide non-const access to AttributeList.
492 // But this is safe because we are filling a local instance.
493 auto & att ATLAS_THREAD_SAFE = const_cast<coral::Attribute&>(attr[i]);
494 if (row.isNull(i)){
495 att.setNull();
496 continue;
497 }
498 chai::Type type = row.type(att.specification().name());
499 switch (type) {
500 case chai::Bool:
501 {
502 att.setValue<bool>(row.get<bool>(att.specification().name()));
503 break;
504 }
505 case chai::Int8:
506 {
507 att.setValue<char>(row.get<int8_t>(att.specification().name()));
508 break;
509 }
510 case chai::UInt8:
511 {
512 att.setValue<unsigned char>(row.get<uint8_t>(att.specification().name()));
513 break;
514 }
515 case chai::UInt16:
516 {
517 att.setValue<unsigned short>(row.get<uint16_t>(att.specification().name()));
518 break;
519 }
520 case chai::Int16:
521 {
522 att.setValue<short>(row.get<int16_t>(att.specification().name()));
523 break;
524 }
525 case chai::UInt32:
526 {
527 att.setValue<unsigned int>(row.get<uint32_t>(att.specification().name()));
528 break;
529 }
530 case chai::Int32:
531 {
532 att.setValue<int>(row.get<int32_t>(att.specification().name()));
533 break;
534 }
535 case chai::UInt64:
536 {
537 att.setValue<unsigned long long>(row.get<uint64_t>(att.specification().name()));
538 break;
539 }
540 case chai::Int64:
541 {
542 att.setValue<long long>(row.get<int64_t>(att.specification().name()));
543 break;
544 }
545 case chai::Float:
546 {
547 att.setValue<float>(row.get<float>(att.specification().name()));
548 break;
549 }
550 case chai::Double:
551 {
552 att.setValue<double>(row.get<double>(att.specification().name()));
553 break;
554 }
555 case chai::String:
556 {
557 att.setValue<std::string>(row.get<std::string>(att.specification().name()));
558 break;
559 }
560 case chai::Blob:
561 {
562 const auto &charVec = row.get<chai::BlobData>(att.specification().name()).m_bytes;//CxxUtils::base64_decode(strVal);
563 coral::Blob blob(charVec.size());
564 if (!charVec.empty()) { // Avoid ubsan warning.
565 memcpy(blob.startingAddress(), charVec.data(), charVec.size());
566 }
567 att.setValue<coral::Blob>(blob);
568 break;
569 }
570 case chai::Unknown:
571 {
572 std::string errorMessage("UNTREATED TYPE! " + std::to_string(type));
573 MsgStream gLog(Athena::getMessageSvc(), "CoralCrestManager");
574 gLog << MSG::ERROR << "LoadPayloadForHash:" <<errorMessage<<endmsg;
575 throw std::runtime_error(errorMessage);
576 }
577 }
578 }
579 return attr;
580 }
581
582
583
584
const std::regex re(r_e)
#define endmsg
Header for CoralCrestManager class.
static std::string to_string(const std::vector< T > &v)
std::pair< std::vector< unsigned int >, bool > res
static Double_t ss
if(pathvar)
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
static std::map< std::string, std::string > getGlobalTagMap(const std::string &crest_path, const std::string &globaltag)
std::vector< std::pair< cool::ValidityKey, std::string > > getIovsForTag(uint64_t since, uint64_t until)
std::vector< std::string > channelIds(cool::ValidityKey since)
coral::AttributeList createAttributeList(coral::AttributeListSpecification *pSpec, chai::Values &row)
IOVDbNamespace::FolderType determineFolderType()
std::optional< std::map< uint64_t, chai::ContainerBasePtr > > m_chai_cont
std::vector< uint64_t > loadPayloadForHash(uint64_t since, const std::string &hash)
std::string dumpPayload(cool::ValidityKey since)
Crest::TagDto & getTagDto()
std::vector< coral::AttributeList > getVectorPayload(coral::AttributeListSpecification *pSpec, const std::string &chId)
std::optional< Crest::TagMetaDto > m_TagMeta
std::string getFolderDescription()
cool::ValidityKey m_since
std::optional< bool > m_isVectorPayload
std::optional< Crest::TagDto > m_Tag
std::string parseTypeName(const std::string &description)
CoralCrestManager(const std::string &crest_path, const std::string &crestTag)
static const std::string prefix1
std::pair< uint64_t, uint64_t > getIovInterval(const std::string &tag, const uint64_t since, const uint64_t until)
std::string getPayloadSpec()
std::pair< std::vector< cool::ChannelId >, std::vector< std::string > > getChannelList()
coral::AttributeList getPayload(coral::AttributeListSpecification *pSpec, const std::string &chId)
std::pair< uint64_t, uint64_t > getSinceUntilPair(std::vector< uint64_t > &v, const uint64_t since, const uint64_t until)
std::unique_ptr< Crest::CrestApiBase > m_crestCl
Crest::TagInfoDto getTagInfoDto()
coral::AttributeListSpecification * getAttributeListSpec()
static const std::string prefix2
const std::string m_crestTag
void selectIov(cool::ValidityKey since)
singleton-like access to IMessageSvc via open function and helper
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:93
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:359
IMessageSvc * getMessageSvc(bool quiet=false)
std::string jsonAttributeList(const coral::AttributeList &atrlist)
Produce a representation of a coral::AttributeList as a json string.
static const std::string s_delimiterJson
json standard delimiter ', '
static const std::string s_closeJson
json close tag, '}'
static const std::string s_openJson
json open tag, '{'