epic-drich-beam-test-analysis
ePIC dRICH beam test analysis framework
Loading...
Searching...
No Matches
run_info Class Reference

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_structget_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.
 

Detailed Description

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.

Member Function Documentation

◆ get_run_info()

const std::optional< run_info_struct > run_info::get_run_info ( const std::string &  run_id)
static

Retrieve the metadata record for run_id.

Parameters
run_idRun identifier string (must match a key in the TOML file).
Returns
The run_info_struct, or std::nullopt if not found.

◆ get_run_list()

const std::optional< std::vector< std::string > > run_info::get_run_list ( const std::string &  runlist_name)
static

Retrieve the ordered run-ID list for runlist_name.

Parameters
runlist_nameList identifier (must match a key in the TOML file).
Returns
The vector of run IDs, or std::nullopt if not found.

◆ read_database()

void run_info::read_database ( std::string  filename)
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.

Parameters
filenamePath to the TOML database file.

◆ read_runslists()

void run_info::read_runslists ( std::string  runlist_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.

Parameters
runlist_filePath to the TOML run-list file.

The documentation for this class was generated from the following files: