Iguana 1.0.0
Implementation Guardian of Analysis Algorithms
Loading...
Searching...
No Matches
iguana::RCDBReader Class Reference

#include <RCDBReader.h>

Detailed Description

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 above RCDB database path, and whether you have satisfied the dependencies.

Definition at line 21 of file RCDBReader.h.

Public Member Functions

double GetBeamEnergy (int const runnum)
 RCDBReader (std::string_view name="rcdb", Logger::Level lev=Logger::DEFAULT_LEVEL)
Public Member Functions inherited from iguana::Object
std::unique_ptr< Logger > & GetLog ()
std::string GetName () const
std::unique_ptr< Logger > & Log ()
 Object (std::string_view name="", Logger::Level lev=Logger::DEFAULT_LEVEL)
void SetLogLevel (Logger::Level const lev)
void SetLogLevel (std::string_view lev)
void SetName (std::string_view name)

Protected Attributes

std::string const m_default_url = "mysql://rcdb@clasdb.jlab.org/rcdb"
 default RCDB URL, used as a last resort
Protected Attributes inherited from iguana::Object
std::unique_ptr< Loggerm_log
 Logger instance for this object
std::string m_name
 The name of this object.
Inheritance diagram for iguana::RCDBReader:
Inheritance graph

Constructor & Destructor Documentation

◆ RCDBReader()

iguana::RCDBReader::RCDBReader ( std::string_view name = "rcdb",
Logger::Level lev = Logger::DEFAULT_LEVEL )
Parameters
namethe name of this reader
levthe log level

Member Function Documentation

◆ GetBeamEnergy()

double iguana::RCDBReader::GetBeamEnergy ( int const runnum)
Parameters
runnumrun number
Returns
the beam energy in GeV

Member Data Documentation

◆ m_default_url

std::string const iguana::RCDBReader::m_default_url = "mysql://rcdb@clasdb.jlab.org/rcdb"
protected

default RCDB URL, used as a last resort

Definition at line 37 of file RCDBReader.h.


The documentation for this class was generated from the following file:
  • /__w/iguana/iguana/iguana_src/src/iguana/services/RCDBReader.h