Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
IBlockProvider< T, U > Class Template Referenceabstract

Generic interface for providing information about parameter blocks. More...

#include <IBlockProvider.h>

Public Member Functions

virtual bool exists (U blockname, T)=0
 Checks whether a given block exists for a given category/model.
 
virtual void log_all_blocks (T type)=0
 Logs all blocks for a given category/model.
 
virtual void log_block (T type, U blockname)=0
 Logs the content of a specific block for a given category/model.
 
virtual std::map< LhaID, scalar_tget_block (ParameterType type, const std::string &blockname)=0
 Retrieve the content of a specific block for a given category/model.
 
virtual std::unordered_set< std::string > get_all_blocks (ParameterType type)=0
 return all blocks for a given ParameterType.
 
virtual ~IBlockProvider ()=default
 Virtual destructor.
 

Detailed Description

template<typename T, typename U>
class IBlockProvider< T, U >

Generic interface for providing information about parameter blocks.

Template Parameters
TType used to represent a category or model (e.g. ParameterType).
UType used to represent a block name (e.g. std::string or std::string_view).

Implementations are expected to:

  • check whether a block exists for a given category,
  • log all available blocks for a category,
  • log a specific block of a category.

Definition at line 31 of file IBlockProvider.h.

Constructor & Destructor Documentation

◆ ~IBlockProvider()

template<typename T , typename U >
virtual IBlockProvider< T, U >::~IBlockProvider ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ exists()

template<typename T , typename U >
virtual bool IBlockProvider< T, U >::exists ( blockname,
T   
)
pure virtual

Checks whether a given block exists for a given category/model.

Parameters
blocknameName of the block to check.
typeCategory / model identifier.
Returns
true if the block exists for this category, false otherwise.

Implemented in BlockProvider.

◆ get_all_blocks()

template<typename T , typename U >
virtual std::unordered_set< std::string > IBlockProvider< T, U >::get_all_blocks ( ParameterType  type)
pure virtual

return all blocks for a given ParameterType.

Internally calls:

Parameters::GetInstance(type)->get_blocks_list();
static std::shared_ptr< Parameters > GetInstance(ParameterType id=ParameterType::SM)
Returns the singleton-like repository for a given parameter type.
Parameters
typeParameterType whose blocks should be returned.
Returns
std::unordered_set<std::string>, the names of the block

Implemented in BlockProvider.

◆ get_block()

template<typename T , typename U >
virtual std::map< LhaID, scalar_t > IBlockProvider< T, U >::get_block ( ParameterType  type,
const std::string &  blockname 
)
pure virtual

Retrieve the content of a specific block for a given category/model.

Parameters
typeCategory / model identifier.
blocknameName of the block to log.
Returns
std::map<LhaID, scalar_t>, The content of the block.

Implemented in BlockProvider.

◆ log_all_blocks()

template<typename T , typename U >
virtual void IBlockProvider< T, U >::log_all_blocks ( T  type)
pure virtual

Logs all blocks for a given category/model.

Implementations are free to choose how logging is performed (e.g. via Logger, std::cout, etc.).

Parameters
typeCategory / model identifier.

Implemented in BlockProvider.

◆ log_block()

template<typename T , typename U >
virtual void IBlockProvider< T, U >::log_block ( T  type,
blockname 
)
pure virtual

Logs the content of a specific block for a given category/model.

Parameters
typeCategory / model identifier.
blocknameName of the block to log.

Implemented in BlockProvider.


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