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

Provides utilities for identifying the type of parameter blocks/entries. More...

#include <ParameterRouter.h>

Static Public Member Functions

static ParameterType GetType (BlockName block, LhaID id)
 Determines the ParameterType of a given (block, LhaID) pair.
 
static std::vector< ParameterTypeGetType (BlockName block)
 Retrieves all ParameterTypes associated with a block.
 
static std::unordered_set< BlockNameGetOwnedBlocks (ParameterType ptype)
 Retrieves all blocks owned by a given ParameterType.
 

Detailed Description

Provides utilities for identifying the type of parameter blocks/entries.

The router answers questions of the form:

  • "Given this LHA block and ID, is this parameter SM or BSM or ...?"
  • "Which ParameterTypes own this block?"
  • "Which blocks are associated with a given ParameterType?"

It relies on:

Definition at line 170 of file ParameterRouter.h.

Member Function Documentation

◆ GetOwnedBlocks()

std::unordered_set< BlockName > ParamRouter::GetOwnedBlocks ( ParameterType  ptype)
static

Retrieves all blocks owned by a given ParameterType.

Returns the static routing table, enriched with runtime BSM blocks.

Parameters
ptypeThe ParameterType of interest.
Returns
A set of block names belonging to the specified type.
Exceptions
std::out_of_rangeif ptype is not present in BLOCKS.

Definition at line 91 of file ParameterRouter.cpp.

◆ GetType() [1/2]

std::vector< ParameterType > ParamRouter::GetType ( BlockName  block)
static

Retrieves all ParameterTypes associated with a block.

This can be useful when a block is shared by multiple categories (e.g. "MASS" for SM and BSM). Unlike the (block,id) version, this does not attempt to resolve conflicts; it simply reports all types that list block in ParameterBlockRepartition::BLOCKS.

Parameters
blockName of the block.
Returns
A list of ParameterTypes corresponding to the block.

Definition at line 80 of file ParameterRouter.cpp.

◆ GetType() [2/2]

ParameterType ParamRouter::GetType ( BlockName  block,
LhaID  id 
)
static

Determines the ParameterType of a given (block, LhaID) pair.

Resolution logic:

  1. If the block appears in ParametersAccessRights::SM_RIGHTS, then:
  2. Otherwise, the function scans ParameterBlockRepartition::BLOCKS and returns the first ParameterType whose block set contains block.
  3. If no match is found, it logs an error and does not return.
Parameters
blockName of the block.
idLHA ID of the parameter (used for conflict resolution).
Returns
The corresponding ParameterType.
Note
On error, this function calls LOG_ERROR, which typically terminates the program or throws, depending on your Logger implementation.

Definition at line 59 of file ParameterRouter.cpp.


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