ATLAS Offline Software
CrestModel.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2020-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <CrestApi/CrestModel.h>
6 #include <iostream>
7 #include <sstream>
8 #include <string>
9 #include <iomanip>
10 #include "boost/regex.hpp"
11 
13 {
14  return {
15  {"size", size},
16  {"totalElements", totalElements},
17  {"totalPages", totalPages},
18  {"number", number}};
19 }
21 {
22  RespPage respPage;
23  respPage.size = j.value("size", 0);
24  respPage.totalElements = j.value("totalElements", 0);
25  respPage.totalPages = j.value("totalPages", 0);
26  respPage.number = j.value("number", 0);
27  return respPage;
28 }
30 {
31  json additionalPropertiesJson;
32  for (const auto &entry : additionalProperties)
33  {
34  additionalPropertiesJson[entry.first] = entry.second;
35  }
36 
37  return {
38  additionalPropertiesJson};
39 }
40 
42 {
43  GenericMap genericMap;
44 
45  json additionalPropertiesJson = j.value("additionalProperties", json::object());
46  for (auto it = additionalPropertiesJson.begin(); it != additionalPropertiesJson.end(); ++it)
47  {
48  genericMap.additionalProperties[it.key()] = it.value();
49  }
50 
51  return genericMap;
52 }
53 
55 {
56  json result = {};
57  if (datatype.has_value())
58  result["datatype"] = datatype.value();
59  result["format"] = getFormat();
60  result["size"] = getSize();
61 
62  // Check if the 'page' optional contains a value
63  if (page.has_value())
64  {
65  // Check if the value of 'page' is not null
66  if (!page.value().to_json().is_null())
67  {
68  result["page"] = page.value().to_json();
69  }
70  }
71 
72  // Check if the 'filter' optional contains a value
73  if (filter.has_value())
74  {
75  // Check if the value of 'filter' is not null
76  if (!filter.value().to_json().is_null())
77  {
78  result["filter"] = filter.value().to_json();
79  }
80  }
81 
82  return result;
83 }
84 
86 {
87  if (j.contains("datatype"))
88  datatype = j.value("datatype", "");
89  // Check for the presence of "page" key and create an optional
90  if (j.contains("page"))
91  {
92  if (!j["page"].is_null())
93  {
94  page = std::make_optional((RespPage::from_json(j["page"])));
95  }
96  }
97 
98  // Check for the presence of "filter" key and create an optional
99  filter = j.contains("filter") ? std::make_optional(GenericMap::from_json(j["filter"])) : std::nullopt;
100 }
102 {
103  json baseJson = CrestBaseResponse::to_json();
104  json jsonResources = json::array();
105  for (const auto &resource : resources)
106  {
107  jsonResources.push_back(((GlobalTagDto)resource).to_json());
108  }
109  baseJson["resources"] = jsonResources;
110  return baseJson;
111 }
112 
114 {
115  GlobalTagSetDto globalTagSet;
116  globalTagSet.load_from_json(j);
117  json jsonResources = j.value("resources", json::array());
118  for (auto it = jsonResources.begin(); it != jsonResources.end(); ++it)
119  {
120  globalTagSet.resources.push_back(GlobalTagDto::from_json(*it));
121  }
122 
123  return globalTagSet;
124 }
125 
126 GlobalTagDto::GlobalTagDto() : name(""), validity(0), description(""), release(""),
127  snapshotTime(""), scenario(""), workflow(""), type("T"),
128  snapshotTimeMilli(0), insertionTimeMilli(0)
129 {
130 }
131 
132 GlobalTagDto::GlobalTagDto(const char *l_name, const char *l_description, const char *l_release, const char *l_workflow) : name(l_name), validity(0), description(l_description), release(l_release),
133  snapshotTime(""), scenario(""), workflow(l_workflow), type("T"),
134  snapshotTimeMilli(0), insertionTimeMilli(0)
135 {
136 }
137 
139 {
140  json js = {};
141  js["name"] = name;
142  js["validity"] = validity;
143  js["description"] = description;
144  js["release"] = release;
145  if (insertionTime.has_value())
146  js["insertionTime"] = insertionTime.value();
147  js["snapshotTime"] = snapshotTime;
148  js["scenario"] = scenario;
149  js["workflow"] = workflow;
150  js["type"] = type;
151  js["snapshotTimeMilli"] = snapshotTimeMilli;
152  js["insertionTimeMilli"] = insertionTimeMilli;
153  return js;
154 }
156 {
158  globalTag.name = j.value("name", "");
159  globalTag.validity = j.value<uint64_t>("validity", 0);
160  globalTag.description = j.value("description", "");
161  globalTag.release = j.value("release", "");
162  if (j.contains(std::string{"insertionTime"}))
163  globalTag.insertionTime = j.value("insertionTime", "");
164  globalTag.snapshotTime = j.value("snapshotTime", "");
165  globalTag.scenario = j.value("scenario", "");
166  globalTag.workflow = j.value("workflow", "");
167  globalTag.type = j.value("type", "");
168  globalTag.snapshotTimeMilli = j.value("snapshotTimeMilli", 0);
169  globalTag.insertionTimeMilli = j.value("insertionTimeMilli", 0);
170  return globalTag;
171 }
173 {
174  json js = {};
175  js["name"] = name;
176  js["timeType"] = timeType;
177  js["payloadSpec"] = objectType;
178  js["synchronization"] = synchronization;
179  if (insertionTime.has_value())
180  js["insertionTime"] = insertionTime.value();
181  js["description"] = description;
182  js["lastValidatedTime"] = lastValidatedTime;
183  js["endOfValidity"] = endOfValidity;
184  if (modificationTime.has_value())
185  js["modificationTime"] = modificationTime.value();
186  return js;
187 }
189 {
190  TagDto tag;
191  auto it = j.find("name");
192  if (it != j.end())
193  {
194  tag.name = j["name"];
195  }
196  else
197  {
198  throw Crest::CrestException("ERROR in TagDto.from_json: JSON contains no tag name.");
199  }
200 
201  tag.timeType = j.value("timeType", "");
202  tag.objectType = j.value("payloadSpec", "");
203  tag.synchronization = j.value("synchronization", "none");
204  tag.description = j.value("description", "");
205  tag.lastValidatedTime = j.value<uint64_t>("lastValidatedTime", 0);
206  tag.endOfValidity = j.value<uint64_t>("endOfValidity", 0);
207  if (j.contains(std::string{"insertionTime"}))
208  tag.insertionTime = j.value("insertionTime", "");
209  tag.modificationTime = j.value("modificationTime", "");
210  return tag;
211 }
213 {
214  json baseJson = CrestBaseResponse::to_json();
215  json jsonResources = json::array();
216  for (const auto &resource : resources)
217  {
218  jsonResources.push_back(((TagDto)resource).to_json());
219  }
220  baseJson["resources"] = jsonResources;
221  return baseJson;
222 }
224 {
225  TagSetDto tagSet;
226  tagSet.load_from_json(j);
227  json jsonResources = j.value("resources", json::array());
228  for (auto it = jsonResources.begin(); it != jsonResources.end(); ++it)
229  {
230  tagSet.resources.push_back(TagDto::from_json(*it));
231  }
232 
233  return tagSet;
234 }
236 {
237  return {
238  {"tagName", tagName},
239  {"globalTagName", globalTagName},
240  {"record", record},
241  {"label", label}};
242 }
244 {
245  GlobalTagMapDto tagmap;
246  tagmap.tagName = j.value("tagName", "");
247  tagmap.globalTagName = j.value("globalTagName", "");
248  tagmap.record = j.value("record", "none");
249  tagmap.label = j.value("label", "none");
250  return tagmap;
251 }
252 
254 {
255  json baseJson = CrestBaseResponse::to_json();
256  json jsonResources = json::array();
257  for (const auto &resource : resources)
258  {
259  jsonResources.push_back(((GlobalTagMapDto)resource).to_json());
260  }
261  baseJson["resources"] = jsonResources;
262  return baseJson;
263 }
265 {
266  GlobalTagMapSetDto tagMapSet;
267  tagMapSet.load_from_json(j);
268  json jsonResources = j.value("resources", json::array());
269  for (auto it = jsonResources.begin(); it != jsonResources.end(); ++it)
270  {
271  tagMapSet.resources.push_back(GlobalTagMapDto::from_json(*it));
272  }
273 
274  return tagMapSet;
275 }
276 
278 {
279  GlobalTagMapSetDto tagMapSet;
280  tagMapSet.load_from_json(j);
281  // int n = j.size();
282 
283  for (auto it = j.begin(); it != j.end(); ++it)
284  {
285  tagMapSet.resources.push_back(GlobalTagMapDto::from_json(*it));
286  }
287 
288  tagMapSet.datatype = "maps";
289 
290  return tagMapSet;
291 }
292 
293 void ChannelSetDto::add(const std::string& id, const std::string& name)
294 {
295  m_channels.push_back(std::pair<std::string, std::string>(id, name));
296 }
298 {
299  ChannelSetDto chDto;
300  for (unsigned int i = 0; i < j.size(); i++)
301  {
302  for (auto &el : j[i].items())
303  {
304  chDto.add(el.key(), el.value());
305  break;
306  }
307  }
308  return chDto;
309 }
311 {
312  json chJson = json::array();
313  for (auto &ch : m_channels)
314  {
315  json obj = {};
316  obj[ch.first] = ch.second;
317  chJson.push_back(obj);
318  }
319  return chJson;
320 }
321 void PayloadSpecDto::add(const std::string& name, const std::string& type)
322 {
323  m_row.push_back(std::pair<std::string, std::string>(name, type));
324 }
326 {
327  PayloadSpecDto chDto;
328  //old format
329  if(!j.is_object()&&!j.is_array()){
330  std::string regex=R"delim(([^\s,:]*):\s?([^\s,]*),?)delim";
332  boost::smatch what;
333  std::string input=j.dump();
334  input=boost::regex_replace(input,boost::regex("\""),"");
335  bool match=boost::regex_search(input, what, expression);
336  while (match){
337  std::string n(what[1]);
338  std::string t(what[2]);
339  chDto.add(boost::regex_replace(n, boost::regex("(^[ ]+)|([ ]+$)"),""),boost::regex_replace(t, boost::regex("(^[ ]+)|([ ]+$)"),""));
340  input = what.suffix();
341  match=boost::regex_search(input, what, expression);
342  }
343  return chDto;
344  }
345  for (unsigned int i = 0; i < j.size(); i++)
346  {
347  for (auto &el : j[i].items())
348  {
349  chDto.add(el.key(), el.value());
350  break;
351  }
352  }
353  return chDto;
354 }
356 {
357  json chJson = json::array();
358  for (auto &ch : m_row)
359  {
360  json obj = {};
361  obj[ch.first] = ch.second;
362  chJson.push_back(obj);
363  }
364  return chJson;
365 }
367 {
368  json tagInfo = {};
369  tagInfo["node_description"] = m_node_description;
370  tagInfo["payload_spec"] = m_payload_spec.to_json();
371  tagInfo["channel_list"] = m_channel_list.to_json();
372  return tagInfo;
373 }
375 {
376  std::string node_description = j.value("node_description", "");
377  json jsonSpec = j.value("payload_spec", json::array());
378  if (jsonSpec.is_string())
379  jsonSpec = json::parse(to_string(jsonSpec));
380  PayloadSpecDto payload_spec = PayloadSpecDto::from_json(jsonSpec);
381  json jsonCh = j.value("channel_list", json::array());
382  if (jsonCh.is_string())
383  jsonCh = json::parse(to_string(jsonCh));
385  TagInfoDto dto(node_description, payload_spec, channel_list);
386  return dto;
387 }
388 
390 {
391  json tagMeta = {};
392  tagMeta["tagName"] = tagName;
393  tagMeta["description"] = description;
394  tagMeta["chansize"] = tagInfo.getChannelSize();
395  tagMeta["colsize"] = tagInfo.getColumnSize();
396  tagMeta["tagInfo"] = tagInfo.to_json().dump();
397  if (insertionTime.has_value())
398  tagMeta["insertionTime"] = insertionTime.value();
399  return tagMeta;
400 }
402 {
403  TagMetaDto tag;
404  tag.tagName = j.value("tagName", "");
405  json infoJs = j["tagInfo"];
406  if (infoJs.is_string())
407  {
408  std::istringstream ss(to_string(infoJs));
409  std::string st;
410  ss >> std::quoted(st);
411  infoJs = json::parse(st);
412  }
413  tag.tagInfo = TagInfoDto::from_json(infoJs);
414 
415  tag.description = j.value("description", "");
416  if (j.contains(std::string{"insertionTime"}))
417  tag.insertionTime = j.value("insertionTime", "");
418  return tag;
419 }
420 
422 {
423  json baseJson = CrestBaseResponse::to_json();
424  json jsonResources = json::array();
425  for (const auto &resource : resources)
426  {
427  jsonResources.push_back(((TagMetaDto)resource).to_json());
428  }
429  baseJson["resources"] = jsonResources;
430  return baseJson;
431 }
433 {
434  TagMetaSetDto tagSet;
435  tagSet.load_from_json(j);
436  json jsonResources = j.value("resources", json::array());
437  for (auto it = jsonResources.begin(); it != jsonResources.end(); ++it)
438  {
439  tagSet.resources.push_back(TagMetaDto::from_json(*it));
440  }
441 
442  return tagSet;
443 }
444 
446 {
447  json iov = {};
448  iov["tagName"] = tagName;
449  iov["since"] = since;
450  if (insertionTime.has_value())
451  iov["insertionTime"] = insertionTime.value();
452  iov["payloadHash"] = payloadHash;
453  return iov;
454 }
455 
457 {
458  IovDto iov;
459  iov.tagName = j.value("tagName", "");
460  iov.since = j.value<uint64_t>("since", 0);
461 
462  if (j.contains("insertionTime"))
463  {
464  if (!j["insertionTime"].is_null())
465  {
466  iov.insertionTime = j["insertionTime"];
467  }
468  else
469  {
470  iov.insertionTime = "";
471  }
472  }
473  else
474  {
475  iov.insertionTime = "";
476  }
477 
478  if (j.contains("payloadHash"))
479  {
480  if (!j["payloadHash"].is_null())
481  {
482  iov.payloadHash = j["payloadHash"];
483  }
484  else
485  {
486  iov.payloadHash = "";
487  }
488  }
489  else
490  {
491  iov.payloadHash = "";
492  }
493 
494  return iov;
495 }
496 
498 {
499  json baseJson = CrestBaseResponse::to_json();
500  json jsonResources = json::array();
501  for (const auto &resource : resources)
502  {
503  jsonResources.push_back(((IovDto)resource).to_json());
504  }
505  baseJson["resources"] = jsonResources;
506  return baseJson;
507 }
508 
509 std::vector<uint64_t> IovSetDto::getListSince(){
510  std::vector<uint64_t> v;
511  for (IovDto item_iov: resources){
512  uint64_t since = item_iov.since;
513  v.emplace_back(since);
514  }
515  return v;
516 }
517 
519 {
520  IovSetDto iovSet;
521  iovSet.load_from_json(j);
522  json jsonResources = j.value("resources", json::array());
523  for (auto it = jsonResources.begin(); it != jsonResources.end(); ++it)
524  {
525  iovSet.resources.push_back(IovDto::from_json(*it));
526  }
527 
528  return iovSet;
529 }
530 
532 {
533  IovSetDto iovSet;
534  iovSet.load_from_json(j);
535  // int n = j.size();
536 
537  for (auto it = j.begin(); it != j.end(); ++it)
538  {
539  iovSet.resources.push_back(IovDto::from_json(*it));
540  }
541 
542  iovSet.datatype = "iovs";
543 
544  return iovSet;
545 }
546 
548 {
549  json dto = {};
550  dto["hash"] = hash;
551  dto["since"] = since;
552  dto["data"] = data;
553  dto["streamerInfo"] = getStreamerInfo().dump();
554  return dto;
555 }
557 {
558  json js = {};
559  if (m_app_version.has_value())
560  js["app_version"] = m_app_version.value();
561  if (m_app_name.has_value())
562  js["app_name"] = m_app_name.value();
563  return js;
564 }
565 
567 {
568  StoreDto storeDto;
569  storeDto.hash = j.value("hash", "");
570  storeDto.since = j.value("since", 0.0);
571  storeDto.data = j.value("data", "");
572  //do we need get streamerInfo?
573  return storeDto;
574 }
575 
577 {
578  json baseJson = CrestBaseResponse::to_json();
579  json jsonResources = json::array();
580  for (const auto &resource : resources)
581  {
582  jsonResources.push_back(((StoreDto)resource).to_json());
583  }
584  baseJson["resources"] = jsonResources;
585  return baseJson;
586 }
588 {
589  resources.push_back(dto);
590 }
592 {
593  resources.clear();
594 }
595 
597 {
598  StoreSetDto storeSetDto;
599  json jsonResources = j.value("resources", json::array());
600  for (auto it = jsonResources.begin(); it != jsonResources.end(); ++it)
601  {
602  storeSetDto.push_back(StoreDto::from_json(*it));
603  }
604 
605  return storeSetDto;
606 }
607 
608 // Function to serialize the object to JSON
609 
611 {
612  json payloadDto = {};
613  payloadDto["hash"] = hash;
614  payloadDto["version"] = version;
615  payloadDto["objectType"] = objectType;
616  payloadDto["objectName"] = objectName;
617  payloadDto["compressionType"] = compressionType;
618  payloadDto["checkSum"] = checkSum;
619  payloadDto["size"] = size;
620  if (insertionTime.has_value())
621  payloadDto["insertionTime"] = insertionTime.value();
622  return payloadDto;
623 }
624 
625 // Function to deserialize the object from JSON
626 
628 {
629  PayloadDto payloadDto;
630  payloadDto.hash = j.value("hash", "");
631  payloadDto.version = j.value("version", "");
632  payloadDto.objectType = j.value("objectType", "");
633  payloadDto.objectName = j.value("objectName", "");
634  payloadDto.compressionType = j.value("compressionType", "");
635  payloadDto.checkSum = j.value("checkSum", "");
636  payloadDto.size = j.value("size", 0);
637  if (j.contains(std::string{"insertionTime"}))
638  payloadDto.insertionTime = j.value("insertionTime", "");
639  return payloadDto;
640 }
641 
642 // Function to serialize the object to JSON
643 
645 {
646  json baseJson = CrestBaseResponse::to_json();
647  json jsonResources = json::array();
648  for (const auto &resource : resources)
649  {
650  jsonResources.push_back(((PayloadDto)resource).to_json());
651  }
652  baseJson["resources"] = jsonResources;
653  return baseJson;
654 }
655 
656 // Function to deserialize the object from JSON
657 
659 {
660  PayloadSetDto payloadSetDto;
661  payloadSetDto.load_from_json(j);
662  json jsonResources = j.value("resources", json::array());
663  for (auto it = jsonResources.begin(); it != jsonResources.end(); ++it)
664  {
665  payloadSetDto.resources.push_back(PayloadDto::from_json(*it));
666  }
667 
668  return payloadSetDto;
669 }
TagDto::description
std::string description
Definition: CrestModel.h:104
GlobalTagMapSetDto::from_json
static GlobalTagMapSetDto from_json(const json &j)
Definition: CrestModel.cxx:264
GlobalTagMapDto::record
std::string record
Definition: CrestModel.h:143
TagInfoDto::getChannelSize
size_t getChannelSize() const
Definition: CrestModel.h:229
IovSetDto::from_fs_json
static IovSetDto from_fs_json(const json &j)
Definition: CrestModel.cxx:531
TagDto::timeType
std::string timeType
Definition: CrestModel.h:101
TagMetaDto::tagInfo
TagInfoDto tagInfo
Definition: CrestModel.h:243
GlobalTagMapSetDto::from_fs_json
static GlobalTagMapSetDto from_fs_json(const json &j)
Definition: CrestModel.cxx:277
StoreDto
Definition: CrestModel.h:301
StoreDto::m_app_name
std::optional< std::string > m_app_name
Definition: CrestModel.h:302
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
GlobalTagMapDto::to_json
json to_json() const
Definition: CrestModel.cxx:235
StoreDto::since
uint64_t since
Definition: CrestModel.h:305
GlobalTagDto::insertionTime
std::optional< std::string > insertionTime
Definition: CrestModel.h:61
GlobalTagDto::GlobalTagDto
GlobalTagDto()
Definition: CrestModel.cxx:126
get_generator_info.result
result
Definition: get_generator_info.py:21
dqt_zlumi_alleff_HIST.iov
iov
Definition: dqt_zlumi_alleff_HIST.py:119
IovSetDto::resources
std::vector< IovDto > resources
Definition: CrestModel.h:289
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
PayloadDto::size
int size
Definition: CrestModel.h:353
RespPage::size
int size
Definition: CrestModel.h:21
GlobalTagDto::validity
int64_t validity
Definition: CrestModel.h:58
RespPage::from_json
static RespPage from_json(const json &j)
Definition: CrestModel.cxx:20
TagInfoDto::m_channel_list
ChannelSetDto m_channel_list
Definition: CrestModel.h:207
TagInfoDto::m_payload_spec
PayloadSpecDto m_payload_spec
Definition: CrestModel.h:206
json
nlohmann::json json
Definition: HistogramDef.cxx:9
CrestBaseResponse::load_from_json
void load_from_json(const json &j)
Definition: CrestModel.cxx:85
ChannelSetDto::m_channels
std::vector< std::pair< std::string, std::string > > m_channels
Definition: CrestModel.h:174
IovDto::insertionTime
std::optional< std::string > insertionTime
Definition: CrestModel.h:272
GlobalTagDto::type
std::string type
Definition: CrestModel.h:65
GlobalTagSetDto::resources
std::vector< GlobalTagDto > resources
Definition: CrestModel.h:83
TagDto::to_json
json to_json() const
Definition: CrestModel.cxx:172
StoreDto::hash
std::string hash
Definition: CrestModel.h:306
IovDto
Definition: CrestModel.h:268
CrestBaseResponse::getSize
virtual int64_t getSize() const =0
StoreDto::to_json
json to_json() const
Definition: CrestModel.cxx:547
GlobalTagMapDto::from_json
static GlobalTagMapDto from_json(const json &j)
Definition: CrestModel.cxx:243
PayloadSetDto::resources
std::vector< PayloadDto > resources
Definition: CrestModel.h:368
IovDto::tagName
std::string tagName
Definition: CrestModel.h:270
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1054
PayloadSpecDto
Definition: CrestModel.h:188
CrestModel.h
skel.it
it
Definition: skel.GENtoEVGEN.py:396
GlobalTagDto::snapshotTimeMilli
int64_t snapshotTimeMilli
Definition: CrestModel.h:66
PayloadDto::insertionTime
std::optional< std::string > insertionTime
Definition: CrestModel.h:354
TagSetDto
Definition: CrestModel.h:126
TagDto::name
std::string name
Definition: CrestModel.h:100
ChannelSetDto::add
void add(const std::string &id, const std::string &name)
Definition: CrestModel.cxx:293
PayloadSpecDto::m_row
std::vector< std::pair< std::string, std::string > > m_row
Definition: CrestModel.h:190
python.HION12.expression
string expression
Definition: HION12.py:55
GlobalTagMapDto::globalTagName
std::string globalTagName
Definition: CrestModel.h:142
TagDto::from_json
static TagDto from_json(const json &j)
Definition: CrestModel.cxx:188
GlobalTagMapSetDto::resources
std::vector< GlobalTagMapDto > resources
Definition: CrestModel.h:162
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TagMetaDto::to_json
json to_json() const
Definition: CrestModel.cxx:389
GenericMap::to_json
json to_json() const
Definition: CrestModel.cxx:29
GlobalTagSetDto
Definition: CrestModel.h:81
GlobalTagDto::release
std::string release
Definition: CrestModel.h:60
makeDTCalibBlob_pickPhase.globalTag
globalTag
Definition: makeDTCalibBlob_pickPhase.py:398
ChannelSetDto::to_json
json to_json() const
Definition: CrestModel.cxx:310
IovDto::payloadHash
std::string payloadHash
Definition: CrestModel.h:273
TagMetaDto
Definition: CrestModel.h:238
GlobalTagSetDto::to_json
json to_json() const
Definition: CrestModel.cxx:101
GlobalTagDto::name
std::string name
Definition: CrestModel.h:57
PayloadDto
Definition: CrestModel.h:345
dq_defect_copy_defect_database.since
def since
Definition: dq_defect_copy_defect_database.py:54
IovDto::to_json
json to_json() const
Definition: CrestModel.cxx:445
PayloadSpecDto::to_json
json to_json() const
Definition: CrestModel.cxx:355
RespPage::to_json
json to_json() const
Definition: CrestModel.cxx:12
ChannelSetDto
Definition: CrestModel.h:172
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
PayloadDto::version
std::string version
Definition: CrestModel.h:348
PayloadDto::to_json
json to_json() const
Definition: CrestModel.cxx:610
CrestBaseResponse::filter
std::optional< GenericMap > filter
Definition: CrestModel.h:47
PayloadDto::objectType
std::string objectType
Definition: CrestModel.h:349
TagDto::insertionTime
std::optional< std::string > insertionTime
Definition: CrestModel.h:107
TagSetDto::resources
std::vector< TagDto > resources
Definition: CrestModel.h:128
PayloadDto::objectName
std::string objectName
Definition: CrestModel.h:350
GlobalTagDto::from_json
static GlobalTagDto from_json(const json &j)
Definition: CrestModel.cxx:155
CrestBaseResponse::getFormat
virtual const char * getFormat() const =0
RespPage
Definition: CrestModel.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:85
GlobalTagDto
Definition: CrestModel.h:55
PayloadSpecDto::from_json
static PayloadSpecDto from_json(const json &j)
Definition: CrestModel.cxx:325
beamspotman.n
n
Definition: beamspotman.py:731
TagInfoDto
Definition: CrestModel.h:203
PayloadDto::from_json
static PayloadDto from_json(const json &j)
Definition: CrestModel.cxx:627
GlobalTagDto::description
std::string description
Definition: CrestModel.h:59
TagDto
The TagDto class It contains all fields of the TagDto class from the CREST API.
Definition: CrestModel.h:98
PayloadSpecDto::add
void add(const std::string &name, const std::string &type)
Definition: CrestModel.cxx:321
RespPage::totalElements
int64_t totalElements
Definition: CrestModel.h:22
StoreDto::m_app_version
std::optional< std::string > m_app_version
Definition: CrestModel.h:303
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
GlobalTagDto::snapshotTime
std::string snapshotTime
Definition: CrestModel.h:62
PayloadSetDto::to_json
json to_json() const
Definition: CrestModel.cxx:644
TagMetaSetDto
Definition: CrestModel.h:257
TagSetDto::to_json
json to_json() const
Definition: CrestModel.cxx:212
PayloadSetDto::from_json
static PayloadSetDto from_json(const json &j)
Definition: CrestModel.cxx:658
ChannelSetDto::from_json
static ChannelSetDto from_json(const json &j)
Definition: CrestModel.cxx:297
StoreSetDto::push_back
void push_back(StoreDto dto)
Definition: CrestModel.cxx:587
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
TagDto::modificationTime
std::optional< std::string > modificationTime
Definition: CrestModel.h:108
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
doL1CaloHVCorrections.channel_list
channel_list
Definition: doL1CaloHVCorrections.py:320
PayloadDto::checkSum
std::string checkSum
Definition: CrestModel.h:352
GlobalTagMapSetDto
Definition: CrestModel.h:160
StoreSetDto::from_json
static StoreSetDto from_json(const json &j)
Definition: CrestModel.cxx:596
RespPage::number
int number
Definition: CrestModel.h:24
TagInfoDto::to_json
json to_json() const
Definition: CrestModel.cxx:366
CrestBaseResponse::datatype
std::optional< std::string > datatype
Definition: CrestModel.h:45
StoreSetDto::clear
void clear()
Definition: CrestModel.cxx:591
GlobalTagMapSetDto::to_json
json to_json() const
Definition: CrestModel.cxx:253
StoreDto::data
std::string data
Definition: CrestModel.h:307
TagDto::lastValidatedTime
uint64_t lastValidatedTime
Definition: CrestModel.h:105
PayloadDto::compressionType
std::string compressionType
Definition: CrestModel.h:351
lumiFormat.array
array
Definition: lumiFormat.py:91
GenericMap
Definition: CrestModel.h:31
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
python.ExitCodes.what
def what(code)
Definition: ExitCodes.py:73
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
PayloadSetDto
Definition: CrestModel.h:366
PayloadDto::hash
std::string hash
Definition: CrestModel.h:347
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TagDto::endOfValidity
uint64_t endOfValidity
Definition: CrestModel.h:106
GlobalTagMapDto::tagName
std::string tagName
Definition: CrestModel.h:141
StoreDto::getStreamerInfo
json getStreamerInfo() const
Definition: CrestModel.cxx:556
TagInfoDto::m_node_description
std::string m_node_description
Definition: CrestModel.h:205
RespPage::totalPages
int totalPages
Definition: CrestModel.h:23
GenericMap::additionalProperties
std::map< std::string, std::string > additionalProperties
Definition: CrestModel.h:33
TagInfoDto::from_json
static TagInfoDto from_json(const json &j)
Definition: CrestModel.cxx:374
IovSetDto::getListSince
std::vector< uint64_t > getListSince()
Definition: CrestModel.cxx:509
StoreSetDto::resources
std::vector< StoreDto > resources
Definition: CrestModel.h:333
TagMetaDto::description
std::string description
Definition: CrestModel.h:241
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
GlobalTagDto::scenario
std::string scenario
Definition: CrestModel.h:63
IovSetDto::from_json
static IovSetDto from_json(const json &j)
Definition: CrestModel.cxx:518
StoreDto::from_json
static StoreDto from_json(const json &j)
Definition: CrestModel.cxx:566
python.PyAthena.v
v
Definition: PyAthena.py:154
TagMetaDto::from_json
static TagMetaDto from_json(const json &j)
Definition: CrestModel.cxx:401
IovDto::since
uint64_t since
Definition: CrestModel.h:271
TagMetaDto::tagName
std::string tagName
Definition: CrestModel.h:240
StoreSetDto::to_json
json to_json() const
Definition: CrestModel.cxx:576
GlobalTagDto::to_json
json to_json() const
Definition: CrestModel.cxx:138
IovSetDto
Definition: CrestModel.h:287
TagSetDto::from_json
static TagSetDto from_json(const json &j)
Definition: CrestModel.cxx:223
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CrestBaseResponse::page
std::optional< RespPage > page
Definition: CrestModel.h:46
CrestBaseResponse::to_json
json to_json() const
Definition: CrestModel.cxx:54
TagMetaSetDto::resources
std::vector< TagMetaDto > resources
Definition: CrestModel.h:259
pickleTool.object
object
Definition: pickleTool.py:30
GlobalTagDto::workflow
std::string workflow
Definition: CrestModel.h:64
TagDto::objectType
std::string objectType
Definition: CrestModel.h:102
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
StoreSetDto
Definition: CrestModel.h:331
python.PyAthena.obj
obj
Definition: PyAthena.py:132
GlobalTagDto::insertionTimeMilli
int64_t insertionTimeMilli
Definition: CrestModel.h:67
TagInfoDto::getColumnSize
size_t getColumnSize() const
Definition: CrestModel.h:230
GlobalTagSetDto::from_json
static GlobalTagSetDto from_json(const json &j)
Definition: CrestModel.cxx:113
TagMetaSetDto::from_json
static TagMetaSetDto from_json(const json &j)
Definition: CrestModel.cxx:432
TagMetaSetDto::to_json
json to_json() const
Definition: CrestModel.cxx:421
Crest::CrestException
Definition: CrestException.h:9
IovDto::from_json
static IovDto from_json(const json &j)
Definition: CrestModel.cxx:456
TagDto::synchronization
std::string synchronization
Definition: CrestModel.h:103
GlobalTagMapDto
Definition: CrestModel.h:139
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
GenericMap::from_json
static GenericMap from_json(const json &j)
Definition: CrestModel.cxx:41
GlobalTagMapDto::label
std::string label
Definition: CrestModel.h:144
IovSetDto::to_json
json to_json() const
Definition: CrestModel.cxx:497
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
TagMetaDto::insertionTime
std::optional< std::string > insertionTime
Definition: CrestModel.h:242