ATLAS Offline Software
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 
26  inline static const std::string s_openJson = "{";
27 
29  inline static const std::string s_closeJson = "}";
30 
32  inline static const std::string s_delimiterJson = ", ";
33 }
34 #endif
35 
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
IOVDbNamespace::jsonAttributeList
std::string jsonAttributeList(const coral::AttributeList &atrlist)
Produce a representation of a coral::AttributeList as a json string.
Definition: IOVDbJsonStringFunctions.cxx:40
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
Definition: Base64Codec.cxx:16