|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Front-end for reading and writing structured data as DBNodetrees. More...
#include <DBManager.h>
Public Member Functions | |
| std::shared_ptr< DBNode > | read_from_file (fs::path file_path) |
| Reads a structured file and returns its DBNoderepresentation. | |
| void | write_to_file (fs::path file_path, std::shared_ptr< DBNode > root) |
| Writes a DBNodetree to disk using the appropriate format. | |
| void | add_lha_prototype (BlockName blockName, size_t itemCount=2, size_t valueIdx=1, int scaleIdx=-1, int rgIdx=-1, int binIdx=-1, bool globalScale=false) |
| Adds or overrides an LHA block prototype used by LhaParser. | |
Friends | |
| class | DBNodeProviderFactory |
Front-end for reading and writing structured data as DBNodetrees.
A DBManager instance encapsulates:
Typical usage:
Definition at line 46 of file DBManager.h.
| void DBManager::add_lha_prototype | ( | BlockName | blockName, |
| size_t | itemCount = 2, |
||
| size_t | valueIdx = 1, |
||
| int | scaleIdx = -1, |
||
| int | rgIdx = -1, |
||
| int | binIdx = -1, |
||
| bool | globalScale = false |
||
| ) |
Adds or overrides an LHA block prototype used by LhaParser.
This function lets the user extend or customize the interpretation of LHA/SLHA/FLHA blocks at runtime. The block name is normalized to upper-case before insertion.
If a prototype with the same block name already exists:
new_prototype, a warning is logged and the call is ignored,| blockName | Name of the block (case-insensitive, will be uppercased). |
| itemCount | Total number of columns in the block (default: 2). |
| valueIdx | Index of the value column (default: 1). |
| scaleIdx | Index of the scale column, or -1 if none (default: -1). |
| rgIdx | Index of the renormalization scheme column, or -1 (default: -1). |
| binIdx | Index of the bin lower-bound column, or -1 if unbinned (default: -1). |
| globalScale | True if the block uses a global Q= scale in the header. |
Definition at line 100 of file DBManager.cpp.
| std::shared_ptr< DBNode > DBManager::read_from_file | ( | fs::path | file_path | ) |
Reads a structured file and returns its DBNoderepresentation.
The pipeline is:
| file_path | Path to the file to be read. |
| std::runtime_error | for file errors, parser errors, or tree validation errors. |
Definition at line 62 of file DBManager.cpp.
| void DBManager::write_to_file | ( | fs::path | file_path, |
| std::shared_ptr< DBNode > | root | ||
| ) |
Writes a DBNodetree to disk using the appropriate format.
The pipeline is:
Note: requiring "SMINPUTS" is domain-specific and encodes the expectation that any physical input set at least carries this block.
| file_path | Path where the file should be written. |
| root | Root DBNodeto serialize. |
| std::runtime_error | if validation fails or writing fails. |
Definition at line 92 of file DBManager.cpp.
|
friend |
Definition at line 188 of file DBManager.h.