67 virtual std::string
canonical(std::string_view s)
const = 0;
74 virtual std::vector<std::string>
list_all()
const = 0;
88 std::vector<std::string> aliases) = 0;
100template<
class Concrete>
102 std::string
canonical(std::string_view s)
const override {
103 auto id = Concrete::id_of(s);
104 return Concrete::str(
id);
107 std::vector<std::string>
list_all()
const override {
108 std::vector<std::string> out;
109 for (
auto&
id : Concrete::list_all()) {
110 out.push_back(Concrete::str(
id));
116 std::vector<std::string> aliases)
override
118 return Concrete::register_custom(std::move(
canonical), std::move(aliases));
128template<
class Concrete>
130 std::string
canonical(std::string_view s)
const override {
131 auto id = Concrete::id_of(s);
132 return Concrete::str(
id);
135 std::vector<std::string>
list_all()
const override {
136 std::vector<std::string> out;
137 for (
auto&
id : Concrete::list_all()) {
138 out.push_back(Concrete::str(
id));
206 std::string canonical,
207 std::vector<std::string> aliases)
221 std::vector<std::string> aliases,
222 std::pair<int,int> flha)
225 std::move(canonical),
243 std::vector<std::string> aliases,
244 std::optional<LhaID> ext,
245 std::string_view parent_decay)
267 std::string canonical,
268 std::vector<std::string> aliases,
269 std::vector<CustomObservableSpec> observables)
272 std::move(canonical),
274 std::move(observables)
static bool register_custom_with_observables(std::string canonical, std::vector< std::string > aliases, std::vector< CustomObservableSpec > observables)
Register a custom decay and its custom observables in one call.
static bool register_custom(std::string canonical, std::vector< std::string > aliases={}, std::optional< std::pair< int, int > > ext=std::nullopt)
Registers a custom entry with optional external key.
static bool register_custom(const std::string &canonical, std::vector< std::string > aliases, std::optional< LhaID > ext, const DecayId &parent_decay)
Register a custom observable and attach it to a parent decay.
Mapper and dynamic identifiers for decay channels.
MapperKind
Enumeration of mapper families supported by the hub.
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.
std::string canonical_of(MapperKind k, std::string_view s)
Resolve a name to its canonical representation for a mapper kind.
IMapperView & mapper_view(MapperKind k)
Return the mapper view associated with a mapper kind.
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.
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.
Mapper for builtin and runtime observable identifiers.
Minimal runtime-polymorphic view over a mapper.
virtual std::vector< std::string > list_all() const =0
List all known canonical strings.
virtual ~IMapperView()=default
virtual std::string canonical(std::string_view s) const =0
Resolve a name or alias to its canonical string.
virtual bool register_custom(std::string canonical, std::vector< std::string > aliases)=0
Generic custom registration hook.
Adapter for mappers that can be queried generically but not registered.
std::string canonical(std::string_view s) const override
Resolve a name or alias to its canonical string.
std::vector< std::string > list_all() const override
List all known canonical strings.
bool register_custom(std::string, std::vector< std::string >) override
Generic custom registration hook.
Adapter for mappers with simple no-extra-data registration.
std::vector< std::string > list_all() const override
List all known canonical strings.
std::string canonical(std::string_view s) const override
Resolve a name or alias to its canonical string.
bool register_custom(std::string canonical, std::vector< std::string > aliases) override
Generic custom registration hook.
Mapping and helpers for uncertainty types.