-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,13 @@ | |
namespace iguana { | ||
|
||
/// @brief RCDB reader | ||
/// | ||
/// This class interfaces to the RCDB. The database connection path is chosen from one of the following, in order: | ||
/// - The global variable `iguana::GlobalRcdbUrl`; by default this is not set to any value (its type is `iguana::GlobalParam`) | ||
/// - The environment variable `RCDB_CONNECTION` (which is likely set if you are on `ifarm`) | ||
/// - A default URL, which will be printed in a warning; see `iguana::RCDBReader::m_default_url` | ||
/// | ||
/// RCDB will automatically use `mariadb` / `mysql` or `sqlite`, depending on the RCDB path, and whether you have satisfied the dependencies. | ||
class RCDBReader : public Object | ||
{ | ||
|
||
|
@@ -23,11 +30,13 @@ namespace iguana { | |
/// @returns the beam energy in GeV | ||
double GetBeamEnergy(int const runnum); | ||
|
||
private: | ||
protected: | ||
|
||
/// @brief default RCDB URL, used as a last resort | ||
std::string const m_default_url = "mysql://[email protected]/rcdb"; | ||
|
||
private: | ||
|
||
std::string m_url; | ||
std::once_flag m_error_once; | ||
|
||
|