10 #ifndef HERD_DEFAULTVALUES_H_ 11 #define HERD_DEFAULTVALUES_H_ 23 #define DEFAULT_INIT(x) x{defaultValue<decltype(x)>} 24 #define SET_TO_DEFAULT(x) x = DefaultValue(x) 31 template <
typename T> constexpr T defaultValue = std::numeric_limits<T>::max();
34 template <>
const std::string defaultValue<std::string> =
"";
43 template <>
const Vec3D defaultValue<Vec3D> = Vec3D();
47 const CooArray<T> defaultValue<CooArray<T>> = CooArray<T>(defaultValue<T>, defaultValue<T>, defaultValue<T>);
50 template <
class T,
size_t N> std::array<T, N> make_array(
const T &v) {
57 template <
class T,
size_t N>
const std::array<T, N> defaultValue<std::array<T, N>> = make_array<T, N>(defaultValue<T>);
60 template <
typename T>
AxesArray<T> getDefaultAxesArrayValue() {
70 template <
typename T>
const AxesArray<T> defaultValue<AxesArray<T>> = _Private::getDefaultAxesArrayValue<T>();
73 template <
int N>
const std::bitset<N> defaultValue<std::bitset<N>> = std::bitset<N>();
76 template <
typename T> constexpr T DefaultValue(
const T &x) {
77 return defaultValue<std::remove_const_t<std::remove_reference_t<decltype(x)>>>;
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
An array that accepts axis as subscripts.
Definition: AxesArray.h:27
Side
Aliases for the five sides. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:104
Direction
Aliases for the six axis directions. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:52