Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
LhaDBNodeProvider Class Reference

DBNode provider for LHA / SLHA / FLHA sources. More...

#include <LhaDBNodeProvider.h>

Inheritance diagram for LhaDBNodeProvider:
Collaboration diagram for LhaDBNodeProvider:

Public Member Functions

 LhaDBNodeProvider (fs::path src_path_)
 Constructs a provider bound to a specific source path.
 
std::shared_ptr< DBNodeprovide_db_as_node () override
 Loads the underlying LHA file and returns it as a DBNode tree.
 
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 a new LHA block prototype to the global set.
 
- Public Member Functions inherited from IDBNodeProvider
 IDBNodeProvider (fs::path src_path_)
 Constructs a provider bound to a given source path.
 
virtual ~IDBNodeProvider ()=default
 

Additional Inherited Members

- Protected Attributes inherited from IDBNodeProvider
fs::path src_path
 

Detailed Description

DBNode provider for LHA / SLHA / FLHA sources.

This provider delegates the heavy lifting to DBManager:

Definition at line 28 of file LhaDBNodeProvider.h.

Constructor & Destructor Documentation

◆ LhaDBNodeProvider()

LhaDBNodeProvider::LhaDBNodeProvider ( fs::path  src_path_)
inline

Constructs a provider bound to a specific source path.

Parameters
src_pathPath to an LHA / SLHA / FLHA file.

Definition at line 35 of file LhaDBNodeProvider.h.

Member Function Documentation

◆ add_lha_prototype()

void LhaDBNodeProvider::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 a new LHA block prototype to the global set.

This is a convenience wrapper around DBManager::add_lha_prototype(), allowing clients to register additional block layouts before parsing.

The arguments follow the Prototype layout:

  • blockName : block identifier (case-insensitive),
  • itemCount : number of columns in each line,
  • valueIdx : index of the value column,
  • scaleIdx : index of the scale column (-1 if none),
  • rgIdx : index of the renormalization scheme column (-1 if none),
  • binIdx : index of the bin lower edge (-1 if unbinned),
  • globalScale : true if the block uses a global Q= header.

Input indices are checked for basic consistency and will trigger a logged error if the configuration is invalid.

Definition at line 19 of file LhaDBNodeProvider.cpp.

◆ provide_db_as_node()

std::shared_ptr< DBNode > LhaDBNodeProvider::provide_db_as_node ( )
overridevirtual

Loads the underlying LHA file and returns it as a DBNode tree.

Internally this is equivalent to:

Front-end for reading and writing structured data as DBNodetrees.
Definition DBManager.h:46
std::shared_ptr< DBNode > read_from_file(fs::path file_path)
Reads a structured file and returns its DBNoderepresentation.
Definition DBManager.cpp:62
Returns
Shared pointer to the root DBNode representing the LHA content.
Exceptions
std::runtime_errorif file or parsing errors occur.

Implements IDBNodeProvider.

Definition at line 15 of file LhaDBNodeProvider.cpp.


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