Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
uncertaintytype_ids.hpp
Go to the documentation of this file.
1#ifndef UNCERTAINTY_TYPE_IDS_H
2#define UNCERTAINTY_TYPE_IDS_H
3
4#include "generic_mapper.h"
5#include "Map.h"
6#include "GeneralEnum.h"
7
20struct UncTag {};
21
24
33inline const std::map<UncertaintyType, std::string>& uncertaintytype_mapping() {
34 static const std::map<UncertaintyType, std::string> m = {
35 {UncertaintyType::STAT, "STATISTICAL"},
36 {UncertaintyType::SYST, "SYSTEMATICS"},
37 {UncertaintyType::COMBINED, "COMBINED"},
38 };
39 return m;
40}
41
55: public GenericMapperNoExt<UncTag, UncertaintyType, uncertaintytype_mapping>
56{
57public:
59 using Base::str;
60
67 static const std::map<UncertaintyType, DataType>& data_type_mapping(){
68 static const std::map<UncertaintyType, DataType> m = {
72 };
73 return m;
74 }
75
84 static DataType d_type(UncertaintyType t){ return data_type_mapping().at(t); }
85};
86
87#endif
DataType
UncertaintyType
Static mappings between enum classes and string (or FLHA) identifiers.
Generic enum↔string mapper without external keys.
static std::string str(const IdOf< UncTag > &id)
Returns the string representation associated with an identifier.
Returns an uppercase copy of the input string.
Mapper for UncertaintyType <-> UncertaintyTypeId <-> string.
static const std::map< UncertaintyType, DataType > & data_type_mapping()
Returns the builtin mapping UncertaintyType -> DataType.
static DataType d_type(UncertaintyType t)
Returns the DataType corresponding to a given uncertainty type.
Generic enum↔string (and optional external key) mappers built on DynamicRegistry.
Tag type for uncertainty-type identifiers.
const std::map< UncertaintyType, std::string > & uncertaintytype_mapping()
Builtin mapping UncertaintyType -> string name.