36 template <
typename Counter, std::
size_t N>
39 template <
typename OWNER, std::invocable<
int> FormatName, std::
size_t... Ns>
42 static_assert(
sizeof...( Ns ) < 1000,
"Using CounterArray with 1000 arrays or more is prohibited. This "
43 "would lead to very long compilation times" );
46 template <
typename OWNER, std::size_t... Ns>
49 static_assert(
sizeof...( Ns ) < 1000,
"Using CounterArray with 1000 arrays or more is prohibited. This "
50 "would lead to very long compilation times" );
53 template <std::size_t... Ns>
54 auto buffer( std::integer_sequence<std::size_t, Ns...> ) {
55 return std::array{ ( *this )[Ns].buffer()... };
88 template <
typename Counter, std::
size_t N>
90 template <
typename OWNER,
typename FormatName>
Efficient counter implementations for Gaudi.
CounterArray(OWNER *owner, FormatName &&fname)
A basic integral counter;.
internal class implementing an array of counters
CounterArrayInternal(OWNER *owner, FormatName &&fname, std::integer_sequence< std::size_t, Ns... >)
constructor with callables for FormatName
auto buffer(std::integer_sequence< std::size_t, Ns... >)
Method to form an array of buffers.
CounterArrayInternal(OWNER *owner, std::string_view name, std::integer_sequence< std::size_t, Ns... >)
constructor for strings, FormatCounterDefault is used as the default callable