ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
IovDto Class Reference

#include <CrestModel.h>

Collaboration diagram for IovDto:

Public Member Functions

 IovDto (const std::string &tagName, uint64_t since, const std::string &payloadHash)
 
 IovDto ()
 
json to_json () const
 

Static Public Member Functions

static IovDto from_json (const json &j)
 

Public Attributes

std::string tagName
 
uint64_t since
 
std::optional< std::string > insertionTime
 
std::string payloadHash
 

Detailed Description

Definition at line 267 of file CrestModel.h.

Constructor & Destructor Documentation

◆ IovDto() [1/2]

IovDto::IovDto ( const std::string &  tagName,
uint64_t  since,
const std::string &  payloadHash 
)
inline

Definition at line 275 of file CrestModel.h.

275  :
277  }

◆ IovDto() [2/2]

IovDto::IovDto ( )
inline

Definition at line 279 of file CrestModel.h.

279  : tagName(""), since(0), payloadHash("") {
280  }

Member Function Documentation

◆ from_json()

IovDto IovDto::from_json ( const json j)
static

Definition at line 456 of file CrestModel.cxx.

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 }

◆ to_json()

json IovDto::to_json ( ) const

Definition at line 445 of file CrestModel.cxx.

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 }

Member Data Documentation

◆ insertionTime

std::optional<std::string> IovDto::insertionTime

Definition at line 272 of file CrestModel.h.

◆ payloadHash

std::string IovDto::payloadHash

Definition at line 273 of file CrestModel.h.

◆ since

uint64_t IovDto::since

Definition at line 271 of file CrestModel.h.

◆ tagName

std::string IovDto::tagName

Definition at line 270 of file CrestModel.h.


The documentation for this class was generated from the following files:
dqt_zlumi_alleff_HIST.iov
iov
Definition: dqt_zlumi_alleff_HIST.py:119
json
nlohmann::json json
Definition: HistogramDef.cxx:9
IovDto::insertionTime
std::optional< std::string > insertionTime
Definition: CrestModel.h:272
IovDto
Definition: CrestModel.h:268
IovDto::tagName
std::string tagName
Definition: CrestModel.h:270
IovDto::payloadHash
std::string payloadHash
Definition: CrestModel.h:273
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
IovDto::since
uint64_t since
Definition: CrestModel.h:271