8 for (
const auto& blockName : blockNames) {
22 auto blocks =
BLOCKS.at(type);
32 std::unordered_set<std::string> known_norm;
34 for (
const auto& b : known) {
39 std::vector<BlockName> custom_blocks;
40 custom_blocks.reserve(source.size());
42 for (
const auto& block : source) {
46 if (bnorm ==
"mass" || bnorm ==
"gauge") {
47 custom_blocks.emplace_back(block);
51 if (!known_norm.count(bnorm)) {
52 custom_blocks.emplace_back(block);
62 if (conflict_blocks.contains(block)) {
72 if (owned_blocks.contains(block)) {
77 LOG_ERROR(
"Invalid Parameter",
"Parameter", block,
",",
id,
"is undefined.");
81 std::vector<ParameterType> param_types;
84 if (owned_blocks.contains(block)) {
85 param_types.emplace_back(type);
#define LOG_ERROR(type,...)
Macro for logging error messages and terminating the application.
Defines structures and classes for routing and categorizing parameter blocks.
std::string to_lowercase(const std::string &str)
Returns a lowercase copy of the input string.
Block identifier with alias support.
static std::unordered_set< BlockName > GetOwnedBlocks(ParameterType ptype)
Retrieves all blocks owned by a given ParameterType.
static ParameterType GetType(BlockName block, LhaID id)
Determines the ParameterType of a given (block, LhaID) pair.
Represents an identifier of a LHA element, possibly containing several sub-ids.
static std::unordered_set< BlockName > CUSTOM_BSM_BLOCKS
Runtime-registered blocks that should be treated as BSM blocks.
static void register_custom_bsm_blocks(const std::vector< BlockName > &blockNames)
Registers several runtime blocks as BSM-owned.
static const std::map< ParameterType, std::unordered_set< BlockName > > BLOCKS
Static map associating a ParameterType with a set of block names.
static std::unordered_set< BlockName > get_blocks(ParameterType type)
Returns the static blocks plus runtime BSM blocks when relevant.
static const std::unordered_set< BlockName > & custom_bsm_blocks()
Returns the registered runtime BSM blocks.
static bool is_custom_bsm_block(BlockName blockName)
Checks whether one block was registered dynamically as BSM-owned.
static void register_custom_bsm_block(BlockName blockName)
Registers one runtime block as BSM-owned.
static std::vector< BlockName > filter_custom_blocks(const std::vector< BlockName > &source)
Filters custom (non-standard) blocks from a source list.
static const std::map< BlockName, std::unordered_set< long > > SM_RIGHTS
Access rights for Standard Model (SM) parameters.