|
epic-drich-beam-test-analysis
ePIC dRICH beam test analysis framework
|
Static database of run metadata and named run lists. More...
#include <config_reader.h>
Static Public Member Functions | |
Database I/O | |
| static void | read_database (std::string filename) |
| Parse a TOML run-database file and populate the internal map. | |
| static void | clear_database () |
| Clear all entries from the run-info database. | |
| static const std::optional< run_info_struct > | get_run_info (const std::string &run_id) |
Retrieve the metadata record for run_id. | |
Run list management | |
| static void | read_runslists (std::string runlist_file) |
| Parse a TOML run-list file and populate the internal list map. | |
| static const std::optional< std::vector< std::string > > | get_run_list (const std::string &runlist_name) |
Retrieve the ordered run-ID list for runlist_name. | |
Static database of run metadata and named run lists.
All methods are static; no instance is needed. Call read_database() once at startup, then query with get_run_info() or get_run_list().
Missing fields in a run entry are inherited from the previous entry in document order, allowing compact TOML files that only list deltas.
|
static |
Retrieve the metadata record for run_id.
| run_id | Run identifier string (must match a key in the TOML file). |
std::nullopt if not found.
|
static |
Retrieve the ordered run-ID list for runlist_name.
| runlist_name | List identifier (must match a key in the TOML file). |
std::nullopt if not found.
|
static |
Parse a TOML run-database file and populate the internal map.
Reads the [runs] table. Each sub-table key becomes the run ID. Fields absent from a run entry are copied from the preceding entry.
| filename | Path to the TOML database file. |
|
static |
Parse a TOML run-list file and populate the internal list map.
Reads the [runlists] table. Each sub-table key becomes the list name and its runs array provides the ordered run IDs.
| runlist_file | Path to the TOML run-list file. |