|
ROOT 6.08/02 Reference Guide |
Histogram class for histograms with DIMENSIONS dimensions, where each bin count is stored by a value of type PRECISION.
STAT stores statistical data of the entries filled into the histogram (bin content, uncertainties etc).
A histogram counts occurrences of values or n-dimensional combinations thereof. Contrary to for instance a TTree, a histogram combines adjacent values. The resolution of this combination is defined by the axis binning, see e.g. http://www.wikiwand.com/en/Histogram
Public Types | |
| using | AxisRange_t = typename ImplBase_t::AxisIterRange_t |
| Range. More... | |
| using | const_iterator = Detail::THistBinIter< ImplBase_t > |
| using | CoordArray_t = typename ImplBase_t::CoordArray_t |
The coordinates type: a DIMENSIONS-dimensional std::array of double. More... | |
| using | FillFunc_t = typename ImplBase_t::FillFunc_t |
Pointer type to HistImpl_t::Fill, for faster access. More... | |
| using | ImplBase_t = Detail::THistImplBase< Detail::THistData< DIMENSIONS, PRECISION, Detail::THistDataDefaultStorage, STAT...>> |
The type of the Detail::THistImplBase of this histogram. More... | |
| using | Weight_t = PRECISION |
| The type of weights. More... | |
Public Member Functions | |
| THist ()=default | |
| THist (THist &&)=default | |
| THist (std::array< TAxisConfig, DIMENSIONS > axes) | |
Create a histogram from an array of axes (TAxisConfigs). More... | |
| THist (std::string_view histTitle, std::array< TAxisConfig, DIMENSIONS > axes) | |
| Constructor overload taking the histogram title. More... | |
| template<int ENABLEIF_NDIM = DIMENSIONS, class = typename std::enable_if<ENABLEIF_NDIM == 1>::type> | |
| THist (const TAxisConfig &xaxis) | |
| Constructor overload that's only available for a 1-dimensional histogram. More... | |
Static Public Member Functions | |
| static constexpr int | GetNDim () noexcept |
| Number of dimensions of the coordinates. More... | |
Public Attributes | |
| FillFunc_t | fFillFunc = nullptr |
| The actual histogram implementation. More... | |
Friends | |
| THist | HistFromImpl (std::unique_ptr< ImplBase_t >) |
#include <ROOT/THist.hxx>
| using ROOT::Experimental::THist< DIMENSIONS, PRECISION, STAT >::AxisRange_t = typename ImplBase_t::AxisIterRange_t |
| using ROOT::Experimental::THist< DIMENSIONS, PRECISION, STAT >::const_iterator = Detail::THistBinIter<ImplBase_t> |
| using ROOT::Experimental::THist< DIMENSIONS, PRECISION, STAT >::CoordArray_t = typename ImplBase_t::CoordArray_t |
| using ROOT::Experimental::THist< DIMENSIONS, PRECISION, STAT >::FillFunc_t = typename ImplBase_t::FillFunc_t |
| using ROOT::Experimental::THist< DIMENSIONS, PRECISION, STAT >::ImplBase_t = Detail::THistImplBase<Detail::THistData<DIMENSIONS, PRECISION, Detail::THistDataDefaultStorage, STAT...>> |
The type of the Detail::THistImplBase of this histogram.
| using ROOT::Experimental::THist< DIMENSIONS, PRECISION, STAT >::Weight_t = PRECISION |
|
default |
|
default |
|
explicit |
Create a histogram from an array of axes (TAxisConfigs).
Example code:
Construct a 1-dimensional histogram that can be filled with floatss. The axis has 10 bins between 0. and 1. The two outermost sets of curly braces are to reach the initialization of the std::array elements; the inner one is for the initialization of a TAxisCoordinate.
THist<1,float> h1f({{ {10, 0., 1.} }});
Construct a 2-dimensional histogram, with the first axis as before, and the second axis having non-uniform ("irregular") binning, where all bin- edges are specified. As this is itself an array it must be enclosed by double curlies.
THist<2,int> h2i({{ {10, 0., 1.}, {{-1., 0., 1., 10., 100.}} }});
| ROOT::Experimental::THist< DIMENSIONS, PRECISION, STAT >::THist | ( | std::string_view | histTitle, |
| std::array< TAxisConfig, DIMENSIONS > | axes | ||
| ) |
|
inlineexplicit |
|
inlinestaticnoexcept |
|
friend |
| FillFunc_t ROOT::Experimental::THist< DIMENSIONS, PRECISION, STAT >::fFillFunc = nullptr |