|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "boost/regex.hpp"
23 respPage.
size = j.value(
"size", 0);
25 respPage.
totalPages = j.value(
"totalPages", 0);
26 respPage.
number = j.value(
"number", 0);
31 json additionalPropertiesJson;
34 additionalPropertiesJson[
entry.first] =
entry.second;
38 additionalPropertiesJson};
45 json additionalPropertiesJson = j.value(
"additionalProperties",
json::object());
46 for (
auto it = additionalPropertiesJson.begin();
it != additionalPropertiesJson.end(); ++
it)
66 if (!
page.value().to_json().is_null())
76 if (!
filter.value().to_json().is_null())
87 if (j.contains(
"datatype"))
90 if (j.contains(
"page"))
92 if (!j[
"page"].is_null())
109 baseJson[
"resources"] = jsonResources;
118 for (
auto it = jsonResources.begin();
it != jsonResources.end(); ++
it)
127 snapshotTime(
""), scenario(
""), workflow(
""),
type(
"T"),
128 snapshotTimeMilli(0), insertionTimeMilli(0)
133 snapshotTime(
""), scenario(
""), workflow(l_workflow),
type(
"T"),
134 snapshotTimeMilli(0), insertionTimeMilli(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",
"");
168 globalTag.snapshotTimeMilli = j.value(
"snapshotTimeMilli", 0);
169 globalTag.insertionTimeMilli = j.value(
"insertionTimeMilli", 0);
191 auto it = j.find(
"name");
194 tag.name = j[
"name"];
201 tag.timeType = j.value(
"timeType",
"");
202 tag.objectType = j.value(
"payloadSpec",
"");
203 tag.synchronization = j.value(
"synchronization",
"none");
204 tag.description = j.value(
"description",
"");
205 tag.lastValidatedTime = j.value<
uint64_t>(
"lastValidatedTime", 0);
206 tag.endOfValidity = j.value<
uint64_t>(
"endOfValidity", 0);
207 if (j.contains(std::string{
"insertionTime"}))
208 tag.insertionTime = j.value(
"insertionTime",
"");
209 tag.modificationTime = j.value(
"modificationTime",
"");
220 baseJson[
"resources"] = jsonResources;
228 for (
auto it = jsonResources.begin();
it != jsonResources.end(); ++
it)
246 tagmap.
tagName = j.value(
"tagName",
"");
248 tagmap.
record = j.value(
"record",
"none");
249 tagmap.
label = j.value(
"label",
"none");
261 baseJson[
"resources"] = jsonResources;
269 for (
auto it = jsonResources.begin();
it != jsonResources.end(); ++
it)
283 for (
auto it = j.begin();
it != j.end(); ++
it)
295 m_channels.push_back(std::pair<std::string, std::string>(
id,
name));
300 for (
unsigned int i = 0;
i < j.size();
i++)
304 chDto.
add(
el.key(),
el.value());
317 chJson.push_back(
obj);
323 m_row.push_back(std::pair<std::string, std::string>(
name,
type));
329 if(!j.is_object()&&!j.is_array()){
330 std::string
regex=R
"delim(([^\s,:]*):\s?([^\s,]*),?)delim";
333 std::string input=j.dump();
337 std::string
n(
what[1]);
338 std::string
t(
what[2]);
345 for (
unsigned int i = 0;
i < j.size();
i++)
349 chDto.
add(
el.key(),
el.value());
362 chJson.push_back(
obj);
376 std::string node_description = j.value(
"node_description",
"");
378 if (jsonSpec.is_string())
382 if (jsonCh.is_string())
404 tag.tagName = j.value(
"tagName",
"");
405 json infoJs = j[
"tagInfo"];
406 if (infoJs.is_string())
410 ss >> std::quoted(st);
415 tag.description = j.value(
"description",
"");
416 if (j.contains(std::string{
"insertionTime"}))
417 tag.insertionTime = j.value(
"insertionTime",
"");
429 baseJson[
"resources"] = jsonResources;
437 for (
auto it = jsonResources.begin();
it != jsonResources.end(); ++
it)
459 iov.tagName = j.value(
"tagName",
"");
462 if (j.contains(
"insertionTime"))
464 if (!j[
"insertionTime"].is_null())
466 iov.insertionTime = j[
"insertionTime"];
470 iov.insertionTime =
"";
475 iov.insertionTime =
"";
478 if (j.contains(
"payloadHash"))
480 if (!j[
"payloadHash"].is_null())
482 iov.payloadHash = j[
"payloadHash"];
486 iov.payloadHash =
"";
491 iov.payloadHash =
"";
505 baseJson[
"resources"] = jsonResources;
510 std::vector<uint64_t>
v;
523 for (
auto it = jsonResources.begin();
it != jsonResources.end(); ++
it)
537 for (
auto it = j.begin();
it != j.end(); ++
it)
551 dto[
"since"] =
since;
569 storeDto.
hash = j.value(
"hash",
"");
570 storeDto.
since = j.value(
"since", 0.0);
571 storeDto.
data = j.value(
"data",
"");
584 baseJson[
"resources"] = jsonResources;
600 for (
auto it = jsonResources.begin();
it != jsonResources.end(); ++
it)
612 json payloadDto = {};
613 payloadDto[
"hash"] =
hash;
614 payloadDto[
"version"] =
version;
619 payloadDto[
"size"] =
size;
630 payloadDto.
hash = j.value(
"hash",
"");
631 payloadDto.
version = j.value(
"version",
"");
632 payloadDto.
objectType = j.value(
"objectType",
"");
633 payloadDto.
objectName = j.value(
"objectName",
"");
635 payloadDto.
checkSum = j.value(
"checkSum",
"");
636 payloadDto.
size = j.value(
"size", 0);
637 if (j.contains(std::string{
"insertionTime"}))
652 baseJson[
"resources"] = jsonResources;
663 for (
auto it = jsonResources.begin();
it != jsonResources.end(); ++
it)
668 return payloadSetDto;
static GlobalTagMapSetDto from_json(const json &j)
size_t getChannelSize() const
static IovSetDto from_fs_json(const json &j)
static GlobalTagMapSetDto from_fs_json(const json &j)
std::optional< std::string > m_app_name
std::optional< std::string > insertionTime
std::vector< IovDto > resources
static RespPage from_json(const json &j)
ChannelSetDto m_channel_list
PayloadSpecDto m_payload_spec
void load_from_json(const json &j)
std::vector< std::pair< std::string, std::string > > m_channels
std::optional< std::string > insertionTime
virtual int64_t getSize() const =0
static GlobalTagMapDto from_json(const json &j)
std::vector< PayloadDto > resources
int64_t snapshotTimeMilli
std::optional< std::string > insertionTime
std::vector< std::pair< std::string, std::string > > m_row
std::string globalTagName
static TagDto from_json(const json &j)
std::vector< GlobalTagMapDto > resources
void add(std::string id, std::string name)
std::optional< GenericMap > filter
std::optional< std::string > insertionTime
static GlobalTagDto from_json(const json &j)
virtual const char * getFormat() const =0
static PayloadSpecDto from_json(const json &j)
static PayloadDto from_json(const json &j)
The TagDto class It contains all fields of the TagDto class from the CREST API.
std::optional< std::string > m_app_version
static PayloadSetDto from_json(const json &j)
static ChannelSetDto from_json(const json &j)
void push_back(StoreDto dto)
std::optional< std::string > modificationTime
void add(std::string id, std::string name)
static StoreSetDto from_json(const json &j)
std::optional< std::string > datatype
uint64_t lastValidatedTime
std::string compressionType
std::string to_string(const DetectorType &type)
json getStreamerInfo() const
std::string m_node_description
std::map< std::string, std::string > additionalProperties
static TagInfoDto from_json(const json &j)
std::vector< uint64_t > getListSince()
std::vector< StoreDto > resources
static IovSetDto from_json(const json &j)
static StoreDto from_json(const json &j)
std::optional< RespPage > page
int64_t insertionTimeMilli
size_t getColumnSize() const
static IovDto from_json(const json &j)
std::string synchronization
bool match(std::string s1, std::string s2)
match the individual directories of two strings
static GenericMap from_json(const json &j)
std::string description
glabal timer - how long have I taken so far?