Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
mapper_hub.hpp File Reference

Non-templated façade over the project mapper families. More...

#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "observable_ids.hpp"
#include "wcoef_ids.hpp"
#include "wgroup_ids.hpp"
#include "parametertype_ids.hpp"
#include "model_ids.hpp"
#include "wilsonbasis_ids.hpp"
#include "contributiontype_ids.hpp"
#include "masstype_ids.hpp"
#include "scaletype_ids.hpp"
#include "uncertaintytype_ids.hpp"
#include "decay_ids.hpp"
#include "qcdorder_ids.hpp"
Include dependency graph for mapper_hub.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  IMapperView
 Minimal runtime-polymorphic view over a mapper. More...
 
struct  MapperViewSimple< Concrete >
 Adapter for mappers with simple no-extra-data registration. More...
 
struct  MapperViewReadOnly< Concrete >
 Adapter for mappers that can be queried generically but not registered. More...
 

Enumerations

enum class  MapperKind {
  Observable , WCoef , Group , ParameterType ,
  Model , WilsonBasis , ContributionType , MassType ,
  ScaleType , UncertaintyType , Decay , QCDOrder
}
 Enumeration of mapper families supported by the hub. More...
 

Functions

IMapperViewmapper_view (MapperKind k)
 Return the mapper view associated with a mapper kind.
 
std::string canonical_of (MapperKind k, std::string_view s)
 Resolve a name to its canonical representation for a mapper kind.
 
std::vector< std::string > list_all (MapperKind k)
 List all canonical names known to a mapper kind.
 
bool register_custom (MapperKind k, std::string canonical, std::vector< std::string > aliases)
 Generic registration helper for simple mapper kinds.
 
bool register_custom_wcoef (std::string canonical, std::vector< std::string > aliases, std::pair< int, int > flha)
 Specialized registration helper for Wilson coefficients.
 
bool register_custom_observable (std::string canonical, std::vector< std::string > aliases, std::optional< LhaID > ext, std::string_view parent_decay)
 Specialized registration helper for custom observables.
 
bool register_custom_decay_with_observables (std::string canonical, std::vector< std::string > aliases, std::vector< CustomObservableSpec > observables)
 Specialized registration helper for a custom decay with observables.
 

Detailed Description

Non-templated façade over the project mapper families.

The individual mappers are template-based and expose slightly different registration APIs. mapper_hub.hpp provides a small common interface for generic tooling such as CLI completion, validation or configuration parsing.

Note
Generic registration is intentionally conservative. Mappers requiring extra semantic information, such as a parent decay for observables, expose dedicated helper functions instead of using IMapperView::register_custom().

Definition in file mapper_hub.hpp.

Enumeration Type Documentation

◆ MapperKind

enum class MapperKind
strong

Enumeration of mapper families supported by the hub.

Enumerator
Observable 
WCoef 
Group 
ParameterType 
Model 
WilsonBasis 
ContributionType 
MassType 
ScaleType 
UncertaintyType 
Decay 
QCDOrder 

Definition at line 40 of file mapper_hub.hpp.

Function Documentation

◆ canonical_of()

std::string canonical_of ( MapperKind  k,
std::string_view  s 
)
inline

Resolve a name to its canonical representation for a mapper kind.

Definition at line 189 of file mapper_hub.hpp.

◆ list_all()

std::vector< std::string > list_all ( MapperKind  k)
inline

List all canonical names known to a mapper kind.

Definition at line 196 of file mapper_hub.hpp.

◆ mapper_view()

IMapperView & mapper_view ( MapperKind  k)
inline

Return the mapper view associated with a mapper kind.

Parameters
kMapper family.
Returns
Reference to a static adapter instance.

Definition at line 154 of file mapper_hub.hpp.

◆ register_custom()

bool register_custom ( MapperKind  k,
std::string  canonical,
std::vector< std::string >  aliases 
)
inline

Generic registration helper for simple mapper kinds.

Returns
false for mapper kinds that require dedicated registration metadata.

Definition at line 205 of file mapper_hub.hpp.

◆ register_custom_decay_with_observables()

bool register_custom_decay_with_observables ( std::string  canonical,
std::vector< std::string >  aliases,
std::vector< CustomObservableSpec observables 
)
inline

Specialized registration helper for a custom decay with observables.

This enforces the project invariant that a decay must have at least one observable.

Parameters
canonicalCanonical decay name.
aliasesOptional decay aliases.
observablesCustom observable definitions to attach.
Returns
true on success.

Definition at line 266 of file mapper_hub.hpp.

◆ register_custom_observable()

bool register_custom_observable ( std::string  canonical,
std::vector< std::string >  aliases,
std::optional< LhaID ext,
std::string_view  parent_decay 
)
inline

Specialized registration helper for custom observables.

A custom observable must always be attached to a parent decay.

Parameters
canonicalCanonical observable name.
aliasesOptional aliases.
extOptional FLHA id.
parent_decayParent decay name or alias.
Returns
true on success.

Definition at line 242 of file mapper_hub.hpp.

◆ register_custom_wcoef()

bool register_custom_wcoef ( std::string  canonical,
std::vector< std::string >  aliases,
std::pair< int, int >  flha 
)
inline

Specialized registration helper for Wilson coefficients.

Parameters
canonicalCanonical coefficient name.
aliasesOptional aliases.
flhaFLHA base pair.
Returns
true on success.

Definition at line 220 of file mapper_hub.hpp.