32template <
typename BinContentType>
64template <
typename BinContentType>
87 const auto &engineAxes =
fEngine.GetAxes();
88 for (std::size_t i = 0; i < engineAxes.size(); i++) {
89 if (engineAxes[i].GetCategoricalAxis() !=
nullptr) {
90 fStats.DisableDimension(i);
110 template <
typename... Axes>
122 RHist(std::uint64_t nNormalBins, std::pair<double, double> interval)
194 template <std::
size_t N>
242 template <
typename... A>
245 return fEngine.GetBinContent(args...);
274 template <std::
size_t N,
typename V>
303 template <
typename... A>
306 fEngine.SetBinContent(args...);
332 template <
typename... A>
333 void Fill(
const std::tuple<A...> &args)
360 template <
typename... A>
364 fStats.Fill(args, weight);
391 template <
typename... A>
394 static_assert(
sizeof...(A) >= 1,
"need at least one argument to Fill");
395 if constexpr (
sizeof...(A) >= 1) {
454 template <
typename U>
514 bool dropped =
false;
517 if (dropped ||
fStats.IsTainted()) {
523 std::size_t slicedDim = 0;
524 for (std::size_t i = 0; i < sliceSpecs.size(); i++) {
526 if (sliceSpecs[i].GetOperationSum() ==
nullptr) {
575 template <
typename... A>
578 std::vector<RSliceSpec> sliceSpecs{args...};
579 return Slice(sliceSpecs);
A variant of all supported axis types.
A multidimensional range of bin indices.
A histogram data structure to bin data along multiple dimensions.
A context to concurrently fill an RHist.
Histogram statistics of unbinned values.
std::vector< RDimensionStats > fDimensionStats
The sums per dimension.
void Taint()
Taint this statistics object.
double fSumW
The sum of weights.
std::size_t GetNDimensions() const
double fSumW2
The sum of weights squared.
std::uint64_t fNEntries
The number of entries.
RHist(const RHist &)=delete
The copy constructor is deleted.
double ComputeMean(std::size_t dim=0) const
Compute the arithmetic mean of unbinned values.
RHist(std::uint64_t nNormalBins, std::pair< double, double > interval)
Construct a one-dimensional histogram with a regular axis.
std::size_t GetNDimensions() const
RHist Clone() const
Clone this histogram.
RHist & operator=(RHist &&)=default
Efficiently move a histogram.
RHist(const RAxisVariant &axis1, const Axes &...axes)
Construct a histogram.
void Scale(double factor)
Scale all histogram bin contents and statistics.
RHist Slice(const A &...args) const
Slice this histogram with an RSliceSpec per dimension.
const BinContentType & GetBinContent(const std::vector< RBinIndex > &indices) const
Get the content of a single bin.
RHist(std::initializer_list< RAxisVariant > axes)
Construct a histogram.
void Fill(const std::tuple< A... > &args)
Fill an entry into the histogram.
RHist & operator=(const RHist &)=delete
The copy assignment operator is deleted.
RHistStats fStats
The global histogram statistics.
void AddAtomic(const RHist &other)
Add all bin contents and statistics of another histogram using atomic instructions.
void Fill(const std::tuple< A... > &args, RWeight weight)
Fill an entry into the histogram with a weight.
RHist< U > Convert() const
Convert this histogram to a different bin content type.
RHistEngine< BinContentType > fEngine
The histogram engine including the bin contents.
double ComputeNEffectiveEntries() const
Compute the number of effective entries.
std::uint64_t GetTotalNBins() const
RHist(std::vector< RAxisVariant > axes)
Construct a histogram.
RBinIndexMultiDimRange GetFullMultiDimRange() const
Get the multidimensional range of all bins.
const RHistStats & GetStats() const
const RHistEngine< BinContentType > & GetEngine() const
void Streamer(TBuffer &)
ROOT Streamer function to throw when trying to store an object of this class.
void Fill(const A &...args)
Fill an entry into the histogram.
void SetBinContent(const A &...args)
Set the content of a single bin.
double ComputeStdDev(std::size_t dim=0) const
Compute the standard deviation of unbinned values.
RHist(RHist &&)=default
Efficiently move construct a histogram.
const BinContentType & GetBinContent(const std::array< RBinIndex, N > &indices) const
Get the content of a single bin.
const std::vector< RAxisVariant > & GetAxes() const
RHist Slice(const std::vector< RSliceSpec > &sliceSpecs) const
Slice this histogram with an RSliceSpec per dimension.
void Add(const RHist &other)
Add all bin contents and statistics of another histogram.
void SetBinContent(const std::array< RBinIndex, N > &indices, const V &value)
Set the content of a single bin.
RHist(RHistEngine< BinContentType > engine)
Private constructor based off an engine.
const BinContentType & GetBinContent(const A &...args) const
Get the content of a single bin.
void Clear()
Clear all bin contents and statistics.
std::uint64_t GetNEntries() const
A regular axis with equidistant bins in the interval .
Buffer base class used for serializing objects.
Namespace for ROOT features in testing.
A weight for filling histograms.