template<
atomicity Atomicity, typename InputType, typename Arithmetic, template<
atomicity Ato, typename Arith > typename BaseAccumulatorT, typename AxisTupleType>
class Gaudi::Accumulators::HistogramingAccumulatorInternal< Atomicity, InputType, Arithmetic, BaseAccumulatorT, AxisTupleType >
Internal Accumulator class dealing with Histograming.
Templates parameters are :
- Atomicity : none or full
- InputType : a class holding a value given as input of the Histogram, and able to answer questions on this value given a number of axis matching the type of value. e.g. it would hold a pair of double for a non weighted 2D histogram or a pair of triplet of doubles and double for the weighted 3D histogram. Example implementations are (Weighted)HistoInputType. This class must define :
- a constructor taking a set of value to build the InputType
- a static method unsigned int computeTotNBins( std::tuple<AxisType...> const& ) able to compute the total number of bins needed with this input type and these axis. It will typically be the product of the number of bins for each dimension, potentially increased by 2 for each if underflow and overflow is supported
- a type ValueType alias defining the type of the input values to give to InputType This type needs to implement :
- a method unsigned int computeIndex( std::tuple<AxisType...> const& ) const able to compute the bin corresponding to a given value
- a method auto forInternalCounter() const returning the value to be used to inscrease the accumulator dealing with the bin associated with the current value. In most simple cases, it return Arithmetic{} or even 1 but for weighted histograms, it returns a pair with the weight as second item
- in case of usage within a RootHistogram, it should also define a method bool inAcceptance( std::tuple<AxisType...> const& ) checking whether a given value in within the range of the accumulator
- Arithmetic : the arithmetic type used for values stored inside the histogram e.g. unsigned int for regular histogram as we only count entries, or float/double for weighted histograms, as we store actual sums of original values
- BaseAccumulator : the underlying accumulator used in each bin
- AxisTupleType : the types of the axis as a tuple. Its length defines the dimension of the Histogram this accumulator handles. The constraints on the AxisType are : FIXME use concepts when available
- that they can be copied
- that they have a ArithmeticType type alias
- that they have a unsigned int numBins() const method
- that they have a friend operator<< using std::ostream for printing
- that they have a friend to_json method using nlohmann library
- that they implement whatever is needed by the computeIndex and computeTotNBins methods of the InputType used. Plus the inAcceptance one if Roothistograms are used A default Axis class is provided for most cases This accumulator is simply an array of BaseAccumulator, one per bin.
Definition at line 483 of file StaticHistogram.h.