ATLAS Offline Software
Loading...
Searching...
No Matches
DatabaseConfig.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef dqiDatabaseConfig_h
6#define dqiDatabaseConfig_h
7
8
9#include <nlohmann/json.hpp>
10#include "CoolKernel/pointers.h" //for IFolderPtr, IDatabasePtr typedef
11#include <unordered_map>
12#include <string>
13namespace dqi {
14
16
17public:
18 DatabaseConfig(std::string connectionString, long runNumber);
19 nlohmann::json GetPayload(const std::string& tag);
20
21 bool IsConnected() const;
22 void Disconnect();
23
24private:
25 const std::string m_connectionString;
26 const long m_runNumber{};
27
30
31 std::unordered_map<std::string, nlohmann::json> m_jsonData;
32 cool::IFolderPtr m_folder;
33 cool::IDatabasePtr m_database;
34
35 long GetRunNumber() const;
36 nlohmann::json LoadPayload(const std::string& tag);
37
38 void Connect();
39};
40
41}
42#endif
cool::IFolderPtr m_folder
nlohmann::json GetPayload(const std::string &tag)
DatabaseConfig(std::string connectionString, long runNumber)
cool::IDatabasePtr m_database
std::unordered_map< std::string, nlohmann::json > m_jsonData
const std::string m_connectionString
nlohmann::json LoadPayload(const std::string &tag)