epic-drich-beam-test-analysis
ePIC dRICH beam test analysis framework
Loading...
Searching...
No Matches
config_reader.h File Reference

Run configuration and readout mapping utilities for the ePIC dRICH beam test. More...

#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <unordered_map>
#include <vector>
#include <string>
#include <optional>
#include <algorithm>
#include <iostream>
#include <cstdint>
#include <utility.h>
#include <toml++/toml.h>

Go to the source code of this file.

Classes

struct  readout_config_struct
 Associates a named readout role with a set of (device, chip) pairs. More...
 
class  readout_config_list
 Searchable container of readout_config_struct entries. More...
 
struct  radiator_info_struct
 Optical radiator properties for one radiator layer. More...
 
struct  run_info_struct
 Complete per-run metadata record. More...
 
class  run_info
 Static database of run metadata and named run lists. More...
 

Functions

std::vector< std::string > find_by_device_and_chip (const std::map< std::string, readout_config_struct > &readout_config_utility, uint16_t device, uint16_t chip)
 Names of all configs in readout_config_utility containing (device, chip).
 
std::vector< readout_config_structreadout_config_reader (std::string config_file="conf/readout_config.toml")
 Parse a TOML readout configuration file and return the role list.
 

Detailed Description

Run configuration and readout mapping utilities for the ePIC dRICH beam test.

Provides:

Function Documentation

◆ find_by_device_and_chip()

std::vector< std::string > find_by_device_and_chip ( const std::map< std::string, readout_config_struct > &  readout_config_utility,
uint16_t  device,
uint16_t  chip 
)

Names of all configs in readout_config_utility containing (device, chip).

Parameters
readout_config_utilityMap of role name → config struct.
deviceALCOR device index.
chipChip index.
Returns
Vector of matching role names.

◆ readout_config_reader()

std::vector< readout_config_struct > readout_config_reader ( std::string  config_file = "conf/readout_config.toml")

Parse a TOML readout configuration file and return the role list.

Reads the [readout] table, expands "*" chip wildcards, and enforces mutual exclusion among lightdata_core_tags. Conflicts are logged as errors and the offending (device, chip) pair is silently skipped.

Parameters
config_filePath to the TOML configuration file.
Returns
Vector of readout_config_struct, one per named role.