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

Factory for creating LHA/FLHA elements from a prototype and a line. More...

#include <lha_elements.h>

Static Public Member Functions

static std::shared_ptr< AbstractElementcreateElement (const Prototype &prototype, const std::vector< std::string > &line)
 Creates an element of the appropriate type for a given line.
 

Detailed Description

Factory for creating LHA/FLHA elements from a prototype and a line.

The factory is responsible for choosing the appropriate template instantiation of LhaElement<T> based on the block prototype. For example:

  • "FCINFO", "FMODSEL" and "SPINFO" are treated as string-valued blocks,
  • most other blocks are treated as double-valued.

Definition at line 250 of file lha_elements.h.

Member Function Documentation

◆ createElement()

std::shared_ptr< AbstractElement > LhaElementFactory::createElement ( const Prototype prototype,
const std::vector< std::string > &  line 
)
static

Creates an element of the appropriate type for a given line.

The decision on the value type (e.g. double vs std::string) is based on the prototype's blockName. The created element is always returned via a shared pointer to AbstractElement.

Parameters
prototypeDescription of the LHA/FLHA block.
lineParsed line tokens for a single entry.
Returns
Shared pointer to the created AbstractElement.
Exceptions
std::runtime_errorIf the line is inconsistent with the prototype.

Definition at line 123 of file lha_elements.cpp.


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