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

Block provider bound to HyperISO Parameters / ParameterType. More...

#include <BlockProvider.h>

Inheritance diagram for BlockProvider:
Collaboration diagram for BlockProvider:

Public Member Functions

bool exists (const std::string &blockname, ParameterType) override
 Checks whether a block exists for the given ParameterType.
 
void log_all_blocks (ParameterType type) override
 Logs all blocks for a given ParameterType.
 
void log_block (ParameterType type, const std::string &blockname) override
 Logs the content of a single block for a given ParameterType.
 
std::map< LhaID, scalar_tget_block (ParameterType type, const std::string &blockname) override
 Retrieve the content of a single block for a given ParameterType.
 
std::unordered_set< std::string > get_all_blocks (ParameterType type) override
 return all blocks for a given ParameterType.
 
- Public Member Functions inherited from IBlockProvider< ParameterType, const std::string & >
virtual ~IBlockProvider ()=default
 Virtual destructor.
 

Detailed Description

Block provider bound to HyperISO Parameters / ParameterType.

This class specializes IBlockProvider with:

  • T = ParameterType
  • U = const std::string&

It delegates its operations to the corresponding Parameters instance:

  • exists(...) queries Parameters::GetInstance(type)->get_blocks_list()
  • log_all_blocks(...) logs the entire Parameters instance
  • log_block(...) prints the content of a single block
See also
Parameters
ParameterType

Definition at line 34 of file BlockProvider.h.

Member Function Documentation

◆ exists()

bool BlockProvider::exists ( const std::string &  blockname,
ParameterType  pt 
)
overridevirtual

Checks whether a block exists for the given ParameterType.

Parameters
blocknameName of the block to check.
ptParameterType for which to check the block.
Returns
true if the block exists, false otherwise.

Implements IBlockProvider< ParameterType, const std::string & >.

Definition at line 3 of file BlockProvider.cpp.

◆ get_all_blocks()

std::unordered_set< std::string > BlockProvider::get_all_blocks ( ParameterType  type)
overridevirtual

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

Implements IBlockProvider< ParameterType, const std::string & >.

Definition at line 25 of file BlockProvider.cpp.

◆ get_block()

std::map< LhaID, scalar_t > BlockProvider::get_block ( ParameterType  type,
const std::string &  blockname 
)
overridevirtual

Retrieve the content of a single block for a given ParameterType.

Internally calls Parameters::GetInstance(type)->get_block_infos(blockname).

Parameters
typeParameterType owning the block.
blocknameName of the block to retrieve.
Returns
std::map<LhaID, scalar_t>, the block content

Implements IBlockProvider< ParameterType, const std::string & >.

Definition at line 21 of file BlockProvider.cpp.

◆ log_all_blocks()

void BlockProvider::log_all_blocks ( ParameterType  type)
overridevirtual

Logs all blocks for a given ParameterType.

Internally calls:

#define LOG_INFO(...)
Macro for logging informational messages.
Definition Logger.h:39
Parameters
typeParameterType whose blocks should be logged.

Implements IBlockProvider< ParameterType, const std::string & >.

Definition at line 13 of file BlockProvider.cpp.

◆ log_block()

void BlockProvider::log_block ( ParameterType  type,
const std::string &  blockname 
)
overridevirtual

Logs the content of a single block for a given ParameterType.

Internally calls Parameters::GetInstance(type)->print_block(blockname).

Parameters
typeParameterType owning the block.
blocknameName of the block to log.

Implements IBlockProvider< ParameterType, const std::string & >.

Definition at line 17 of file BlockProvider.cpp.


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