Follow-up from "Improved usability of HistogramArray"
The following discussions from !1643 (merged) should be addressed:
-
@clemenci started a discussion: (+1 comment) I find this check a bit confusing as we have 100 histograms and not 5. What about something like
constexpr std::size_t N = 100; Gaudi::Accumulators::HistogramArray<Gaudi::Accumulators::StaticHistogram<1>, N> histo1d{ &algo, []( int n ) { return fmt::format( "SGaudiH1D-{}-{}", n, n ^ 2 ); }, [nb = N]( int n ) { return fmt::format( "Title number {} of Histogram arrays of {} histograms in total", n, nb ); }, { 21, -10.5, 10.5, "X" } }; for ( unsigned int i = 0; i < N; i++ ) ++histo1d[i][-10.0]; // fill the first (non-overflow) bin for ( unsigned int i = 0; i < N; i++ ) BOOST_TEST( toJSON( histo1d[i] ).at( "bins" )[1] == 1 ); BOOST_TEST( toJSON( histo1d[3] ).at( "title" ) == fmt::format( "Title number 3 of Histogram arrays of {} histograms in total", N ) );
-
@jonrob started a discussion: (+4 comments) I am just curious, but what would be the overhead of just using the boost static vector for all N values, not just large one ? It would obviously simplify the implementation to only have one backend.