4 if (this->p_type.has_value()) {
5 LOG_WARN(
"LogicError",
"This ParameterProvider already has a type.");
8 return this->get_value(pid, d_type);
12 if (!this->p_type.has_value()) {
13 LOG_ERROR(
"LogicError",
"Please specify a parameter type for the ParameterProvider.");
16 ParamId pid {this->p_type.value(), block,
id};
17 return this->get_value(pid, d_type);
29 if (!p_type.has_value()) {
30 LOG_ERROR(
"LogicError",
"ParameterProvider has no type.");
33 return p_type.value();
37 if (!p_type.has_value()) {
38 LOG_ERROR(
"LogicError",
"ParameterProvider has no type.");
64 LOG_ERROR(
"LogicError",
"ParameterProvider does not support this data type.");
#define LOG_ERROR(type,...)
Macro for logging error messages and terminating the application.
#define LOG_WARN(...)
Macro for logging warning messages.
High-level access to parameter values and uncertainties.
double get_scale(const std::string &block) const
Checks if a parameter identified by block name and LHA ID exists.
std::shared_ptr< Parameter > get_parameter(const ParamId &pid) const
Retrieves the actual Parameter object corresponding to the given ParamId.
scalar_t operator()(const ParamId &pid, DataType d_type=DataType::VALUE) const
Retrieves a parameter value based on ParamId and requested data type.
ParameterType get_type() const
Retrieves the renormalization scale associated with a given block.
bool exists(const ParamId &pid) const
Checks if a parameter identified by ParamId exists.
static std::shared_ptr< Parameters > GetInstance(ParameterType id=ParameterType::SM)
Returns the singleton-like repository for a given parameter type.
Represents an identifier of a LHA element, possibly containing several sub-ids.
Composite identifier for a single parameter.
std::optional< ParameterType > type
Optional high-level parameter category.
BlockName block
Name of the block where the parameter is stored.
LhaID code
Index or multi-index of the parameter inside the block.