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

Adapter exposing dependent-block metadata for one parameter namespace. More...

#include <DependantBlockInfoProvider.h>

Public Member Functions

bool is_dependent_block (ParameterType type, const std::string &block_name) const
 Checks whether a block is a DependentBlock.
 
std::vector< std::string > get_source_blocks (ParameterType type, const std::string &block_name) const
 Returns the direct source blocks of a block.
 
std::vector< std::string > get_dependent_blocks (ParameterType type, const std::string &block_name) const
 Returns the direct blocks depending on a block.
 
std::vector< std::string > get_all_source_blocks (ParameterType type, const std::string &block_name) const
 Returns all transitive source blocks of a block.
 
std::vector< std::string > get_all_dependent_blocks (ParameterType type, const std::string &block_name) const
 Returns all transitive blocks depending on a block.
 

Detailed Description

Adapter exposing dependent-block metadata for one parameter namespace.

Typical usage:

bool is_dep = provider.is_dependent_block(ParameterType::SM, "EW");
auto sources = provider.get_source_blocks(ParameterType::SM, "EW");
auto dependents = provider.get_dependent_blocks(ParameterType::SM, "SMINPUTS");
Adapter exposing dependent-block metadata for one parameter namespace.
bool is_dependent_block(ParameterType type, const std::string &block_name) const
Checks whether a block is a DependentBlock.
std::vector< std::string > get_source_blocks(ParameterType type, const std::string &block_name) const
Returns the direct source blocks of a block.
std::vector< std::string > get_dependent_blocks(ParameterType type, const std::string &block_name) const
Returns the direct blocks depending on a block.

The direct methods return only immediate graph neighbours. The get_all_* methods recursively walk the graph and deduplicate block names.

Definition at line 43 of file DependantBlockInfoProvider.h.

Member Function Documentation

◆ get_all_dependent_blocks()

std::vector< std::string > DependantBlockInfoProvider::get_all_dependent_blocks ( ParameterType  type,
const std::string &  block_name 
) const

Returns all transitive blocks depending on a block.

This recursively follows downstream observer links and returns each block name at most once.

Parameters
typeParameter namespace containing the block to inspect.
block_nameBlock name or alias to inspect.
Returns
Sorted list of all downstream/dependent block names.
Exceptions
std::invalid_argumentif the block cannot be resolved.

Definition at line 28 of file DependantBlockInfoProvider.cpp.

◆ get_all_source_blocks()

std::vector< std::string > DependantBlockInfoProvider::get_all_source_blocks ( ParameterType  type,
const std::string &  block_name 
) const

Returns all transitive source blocks of a block.

This recursively follows upstream dependency links and returns each block name at most once.

Parameters
typeParameter namespace containing the block to inspect.
block_nameBlock name or alias to inspect.
Returns
Sorted list of all upstream/source block names.
Exceptions
std::invalid_argumentif the block cannot be resolved.

Definition at line 21 of file DependantBlockInfoProvider.cpp.

◆ get_dependent_blocks()

std::vector< std::string > DependantBlockInfoProvider::get_dependent_blocks ( ParameterType  type,
const std::string &  block_name 
) const

Returns the direct blocks depending on a block.

This answers: "which blocks directly depend on this block?" It follows direct block observers registered on the inspected block.

Parameters
typeParameter namespace containing the block to inspect.
block_nameBlock name or alias to inspect.
Returns
Sorted list of direct downstream/dependent block names.
Exceptions
std::invalid_argumentif the block cannot be resolved.

Definition at line 14 of file DependantBlockInfoProvider.cpp.

◆ get_source_blocks()

std::vector< std::string > DependantBlockInfoProvider::get_source_blocks ( ParameterType  type,
const std::string &  block_name 
) const

Returns the direct source blocks of a block.

This answers: "which blocks does this block depend on directly?" Plain blocks return an empty list.

Parameters
typeParameter namespace containing the block to inspect.
block_nameBlock name or alias to inspect.
Returns
Sorted list of direct upstream/source block names.
Exceptions
std::invalid_argumentif the block cannot be resolved.

Definition at line 7 of file DependantBlockInfoProvider.cpp.

◆ is_dependent_block()

bool DependantBlockInfoProvider::is_dependent_block ( ParameterType  type,
const std::string &  block_name 
) const

Checks whether a block is a DependentBlock.

Parameters
typeParameter namespace containing the block to inspect.
block_nameBlock name or alias to inspect.
Returns
True if the resolved block is a DependentBlock.
Exceptions
std::invalid_argumentif the block cannot be resolved.

Definition at line 3 of file DependantBlockInfoProvider.cpp.


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