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

#include <CrestModel.h>

Collaboration diagram for GlobalTagDto:

Public Member Functions

 GlobalTagDto (const char *_name, const char *_description, const char *_release, const char *_workflow)
 
 GlobalTagDto ()
 
json to_json () const
 

Static Public Member Functions

static GlobalTagDto from_json (const json &j)
 

Public Attributes

std::string name
 
int64_t validity
 
std::string description
 
std::string release
 
std::optional< std::string > insertionTime
 
std::string snapshotTime
 
std::string scenario
 
std::string workflow
 
std::string type
 
int64_t snapshotTimeMilli
 
int64_t insertionTimeMilli
 

Detailed Description

Definition at line 54 of file CrestModel.h.

Constructor & Destructor Documentation

◆ GlobalTagDto() [1/2]

GlobalTagDto::GlobalTagDto ( const char *  _name,
const char *  _description,
const char *  _release,
const char *  _workflow 
)

Definition at line 132 of file CrestModel.cxx.

132  : name(l_name), validity(0), description(l_description), release(l_release),
133  snapshotTime(""), scenario(""), workflow(l_workflow), type("T"),
135 {
136 }

◆ GlobalTagDto() [2/2]

GlobalTagDto::GlobalTagDto ( )

Definition at line 126 of file CrestModel.cxx.

126  : name(""), validity(0), description(""), release(""),
127  snapshotTime(""), scenario(""), workflow(""), type("T"),
129 {
130 }

Member Function Documentation

◆ from_json()

GlobalTagDto GlobalTagDto::from_json ( const json j)
static

Definition at line 155 of file CrestModel.cxx.

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 }

◆ to_json()

json GlobalTagDto::to_json ( ) const

Definition at line 138 of file CrestModel.cxx.

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 }

Member Data Documentation

◆ description

std::string GlobalTagDto::description

Definition at line 59 of file CrestModel.h.

◆ insertionTime

std::optional<std::string> GlobalTagDto::insertionTime

Definition at line 61 of file CrestModel.h.

◆ insertionTimeMilli

int64_t GlobalTagDto::insertionTimeMilli

Definition at line 67 of file CrestModel.h.

◆ name

std::string GlobalTagDto::name

Definition at line 57 of file CrestModel.h.

◆ release

std::string GlobalTagDto::release

Definition at line 60 of file CrestModel.h.

◆ scenario

std::string GlobalTagDto::scenario

Definition at line 63 of file CrestModel.h.

◆ snapshotTime

std::string GlobalTagDto::snapshotTime

Definition at line 62 of file CrestModel.h.

◆ snapshotTimeMilli

int64_t GlobalTagDto::snapshotTimeMilli

Definition at line 66 of file CrestModel.h.

◆ type

std::string GlobalTagDto::type

Definition at line 65 of file CrestModel.h.

◆ validity

int64_t GlobalTagDto::validity

Definition at line 58 of file CrestModel.h.

◆ workflow

std::string GlobalTagDto::workflow

Definition at line 64 of file CrestModel.h.


The documentation for this class was generated from the following files:
GlobalTagDto::insertionTime
std::optional< std::string > insertionTime
Definition: CrestModel.h:61
GlobalTagDto::validity
int64_t validity
Definition: CrestModel.h:58
json
nlohmann::json json
Definition: HistogramDef.cxx:9
GlobalTagDto::type
std::string type
Definition: CrestModel.h:65
GlobalTagDto::snapshotTimeMilli
int64_t snapshotTimeMilli
Definition: CrestModel.h:66
GlobalTagDto::release
std::string release
Definition: CrestModel.h:60
makeDTCalibBlob_pickPhase.globalTag
globalTag
Definition: makeDTCalibBlob_pickPhase.py:398
GlobalTagDto::name
std::string name
Definition: CrestModel.h:57
GlobalTagDto
Definition: CrestModel.h:55
GlobalTagDto::description
std::string description
Definition: CrestModel.h:59
GlobalTagDto::snapshotTime
std::string snapshotTime
Definition: CrestModel.h:62
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
GlobalTagDto::scenario
std::string scenario
Definition: CrestModel.h:63
GlobalTagDto::workflow
std::string workflow
Definition: CrestModel.h:64
GlobalTagDto::insertionTimeMilli
int64_t insertionTimeMilli
Definition: CrestModel.h:67