Iguana 0.0.0
Implementation Guardian of Analysis Algorithms
Loading...
Searching...
No Matches
RCDBReader.h
1#pragma once
2
3#include "Object.h"
4#include <mutex>
5
6#ifdef USE_RCDB
7#include <RCDB/Connection.h>
8#endif
9
10namespace iguana {
11
21 class RCDBReader : public Object
22 {
23
24 public:
25
28 RCDBReader(std::string_view name = "rcdb", Logger::Level lev = Logger::DEFAULT_LEVEL);
29
32 double GetBeamEnergy(int const runnum);
33
34 protected:
35
37 std::string const m_default_url = "mysql://rcdb@clasdb.jlab.org/rcdb";
38
39 private:
40
41 std::string m_url;
42 std::once_flag m_error_once;
43
44#ifdef USE_RCDB
45 std::unique_ptr<rcdb::Connection> m_rcdb_connection;
46#endif
47
48 };
49}
static Level const DEFAULT_LEVEL
The default log level.
Definition Logger.h:56
A named object with a Logger instance.
Definition Object.h:12
RCDB reader.
Definition RCDBReader.h:22
double GetBeamEnergy(int const runnum)
std::string const m_default_url
default RCDB URL, used as a last resort
Definition RCDBReader.h:37
RCDBReader(std::string_view name="rcdb", Logger::Level lev=Logger::DEFAULT_LEVEL)
General, top-level namespace for algorithms and infrastructure. For algorithms and bindings,...
Definition Algorithm.h:14