ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
IOVDbSvc
src
IOVDbJsonStringFunctions.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
// @file IOVDbJsonStringFunctions.h
5
// @brief Helper functions for create string in JSON format
6
// @author Evgeny Alexandrov
7
// @date 14 Febrary 2024
8
#ifndef IOVDbSvc_IOVDbJsonStringFunctions_h
9
#define IOVDbSvc_IOVDbJsonStringFunctions_h
10
11
#include <string>
12
#include <iostream>
13
#include "CoralBase/AttributeList.h"
14
#include "CoralBase/AttributeListSpecification.h"
15
#include "CoralBase/Attribute.h"
16
17
namespace
IOVDbNamespace
{
18
//class methods
20
std::string
jsonAttribute
(
const
coral::Attribute&);
21
23
std::string
jsonAttributeList
(
const
coral::AttributeList&);
24
29
std::string
stripIovBounds
(
const
std::string&
json
);
30
32
inline
static
const
std::string
s_openJson
=
"{"
;
33
35
inline
static
const
std::string
s_closeJson
=
"}"
;
36
38
inline
static
const
std::string
s_delimiterJson
=
", "
;
39
}
40
#endif
41
json
nlohmann::json json
Definition
HistogramDef.cxx:9
IOVDbNamespace
Definition
Base64Codec.cxx:16
IOVDbNamespace::jsonAttributeList
std::string jsonAttributeList(const coral::AttributeList &atrlist)
Produce a representation of a coral::AttributeList as a json string.
Definition
IOVDbJsonStringFunctions.cxx:35
IOVDbNamespace::s_delimiterJson
static const std::string s_delimiterJson
json standard delimiter ', '
Definition
IOVDbJsonStringFunctions.h:38
IOVDbNamespace::stripIovBounds
std::string stripIovBounds(const std::string &json)
Remove the "since"/"until" members from a dumpChannelsAsJson channel dump, leaving only payload conte...
Definition
IOVDbJsonStringFunctions.cxx:49
IOVDbNamespace::jsonAttribute
std::string jsonAttribute(const coral::Attribute &attr)
Produce a representation of a coral::Attribute as a json string.
Definition
IOVDbJsonStringFunctions.cxx:15
IOVDbNamespace::s_closeJson
static const std::string s_closeJson
json close tag, '}'
Definition
IOVDbJsonStringFunctions.h:35
IOVDbNamespace::s_openJson
static const std::string s_openJson
json open tag, '{'
Definition
IOVDbJsonStringFunctions.h:32
Generated on
for ATLAS Offline Software by
1.17.0