Skip to content

Parameters

#include <xalgospp/parameters.hh>
template<typename Derived>
struct Parameters

Defined in src/lib/xalgospp/parameters.hh:171

A base Parameters struct with generic setting and getting routines.

The Parameters object provides a device-safe key/value mapping with ergonomic lookup and retrieval based on string keys. Algorithms define their specific Parameters with the key/values needed to properly configure the analysis.

  • Derived CRTP subclass.
Name Kind Owner
set function Declared here
get function Declared here
set_impl function Declared here
get_impl function Declared here
Return Name Description
XALG_HD bool set inline Set a parameter for the Parameters-set by string.
XALG_HD T get const inline Retrieve a parameter by name from the Parameters-set.

inline

template<typename T> inline XALG_HD bool set(const char * name, const T & val)

Defined in src/lib/xalgospp/parameters.hh:180

Set a parameter for the Parameters-set by string.

Parameter Type Description
name const char * The name for the parameter.
val const T & The value for the parameter.

const inline

template<typename T> inline XALG_HD T get(const char * name, const T & default_val = T{}) const

Defined in src/lib/xalgospp/parameters.hh:200

Retrieve a parameter by name from the Parameters-set.

The requested parameter if present, otherwise the default_val.

Parameter Type Description
name const char * The name of the parameter to retrieve.
default_val const T & A default value to return as a fallback.
Return Name Description
XALG_HD bool set_impl static inline
XALG_HD void get_impl static inline

static inline

template<typename Class, typename Tuple, typename T, hd_std::size_t... Is> static inline XALG_HD bool set_impl(Class & obj, const Tuple & t, const char * name, const T & val, hd_std::index_sequence< Is... >)

Defined in src/lib/xalgospp/parameters.hh:216


static inline

template<typename Class, typename Tuple, typename T, hd_std::size_t... Is> static inline XALG_HD void get_impl(const Class & obj, const Tuple & t, const char * name, T & out_val, hd_std::index_sequence< Is... >)

Defined in src/lib/xalgospp/parameters.hh:240