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

#include <CrestModel.h>

Collaboration diagram for TagInfoDto:

Public Member Functions

 TagInfoDto (std::string description)
 
 TagInfoDto (std::string description, PayloadSpecDto &payload_spec, ChannelSetDto &channel_list)
 
void setPayloadSpec (PayloadSpecDto &spec)
 
void setChannel (ChannelSetDto &ch)
 
PayloadSpecDto getPayloadSpec ()
 
ChannelSetDto getChannels ()
 
std::string getFolderDescription ()
 
size_t getChannelSize () const
 
size_t getColumnSize () const
 
json to_json () const
 

Static Public Member Functions

static TagInfoDto from_json (const json &j)
 

Private Attributes

std::string m_node_description
 
PayloadSpecDto m_payload_spec
 
ChannelSetDto m_channel_list
 

Detailed Description

Definition at line 203 of file CrestModel.h.

Constructor & Destructor Documentation

◆ TagInfoDto() [1/2]

TagInfoDto::TagInfoDto ( std::string  description)
inline

Definition at line 209 of file CrestModel.h.

210  }

◆ TagInfoDto() [2/2]

TagInfoDto::TagInfoDto ( std::string  description,
PayloadSpecDto payload_spec,
ChannelSetDto channel_list 
)
inline

Definition at line 211 of file CrestModel.h.

Member Function Documentation

◆ from_json()

TagInfoDto TagInfoDto::from_json ( const json j)
static

Definition at line 374 of file CrestModel.cxx.

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 }

◆ getChannels()

ChannelSetDto TagInfoDto::getChannels ( )
inline

Definition at line 224 of file CrestModel.h.

225  {
226  return m_channel_list;
227  }

◆ getChannelSize()

size_t TagInfoDto::getChannelSize ( ) const
inline

Definition at line 229 of file CrestModel.h.

229 {return m_channel_list.getSize();}

◆ getColumnSize()

size_t TagInfoDto::getColumnSize ( ) const
inline

Definition at line 230 of file CrestModel.h.

230 {return m_payload_spec.getSize();}

◆ getFolderDescription()

std::string TagInfoDto::getFolderDescription ( )
inline

Definition at line 228 of file CrestModel.h.

228 { return m_node_description;}

◆ getPayloadSpec()

PayloadSpecDto TagInfoDto::getPayloadSpec ( )
inline

Definition at line 220 of file CrestModel.h.

221  {
222  return m_payload_spec;
223  }

◆ setChannel()

void TagInfoDto::setChannel ( ChannelSetDto ch)
inline

Definition at line 217 of file CrestModel.h.

217  {
219  }

◆ setPayloadSpec()

void TagInfoDto::setPayloadSpec ( PayloadSpecDto spec)
inline

Definition at line 214 of file CrestModel.h.

214  {
216  }

◆ to_json()

json TagInfoDto::to_json ( ) const

Definition at line 366 of file CrestModel.cxx.

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 }

Member Data Documentation

◆ m_channel_list

ChannelSetDto TagInfoDto::m_channel_list
private

Definition at line 207 of file CrestModel.h.

◆ m_node_description

std::string TagInfoDto::m_node_description
private

Definition at line 205 of file CrestModel.h.

◆ m_payload_spec

PayloadSpecDto TagInfoDto::m_payload_spec
private

Definition at line 206 of file CrestModel.h.


The documentation for this class was generated from the following files:
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
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
CaloCondBlobAlgs_fillNoiseFromASCII.spec
spec
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:47
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1054
PayloadSpecDto
Definition: CrestModel.h:188
PayloadSpecDto::getSize
size_t getSize() const
Definition: CrestModel.h:197
ChannelSetDto::to_json
json to_json() const
Definition: CrestModel.cxx:310
PayloadSpecDto::to_json
json to_json() const
Definition: CrestModel.cxx:355
ChannelSetDto
Definition: CrestModel.h:172
PayloadSpecDto::from_json
static PayloadSpecDto from_json(const json &j)
Definition: CrestModel.cxx:325
TagInfoDto
Definition: CrestModel.h:203
ChannelSetDto::from_json
static ChannelSetDto from_json(const json &j)
Definition: CrestModel.cxx:297
doL1CaloHVCorrections.channel_list
channel_list
Definition: doL1CaloHVCorrections.py:320
lumiFormat.array
array
Definition: lumiFormat.py:91
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TagInfoDto::m_node_description
std::string m_node_description
Definition: CrestModel.h:205
ChannelSetDto::getSize
size_t getSize() const
Definition: CrestModel.h:183
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88