ATLAS Offline Software
CrestApiExt.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2019-2023 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 
15 #include <CrestApi/CrestApi.h>
16 #include <boost/parameter/name.hpp>
17 #include <boost/parameter/preprocessor.hpp>
18 
19 
20 BOOST_PARAMETER_NAME(page)
21 BOOST_PARAMETER_NAME(size)
22 BOOST_PARAMETER_NAME(tagname)
23 BOOST_PARAMETER_NAME(sort)
24 BOOST_PARAMETER_NAME(dateformat)
25 BOOST_PARAMETER_NAME(name)
26 
27 
28 
29 namespace Crest {
30  class CrestClientExt: public CrestClient {
31  public:
32  CrestClientExt(bool rewriteIfExists, const std::string& root_folder = "/tmp/crest_dump") : CrestClient(
33  rewriteIfExists, root_folder) {}
34  CrestClientExt(const std::string& _host, const std::string& _port, bool _check_version = s_CREST_CLIENT_CHECK) : CrestClient(_host, _port, _check_version) {}
35  CrestClientExt(const std::string& url, bool check_version = s_CREST_CLIENT_CHECK) : CrestClient(url, check_version) {}
36 
37 // ~CrestClientExt();
38 
58  listTagsParams,
59  tag,
60  (required
61  )
62  (optional
63  (name, (std::string), "")
64  (size, (int), 1000)
65  (page, (int), 0)
66  (sort, (std::string), "name:ASC")
67  )
68  ) {
69  return listTags(name, size, page, sort);
70  }
71 
90  findAllIovsParams,
91  tag,
92  (required
93  (tagname, (std::string))
94  )
95  (optional
96  (size, (int), 1000)
97  (page, (int), 0)
98  (sort, (std::string), "id.since:ASC")
99  (dateformat, (std::string), "ms")
100  )
101  ) {
102  return findAllIovs(tagname, size, page, sort, dateformat);
103  }
104 
122  (nlohmann::json),
123  listGlobalTagsParams,
124  tag,
125  (required
126  )
127  (optional
128  (name, (std::string), "")
129  (size, (int), 1000)
130  (page, (int), 0)
131  (sort, (std::string), "id.since:ASC")
132  )
133  ) {
134  return listGlobalTags(name, size, page, sort);
135  }
136  }; // CrestClientExt (end)
137 } // namespace Crest
Crest::CrestClient::findAllIovs
nlohmann::json findAllIovs(const std::string &tagname)
This method finds all iovs for a given tag name.
Definition: CrestApi.cxx:390
json
nlohmann::json json
Definition: HistogramDef.cxx:9
Crest::CrestClientExt::CrestClientExt
CrestClientExt(const std::string &_host, const std::string &_port, bool _check_version=s_CREST_CLIENT_CHECK)
Definition: CrestApiExt.h:34
Crest::CrestClient::listGlobalTags
nlohmann::json listGlobalTags()
This method finds a global tag lists.
Definition: CrestApi.cxx:773
Crest
Definition: CrestApi.h:29
physics_parameters.url
string url
Definition: physics_parameters.py:27
CrestApi.h
Header file for CREST C++ Client Library.
Crest::CrestClientExt::CrestClientExt
CrestClientExt(const std::string &url, bool check_version=s_CREST_CLIENT_CHECK)
Definition: CrestApiExt.h:35
Crest::CrestClient::s_CREST_CLIENT_CHECK
static const bool s_CREST_CLIENT_CHECK
Definition: CrestApi.h:259
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Crest::CrestClient::listTags
nlohmann::json listTags(void)
This method returns the tag list.
Definition: CrestApi.cxx:103
Crest::CrestClientExt::BOOST_PARAMETER_MEMBER_FUNCTION
BOOST_PARAMETER_MEMBER_FUNCTION((nlohmann::json), findAllIovsParams, tag,(required(tagname,(std::string)))(optional(size,(int), 1000)(page,(int), 0)(sort,(std::string), "id.since:ASC")(dateformat,(std::string), "ms")))
This method finds all iovs for a given tag name.
Definition: CrestApiExt.h:88
Crest::CrestClientExt::BOOST_PARAMETER_MEMBER_FUNCTION
BOOST_PARAMETER_MEMBER_FUNCTION((nlohmann::json), listGlobalTagsParams, tag,(required)(optional(name,(std::string), "")(size,(int), 1000)(page,(int), 0)(sort,(std::string), "id.since:ASC")))
This method returns the global tag list.
Definition: CrestApiExt.h:121
Crest::CrestClientExt::CrestClientExt
CrestClientExt(bool rewriteIfExists, const std::string &root_folder="/tmp/crest_dump")
Definition: CrestApiExt.h:32
Crest::CrestClientExt
Definition: CrestApiExt.h:30
perfmonmt-printer.required
required
Definition: perfmonmt-printer.py:184
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MyPlots.page
page
Definition: MyPlots.py:234
Crest::CrestClient
Definition: CrestApi.h:62
tagname
Definition: tagname.h:29
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
Crest::CrestClientExt::BOOST_PARAMETER_MEMBER_FUNCTION
BOOST_PARAMETER_MEMBER_FUNCTION((nlohmann::json), listTagsParams, tag,(required)(optional(name,(std::string), "")(size,(int), 1000)(page,(int), 0)(sort,(std::string), "name:ASC")))
This method returns the tag list.
Definition: CrestApiExt.h:56