15#include <fmt/format.h>
17#include <boost/container/static_vector.hpp>
33 auto operator()(
size_t n ) {
return fmt::format( fmt::runtime(
text ), n ); }
42 template <
typename Histo, std::
size_t N>
45 template <
typename OWNER, std::invocable<
int> FormatName, std::invocable<
int> FormatTitle>
47 typename Histo::AxisTupleType&& allAxis ) {
48 for ( std::size_t i = 0; i < N; i++ ) { this->emplace_back( owner, fname( i ), ftitle( i ), allAxis ); }
51 template <
typename OWNER>
53 typename Histo::AxisTupleType&& allAxis ) {
54 for ( std::size_t i = 0; i < N; i++ ) {
96 template <
typename Histo, std::size_t N,
97 typename Seq = std::make_integer_sequence<unsigned int, std::tuple_size_v<typename Histo::AxisTupleType>>>
99 template <
typename Histo, std::size_t N,
unsigned int... ND>
102 template <
typename OWNER,
typename FormatName,
typename FormatTitle, std::
size_t M = N>
103 HistogramArray( OWNER* owner, FormatName&& fname, FormatTitle&& ftitle,
typename Histo::AxisTupleType&& allAxis )
105 std::forward<typename Histo::AxisTupleType>( allAxis ) ) {}
107 template <
unsigned int I>
108 using AxisType = std::tuple_element_t<I, typename Histo::AxisTupleType>;
110 template <
typename OWNER,
typename FormatName,
typename FormatTitle>
Efficient counter implementations for Gaudi.
generic class implementing an array of histograms The only addition to a raw array is the constructor...
HistogramArray(OWNER *owner, FormatName &&fname, FormatTitle &&ftitle, typename Histo::AxisTupleType &&allAxis)
std::tuple_element_t< I, typename Histo::AxisTupleType > AxisType
HistogramArray(OWNER *owner, FormatName &&fname, FormatTitle &&ftitle, AxisType< ND >... allAxis)
internal class implementing an "array" of histograms
HistogramArrayInternal(OWNER *owner, FormatName &&fname, FormatTitle &&ftitle, typename Histo::AxisTupleType &&allAxis)
constructor with callables for FormatName and FormatTitle
HistogramArrayInternal(OWNER *owner, std::string_view name, std::string_view title, typename Histo::AxisTupleType &&allAxis)
constructor for strings, FormatHistDefault is used as the default callable