From fae9797925f994f89ca3afe3983e91f1a25eb8d0 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 7 Oct 2024 11:47:40 -0400 Subject: [PATCH] doc: better docstrings --- src/iguana/services/GlobalParam.h | 8 ++------ src/iguana/services/RCDBReader.h | 11 ++++++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/iguana/services/GlobalParam.h b/src/iguana/services/GlobalParam.h index f7073654..3d541535 100644 --- a/src/iguana/services/GlobalParam.h +++ b/src/iguana/services/GlobalParam.h @@ -64,12 +64,8 @@ namespace iguana { /// option will be _chosen_ by `ConcurrentParamFactory::Create` instead extern GlobalParam GlobalConcurrencyModel; - /// @brief RCDB URL - /// @par Notes - /// The RCDB will check for a URL in the following order: - /// - This parameter, `iguana::GlobalRcdbUrl`; by default it is not set to any value - /// - 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` + /// @brief Path to the RCDB + /// @see `iguana::RCDBReader` for details extern GlobalParam GlobalRcdbUrl; } diff --git a/src/iguana/services/RCDBReader.h b/src/iguana/services/RCDBReader.h index 21d0687c..6c195103 100644 --- a/src/iguana/services/RCDBReader.h +++ b/src/iguana/services/RCDBReader.h @@ -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://rcdb@clasdb.jlab.org/rcdb"; + private: + std::string m_url; std::once_flag m_error_once;