ATLAS Offline Software
CrestContainer.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2020-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include <stdarg.h>
8 #include <boost/archive/iterators/base64_from_binary.hpp>
9 #include <boost/archive/iterators/binary_from_base64.hpp>
10 #include <boost/archive/iterators/transform_width.hpp>
11 #include <boost/algorithm/string.hpp>
12 #include <fstream>
13 #include <iomanip>
14 
16 
19 {
20  flush();
21 }
22 
24 {
25  return m_isVectorPayload;
26 }
27 void Crest::CrestContainer::setVectorPayload(bool isVectorPayload)
28 {
29  m_isVectorPayload = isVectorPayload;
30 }
31 
33 {
34  for(auto& t: s_typeToString){
35  if(t.second.compare(type)==0)
36  return t.first;
37  }
38  throw CommonCrestException("The type of parameter is not defined.");
39 }
40 
41 // Function to convert an integer to a TypeId
43 {
44  if (value < 0 || value >= static_cast<int>(Crest::TypeId::TypeIdCount)) {
45  throw std::out_of_range("Invalid integer value for TypeId");
46  }
47  return static_cast<Crest::TypeId>(value);
48 }
49 
50 std::string Crest::CrestContainer::base64_encode(const uint8_t *data, unsigned int len)
51 {
52  using namespace boost::archive::iterators;
53  typedef base64_from_binary<transform_width<const char *, 6, 8>> base64_encoder;
54 
55  std::string encodedData;
56  std::copy(base64_encoder(data), base64_encoder(data + len), std::back_inserter(encodedData));
57 
58  size_t numPaddingChars = (3 - len % 3) % 3;
59  encodedData.append(numPaddingChars, '=');
60 
61  return encodedData;
62 }
63 
64 // Decode base64 data to binary
65 std::vector<unsigned char> Crest::CrestContainer::base64_decode(const std::string &encodedData)
66 {
67  using namespace boost::archive::iterators;
68  typedef transform_width<binary_from_base64<std::string::const_iterator>, 8, 6> base64_decoder;
69 
70  std::string encodedDataNoPadding = encodedData;
71  boost::algorithm::erase_all(encodedDataNoPadding, "=");
72 
73  std::vector<unsigned char> decodedData;
74  std::copy(base64_decoder(encodedDataNoPadding.begin()), base64_decoder(encodedDataNoPadding.end()), std::back_inserter(decodedData));
75 
76  return decodedData;
77 }
78 
80 {
81  m_payload_spec.emplace_back(name, type);
82 }
83 
84 void Crest::CrestContainer::addColumn(const std::string &name, const char *type)
85 {
86  addColumn(name, stringToTypeId(type));
87 }
88 
90 {
91  addColumn(name, static_cast<TypeId>(type));
92 }
93 
95 {
96  auto it = std::find_if(m_payload_spec.begin(), m_payload_spec.end(),
97  [&name](const auto &column)
98  { return column.first == name; });
99 
100  if (it != m_payload_spec.end())
101  {
102  m_row[name] = nlohmann::json::value_t::null;
103  }
104 }
105 
106 void Crest::CrestContainer::addRecord(const char *name, int number, ...)
107 {
108 
109  va_list ap;
110  va_start(ap, number);
111 
112  for (auto &column : m_payload_spec)
113  {
114  if (column.first != name)
115  {
116  continue;
117  }
118 
119  switch (column.second)
120  {
121  case TypeId::Bool:
122  m_row[name] = va_arg(ap, int);
123  break;
124  case TypeId::UChar:
125  m_row[name] = static_cast<unsigned char>(va_arg(ap, int));
126  break;
127  case TypeId::Int16:
128  case TypeId::Int32:
129  m_row[name] = va_arg(ap, int);
130  break;
131  case TypeId::UInt16:
132  case TypeId::UInt32:
133  m_row[name] = va_arg(ap, unsigned int);
134  break;
135  case TypeId::UInt63:
136  m_row[name] = va_arg(ap, uint64_t);
137  break;
138  case TypeId::Int64:
139  m_row[name] = va_arg(ap, int64_t);
140  break;
141  case TypeId::Float:
142  case TypeId::Double:
143  m_row[name] = va_arg(ap, double);
144  break;
145  case TypeId::String255:
146  case TypeId::String4k:
147  case TypeId::String64k:
148  case TypeId::String16M:
149  case TypeId::Blob64k:
150  case TypeId::Blob16M:
151  m_row[name] = std::string(va_arg(ap, const char *));
152  break;
153  default:
154  throw CommonCrestException("Unsupported column type.");
155  }
156  }
157  va_end(ap);
158 }
159 
161 {
162  addExternalData(channel_id, getRow());
163 }
164 
166 {
167 
168  validatePayloadSize(data);
169  nlohmann::json arr_data = m_isVectorPayload ? nlohmann::json::array() : nlohmann::json();
170 
171  for (const auto &data_row : data)//m_vector_data)
172  {
173  auto row_arr_data = createRowArray(data_row);
174 
175  if (m_isVectorPayload)
176  {
177  arr_data.push_back(row_arr_data);
178  }
179  else
180  {
181  arr_data = row_arr_data;
182  }
183  }
184  m_payload[channel_id] = arr_data;
185  m_vector_data.clear();
186  m_row.clear();
187 }
188 
190 {
191  if (!data.is_array())
192  throw CommonCrestException("The format of data is wrong. It should be the vector (size 1 for non vector payload)");
193  if (!m_isVectorPayload && m_vector_data.size() > 1)
194  {
195  throw CommonCrestException("The payload is not a vector, but the size seems to be larger than 1....");
196  }
197 }
198 
200 {
201  nlohmann::json row_arr_data = nlohmann::json::array();
202  for (const auto &column : m_payload_spec)
203  {
204  if (data_row.find(column.first) == data_row.end())
205  {
206  std::string msg = "The data does not contain the column: " + column.first;
207  throw CommonCrestException(msg.c_str());
208  }
209  row_arr_data.push_back(data_row[column.first]);
210  }
211  return row_arr_data;
212 }
213 
215 {
216  m_iov_data["since"] = since;
217  m_iov_data["data"] = m_payload;
218  m_full_data[std::to_string(since)]=m_payload;
219  m_payload.clear();
220 }
221 
223  m_iov_data["since"]=since;
224  m_iov_data["data"]=m_full_data[std::to_string(since)];
225 }
226 
227 std::vector<std::string> Crest::CrestContainer::channelIds(){
228  std::vector<std::string> chs;
229  for (auto& x : m_iov_data["data"].items()){
230  chs.push_back(x.key());
231  }
232  return chs;
233 }
234 const std::vector<std::pair<std::string, Crest::TypeId>> &Crest::CrestContainer::getMPayloadSpec()
235 {
236  return m_payload_spec;
237 }
238 
240 {
241  if (m_payload.empty())
242  {
243  m_payload = m_iov_data["data"];
244  }
245  auto it = m_payload.find(channel_id);
246  if (it == m_payload.end())
247  {
248  std::string msg = "Channel id " + std::string(channel_id) + " is not found.";
249  throw CommonCrestException(msg.c_str());
250  }
251  if (m_row.empty())
252  {
253  for (const auto &column : m_payload_spec)
254  {
255  int index = getColumnIndex(column.first);
256  if (index == -1)
257  {
258  throw std::runtime_error("Column name not found.");
259  }
260  m_row[column.first] = it.value()[index];
261  }
262  }
263  return it.value();
264 }
265 
267 {
268  auto it = std::find_if(m_payload_spec.begin(), m_payload_spec.end(),
269  [&name](const auto &column)
270  { return column.first == name; });
271 
272  if (it != m_payload_spec.end())
273  {
274  return std::distance(m_payload_spec.begin(), it);
275  }
276  else
277  {
278  throw CommonCrestException("The column name is not found.");
279  }
280 }
281 
283 {
284  if (m_isVectorPayload)
285  {
286  m_vector_data.push_back(m_row);
287  m_row.clear();
288  }
289  else
290  {
291  std::string msg = "The payload is not a vector.";
292  throw CommonCrestException(msg.c_str());
293  }
294 }
295 
297 {
298  if (m_isVectorPayload)
299  return m_vector_data;
300  m_vector_data.push_back(m_row);
301  return m_vector_data;
302 }
303 
305 {
306  if (m_payload.empty() && m_iov_data.empty())
307  {
308  std::string msg = "The payload is empty.";
309  throw CommonCrestException(msg.c_str());
310  }
311  if (m_payload.empty())
312  {
313  m_payload = m_iov_data["data"];
314  }
315  return m_payload;
316 }
317 
319 {
320  if (m_iov_data.empty())
321  {
322  std::string msg = "The iov data is empty.";
323  throw CommonCrestException(msg.c_str());
324  }
325  return m_iov_data;
326 }
327 
329 {
330  m_iov_data = j;
331 }
332 
334 {
335  m_payload = j;
336 }
337 
339 {
340  return getPayload().dump();
341 }
342 
344 {
345  return m_iov_data.dump();
346 }
347 
349 {
350  json pspec_data=json::array();
351  for (auto &column : m_payload_spec)
352  {
353  json j={};
354  std::map<TypeId, std::string>::const_iterator pos = Crest::s_typeToString.find(column.second);
355  if (pos == Crest::s_typeToString.end()) {
356  throw CommonCrestException("Type do not exist in the map.");
357  } else {
358  j[column.first] = pos->second;
359  }
360  pspec_data.push_back(j);
361  }
362  return pspec_data;
363 }
364 
366 {
367  if (j.is_array())
368  {
369  for (const auto &column : j)
370  {
371  for (const auto &[name, type] : column.items())
372  {
373  addColumn(name, static_cast<TypeId>(std::stoi(type.get<std::string>())));
374  }
375  }
376  }
377  else
378  {
379  for (const auto &[name, type] : j.items())
380  {
381  addColumn(name, static_cast<TypeId>(type.get<int>()));
382  }
383  }
384 }
385 
387 {
388  m_iov_data.clear();
389  m_row.clear();
390  m_vector_data.clear();
391  m_full_data={};
392 }
393 
395  m_payload.clear();
396  m_iov_data.clear();
397  m_row.clear();
398  m_vector_data.clear();
399  m_full_data={};
400 }
401 
402 // Function to dump JSON object into a file
404 {
405  std::ofstream file(filename);
406  if (file.is_open())
407  {
408  file << std::setprecision(6) << j.dump(4);
409  file.close();
410  }
411  else
412  {
413  std::cerr << "CondContainer::dump_json_to_file: Error opening file: " << filename << std::endl;
414  }
415 }
416 
417 // Function to read file and create JSON object
418 nlohmann::json Crest::CrestContainer::read_json_from_file(const std::string &filename, const std::string &spec_filename)
419 {
420 
421  std::ifstream specfile(spec_filename);
422  nlohmann::json jspec;
423  if (specfile.is_open())
424  {
425  specfile >> jspec;
426  specfile.close();
427  }
428  else
429  {
430  std::cerr << "CondContainer::read_json_from_file: Error opening file: " << spec_filename << std::endl;
431  }
432  // Set the payload spec
433  setPayloadSpec(jspec);
434  // Read data file
435  std::ifstream file(filename);
436  nlohmann::json j;
437  if (file.is_open())
438  {
439  file >> j;
440  file.close();
441  }
442  else
443  {
444  std::cerr << "CondContainer::read_json_from_file: Error opening file: " << filename << std::endl;
445  }
446  return j;
447 }
448 
449 void Crest::CrestContainer::parseOldFormat(std::string& colName, TypeId& typespec,const nlohmann::json & thisVal){
450  try{
451  if (thisVal.is_null()){
452  m_row[colName] ="NULL";
453  return;
454  }
455  std::string strVal = to_string(thisVal);
456  if(strVal.size()>2&& strVal[0]=='"'&& strVal[strVal.size()-1]=='"')
457  strVal=strVal.substr(1,strVal.size()-2);
458  if((strVal.compare("NULL")==0||strVal.compare("null")==0)&&
459  (typespec==TypeId::Bool || typespec==TypeId::Int16 || typespec==TypeId::UInt16
460  || typespec==TypeId::Int32 || typespec==TypeId::UInt32
461  || typespec==TypeId::Int64 || typespec==TypeId::UInt63
462  || typespec==TypeId::Float || typespec==TypeId::Double)){
463  m_row[colName] ="NULL";
464  return;
465  }
466  switch (typespec) {
467  case TypeId::Bool:
468  {
469  const bool newVal=(strVal == "true");
470  m_row[colName] = newVal;
471  break;
472  }
473  case TypeId::UChar:
474  {
475  m_row[colName]=std::stoul(strVal);
476  break;
477  }
478  case TypeId::Int16:
479  {
480  m_row[colName]=std::stol(strVal);
481  break;
482  }
483  case TypeId::UInt16:
484  {
485  m_row[colName]=std::stoul(strVal);
486  break;
487  }
488  case TypeId::Int32:
489  {
490  m_row[colName]=std::stoi(strVal);
491  break;
492  }
493  case TypeId::UInt32:
494  {
495  m_row[colName]=std::stoull(strVal);
496  break;
497  }
498  case TypeId::UInt63:
499  {
500  m_row[colName]=std::stoull(strVal);
501  break;
502  }
503  case TypeId::Int64:
504  {
505  m_row[colName]=std::stoll(strVal);
506  break;
507  }
508  case TypeId::Float:
509  {
510  m_row[colName]=std::stof(strVal);
511  break;
512  }
513  case TypeId::Double:
514  {
515  m_row[colName]=std::stod(strVal);
516  break;
517  }
518  case TypeId::String255:
519  case TypeId::String4k:
520  case TypeId::String64k:
521  case TypeId::String16M:
522  case TypeId::String128M:
523  {
524  m_row[colName]=thisVal.get<std::string>();
525  break;
526  }
527  case TypeId::Blob128M:
528  case TypeId::Blob16M:
529  case TypeId::Blob64k:
530  {
531  m_row[colName]=thisVal.get<std::string>();
532  break;
533  }
534  default:
535  {
536  throw std::runtime_error("UNTREATED TYPE!");
537  break;
538  }
539  }
540 
541  }
542  catch(json::exception& e){
543  std::cerr << e.what() << std::endl;
544  throw std::runtime_error(e.what());
545  }
546 }
548 {
549  nlohmann::json j = j_in;
550  if (j.is_string()){
551  std::istringstream ss(to_string(j));
552  std::string st;
553  ss >> std::quoted(st);
554  j = json::parse(st);
555  }
556  if(m_modeId!=ModeId::Standard)
557  throw CommonCrestException("Unsupported type of payload.");
558  // Accessing the "data" object
559  if (j.contains("data") && j["data"].is_object())
560  {
561  const auto &data = j["data"];
562 
563  // Loop over each channel in the data
564  for (const auto &channel : data.items())
565  {
566  std::string channelKey = channel.key();
567  const auto &data_ch = channel.value();
569  if(m_isVectorPayload)
570  vecJson=data_ch;
571  else
572  vecJson.push_back(data_ch);
573 
574  for (const auto &values : vecJson)
575  {
576  // TODO: this will not work for vector payloads
577  // Check if the number of values in the array matches the expected number of columns
578  if (values.is_array() && values.size() == m_payload_spec.size())
579  {
580  for (size_t i = 0; i < values.size(); ++i)
581  {
582  const auto &spec = m_payload_spec[i];
583  std::string colName = spec.first;
584  TypeId colType = spec.second;
585  if(values[i].is_string() &&( colType==TypeId::Bool || colType==TypeId::Int16 || colType==TypeId::UInt16
586  || colType==TypeId::Int32 || colType==TypeId::UInt32 || colType==TypeId::Int64 || colType==TypeId::UInt63 || colType==TypeId::Float || colType==TypeId::Double))
587  {
588  parseOldFormat(colName,colType,values[i]);
589  continue;
590  }
591  switch (colType)
592  {
593  case TypeId::Bool:
594  m_row[colName] = values[i].get<bool>();
595  break;
596  case TypeId::UChar:
597  m_row[colName] = values[i].get<unsigned char>();
598  break;
599  case TypeId::Int16:
600  case TypeId::Int32:
601  m_row[colName] = values[i].get<int>();
602  break;
603  case TypeId::UInt16:
604  case TypeId::UInt32:
605  m_row[colName] = values[i].get<unsigned int>();
606  break;
607  case TypeId::UInt63:
608  m_row[colName] = values[i].get<uint64_t>();
609  break;
610  case TypeId::Int64:
611  m_row[colName] = values[i].get<int64_t>();
612  break;
613  case TypeId::Float:
614  case TypeId::Double:
615  m_row[colName] = values[i].get<double>();
616  break;
617  case TypeId::String255:
618  case TypeId::String4k:
619  case TypeId::String64k:
620  case TypeId::String16M:
621  case TypeId::String128M:
622  m_row[colName] = values[i].get<std::string>();
623  break;
624  case TypeId::Blob128M:
625  case TypeId::Blob64k:
626  case TypeId::Blob16M:
627  m_row[colName] = values[i].get<std::string>();
628  break;
629  default:
630  throw CommonCrestException("Unsupported column type.");
631  }
632  }
633  }
634  else
635  {
636  std::cerr << "CrestContainer::from_json: Mismatch in number of values for channel " << channelKey << std::endl;
637  }
638  if(m_isVectorPayload)
639  putRow2Vector();
640  }
641  addData(channelKey.c_str());
642  }
643  }
644  else
645  {
646  std::cerr << "CrestContainer::from_json: JSON does not contain a 'data' object or it is not a JSON object." << std::endl;
647  std::cerr << "CrestContainer::from_json json:"<<j<<std::endl;
648  }
649  addIov(since);
650 }
Crest::CrestContainer::stringToTypeId
Crest::TypeId stringToTypeId(const std::string &type) const
Definition: CrestContainer.cxx:32
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
Crest::CrestContainer::addData
void addData(const char *channel_id)
It associate the payload row to a channel_id.
Definition: CrestContainer.cxx:160
json
nlohmann::json json
Definition: CrestContainer.cxx:15
Crest::CrestContainer::setPayloadSpec
void setPayloadSpec(const nlohmann::json &j)
Definition: CrestContainer.cxx:365
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
Crest::CrestContainer::addColumn
void addColumn(const std::string &name, TypeId type)
It adds a column to the payload specification.
Definition: CrestContainer.cxx:79
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
FullCPAlgorithmsTest_eljob.flush
flush
Definition: FullCPAlgorithmsTest_eljob.py:186
Crest::CrestContainer::parseOldFormat
void parseOldFormat(std::string &colName, TypeId &typespec, const nlohmann::json &j)
Definition: CrestContainer.cxx:449
Crest::TypeId::UInt16
@ UInt16
json
nlohmann::json json
Definition: HistogramDef.cxx:9
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CaloCondBlobAlgs_fillNoiseFromASCII.spec
spec
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:47
Crest::TypeId::Blob128M
@ Blob128M
index
Definition: index.py:1
Crest::CrestContainer::getIovData
const nlohmann::json & getIovData()
Definition: CrestContainer.cxx:318
Crest::CrestContainer::setVectorPayload
void setVectorPayload(bool isVectorPayload)
Definition: CrestContainer.cxx:27
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1054
Crest::CrestContainer::getRow
const nlohmann::json & getRow()
Definition: CrestContainer.cxx:296
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Crest::TypeId::UInt63
@ UInt63
DeMoUpdate.column
dictionary column
Definition: DeMoUpdate.py:1110
CrestCondException.h
Crest::CrestContainer::getPayload
const nlohmann::json & getPayload()
Definition: CrestContainer.cxx:304
Crest::CrestContainer::isVectorPayload
bool isVectorPayload()
It sets the mode of the container.
Definition: CrestContainer.cxx:23
athena.value
value
Definition: athena.py:124
Crest::CrestContainer::CrestContainer
CrestContainer()
Definition: CrestContainer.cxx:17
module_driven_slicing.getRow
def getRow(trk, hit_idx)
Definition: module_driven_slicing.py:179
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Crest::CrestContainer::getJsonPayload
std::string getJsonPayload()
It returns the json representation of the container.
Definition: CrestContainer.cxx:338
Crest::CrestContainer::flush
void flush()
It reinitializes the containers.
Definition: CrestContainer.cxx:386
Crest::CrestContainer::dump_json_to_file
void dump_json_to_file(const nlohmann::json &j, const std::string &filename)
It creates a file with the json representation of the container.
Definition: CrestContainer.cxx:403
Crest::CrestContainer::base64_decode
static std::vector< unsigned char > base64_decode(const std::string &encodedData)
It decodes the input string from base64.
Definition: CrestContainer.cxx:65
x
#define x
Crest::CrestContainer::setIovData
void setIovData(const nlohmann::json &j)
Definition: CrestContainer.cxx:328
python.AtlRunQueryParser.ap
ap
Definition: AtlRunQueryParser.py:826
Crest::TypeId::String16M
@ String16M
Crest::CrestContainer::getColumnIndex
int getColumnIndex(const std::string &name)
It returns the index of the column with the given name.
Definition: CrestContainer.cxx:266
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:805
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
dq_defect_copy_defect_database.since
def since
Definition: dq_defect_copy_defect_database.py:54
Crest::CrestContainer::channelIds
std::vector< std::string > channelIds()
Definition: CrestContainer.cxx:227
Crest::TypeId::String255
@ String255
Crest::CrestContainer::getMPayloadSpec
const std::vector< std::pair< std::string, TypeId > > & getMPayloadSpec()
Definition: CrestContainer.cxx:234
Crest::CrestContainer::addNullRecord
void addNullRecord(const char *name)
It adds a null value to the payload.
Definition: CrestContainer.cxx:94
Crest::TypeId::Blob64k
@ Blob64k
Crest::TypeId::Float
@ Float
Crest::ModeId
ModeId
Definition: CrestContainer.h:51
Crest::CrestContainer::~CrestContainer
~CrestContainer()
Definition: CrestContainer.cxx:18
Crest::TypeId::Bool
@ Bool
Crest::CrestContainer::clear
void clear()
Definition: CrestContainer.cxx:394
Crest::TypeId::Blob16M
@ Blob16M
lumiFormat.i
int i
Definition: lumiFormat.py:85
Crest::TypeId::UChar
@ UChar
Crest::TypeId::UInt32
@ UInt32
calibdata.exception
exception
Definition: calibdata.py:496
createCoolChannelIdFile.channel_id
channel_id
Definition: createCoolChannelIdFile.py:52
Crest::CommonCrestException
Definition: CrestCondException.h:33
file
TFile * file
Definition: tile_monitor.h:29
Crest::CrestContainer::read_json_from_file
nlohmann::json read_json_from_file(const std::string &filename, const std::string &spec_filename)
It reads a json file and returns the json object.
Definition: CrestContainer.cxx:418
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
Crest::TypeId::Int32
@ Int32
Crest::CrestContainer::base64_encode
static std::string base64_encode(const uint8_t *bytes_to_encode, unsigned int in_len)
It encodes the input string to base64.
Definition: CrestContainer.cxx:50
Crest::CrestContainer::intToTypeId
Crest::TypeId intToTypeId(int value) const
Definition: CrestContainer.cxx:42
Crest::CrestContainer::getPayloadSpec
nlohmann::json getPayloadSpec()
Definition: CrestContainer.cxx:348
Crest::CrestContainer::addRecord
void addRecord(const char *name, int number,...)
It adds a record to the payload.
Definition: CrestContainer.cxx:106
Crest::CrestContainer::from_json
void from_json(const uint64_t since, const nlohmann::json &j)
It reads a json object to fill the containers.
Definition: CrestContainer.cxx:547
Crest::TypeId::String128M
@ String128M
lumiFormat.array
array
Definition: lumiFormat.py:91
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
Crest::CrestContainer::validatePayloadSize
void validatePayloadSize(const nlohmann::json &data) const
Definition: CrestContainer.cxx:189
Crest::CrestContainer::addExternalData
void addExternalData(const char *channel_id, const nlohmann::json &data)
It associate the payload row to a channel_id.
Definition: CrestContainer.cxx:165
Crest::ModeId::Standard
@ Standard
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
CrestContainer.h
Header file for CrestContainer class.
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Crest::TypeId::Int64
@ Int64
Crest::CrestContainer::selectIov
void selectIov(const uint64_t since)
Definition: CrestContainer.cxx:222
DeMoScan.index
string index
Definition: DeMoScan.py:364
Crest::TypeId::String64k
@ String64k
Crest::CrestContainer::setPayload
void setPayload(const nlohmann::json &j)
Definition: CrestContainer.cxx:333
Crest::TypeId::TypeIdCount
@ TypeIdCount
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Crest::CrestContainer::getJsonIovData
std::string getJsonIovData()
It returns the json representation of the container.
Definition: CrestContainer.cxx:343
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
TypeId
Definition: IdDictMgr.cxx:60
Crest::CrestContainer::createRowArray
nlohmann::json createRowArray(const nlohmann::json &data_row) const
Definition: CrestContainer.cxx:199
Crest::TypeId::String4k
@ String4k
Crest::TypeId::Int16
@ Int16
calibdata.copy
bool copy
Definition: calibdata.py:27
Crest::CrestContainer::addIov
void addIov(const uint64_t since)
It adds an IOV to the json object m_iov_data.
Definition: CrestContainer.cxx:214
Crest::TypeId
TypeId
Definition: CrestContainer.h:24
Crest::CrestContainer::getPayloadChannel
const nlohmann::json & getPayloadChannel(const char *channel_id)
Definition: CrestContainer.cxx:239
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Crest::TypeId::Double
@ Double
Crest::CrestContainer::putRow2Vector
void putRow2Vector()
It adds row data to vector.
Definition: CrestContainer.cxx:282