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

#include <CrestModel.h>

Collaboration diagram for GenericMap:

Public Member Functions

json to_json () const
 

Static Public Member Functions

static GenericMap from_json (const json &j)
 

Public Attributes

std::map< std::string, std::string > additionalProperties
 

Detailed Description

Definition at line 30 of file CrestModel.h.

Member Function Documentation

◆ from_json()

GenericMap GenericMap::from_json ( const json j)
static

Definition at line 41 of file CrestModel.cxx.

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 }

◆ to_json()

json GenericMap::to_json ( ) const

Definition at line 29 of file CrestModel.cxx.

30 {
31  json additionalPropertiesJson;
32  for (const auto &entry : additionalProperties)
33  {
34  additionalPropertiesJson[entry.first] = entry.second;
35  }
36 
37  return {
38  additionalPropertiesJson};
39 }

Member Data Documentation

◆ additionalProperties

std::map<std::string, std::string> GenericMap::additionalProperties

Definition at line 33 of file CrestModel.h.


The documentation for this class was generated from the following files:
json
nlohmann::json json
Definition: HistogramDef.cxx:9
skel.it
it
Definition: skel.GENtoEVGEN.py:396
GenericMap
Definition: CrestModel.h:31
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
GenericMap::additionalProperties
std::map< std::string, std::string > additionalProperties
Definition: CrestModel.h:33
pickleTool.object
object
Definition: pickleTool.py:30