20#include <initializer_list>
30namespace Experimental {
112 fSum2 *= factor * factor;
145 for (std::size_t i = 0; i <
engineAxes.size(); i++) {
146 if (
engineAxes[i].GetCategoricalAxis() !=
nullptr) {
158 explicit RProfile(std::initializer_list<RAxisVariant> axes) :
RProfile(std::vector(axes)) {}
167 template <
typename...
Axes>
252 template <std::
size_t N>
298 template <
typename... A>
301 return fEngine.GetBinContent(args...);
330 template <std::
size_t N,
typename V>
357 template <
typename... A>
360 fEngine.SetBinContent(args...);
387 template <
typename... A,
typename V>
416 template <
typename... A,
typename V>
448 template <
typename... A>
451 static_assert(
sizeof...(A) >= 2,
"need at least two arguments to Fill");
452 if constexpr (
sizeof...(A) >= 2) {
453 auto t = std::forward_as_tuple(args...);
455 static constexpr std::size_t
N =
sizeof...(A) - 2;
457 throw std::invalid_argument(
"invalid number of arguments to Fill");
459 RWeight weight = std::get<N + 1>(t);
463 static constexpr std::size_t
N =
sizeof...(A) - 1;
465 throw std::invalid_argument(
"invalid number of arguments to Fill");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
A variant of all supported axis types.
A multidimensional range of bin indices.
Histogram statistics of unbinned values.
void Add(const RHistStats &other)
Add all entries from another statistics object.
void Clear()
Clear this statistics object.
void Taint()
Taint this statistics object.
void AddAtomic(const RHistStats &other)
Add all entries from another statistics object using atomic instructions.
void Scale(double factor)
Scale the histogram statistics.
void Fill(const std::tuple< A... > &args)
Fill an entry into this statistics object.
double ComputeNEffectiveEntries() const
Compute the number of effective entries.
void DisableDimension(std::size_t dim)
Disable one dimension of this statistics object.
std::uint64_t GetNEntries() const
double ComputeMean(std::size_t dim=0) const
Compute the arithmetic mean of unbinned values.
double ComputeStdDev(std::size_t dim=0) const
Compute the standard deviation of unbinned values.
A profile histogram, computing statistical quantities of an additional variable per bin.
void Fill(const std::tuple< A... > &args, const V &value, RWeight weight)
Fill an entry into the profile histogram with a weight.
RProfile Clone() const
Clone this profile histogram.
RProfile(const RAxisVariant &axis1, const Axes &...axes)
Construct a profile histogram.
const RProfileBin & GetBinContent(const std::vector< RBinIndex > &indices) const
Get the content of a single bin.
RProfile(std::vector< RAxisVariant > axes)
Construct a profile histogram.
RProfile & operator=(RProfile &&)=default
Efficiently move a profile histogram.
double ComputeStdDev(std::size_t dim=0) const
Compute the standard deviation of unbinned values.
void SetBinContent(const A &...args)
Set the content of a single bin.
double ComputeNEffectiveEntries() const
Compute the number of effective entries.
RProfile & operator=(const RProfile &)=delete
The copy assignment operator is deleted.
void Scale(double factor)
Scale all bin contents and statistics.
RHistStats fStats
The global histogram statistics.
void Fill(const std::tuple< A... > &args, const V &value)
Fill an entry into the profile histogram.
std::size_t GetNDimensions() const
void AddAtomic(const RProfile &other)
Add all bin contents and statistics of another profile histogram using atomic instructions.
void Streamer(TBuffer &)
ROOT Streamer function to throw when trying to store an object of this class.
RProfile(std::uint64_t nNormalBins, std::pair< double, double > interval)
Construct a one-dimensional profile histogram with a regular axis.
void Fill(const A &...args)
Fill an entry into the profile histogram.
const RHistStats & GetStats() const
std::uint64_t GetTotalNBins() const
void Add(const RProfile &other)
Add all bin contents and statistics of another profile histogram.
const std::vector< RAxisVariant > & GetAxes() const
const RProfileBin & GetBinContent(const std::array< RBinIndex, N > &indices) const
Get the content of a single bin.
const RHistEngine< RProfileBin > & GetEngine() const
RProfile(RHistEngine< RProfileBin > engine)
Private constructor based off an engine.
RProfile(const RProfile &)=delete
The copy constructor is deleted.
double ComputeMean(std::size_t dim=0) const
Compute the arithmetic mean of unbinned values.
std::uint64_t GetNEntries() const
RProfile(RProfile &&)=default
Efficiently move construct a profile histogram.
RBinIndexMultiDimRange GetFullMultiDimRange() const
Get the multidimensional range of all bins.
void Clear()
Clear all bin contents and statistics.
void SetBinContent(const std::array< RBinIndex, N > &indices, const V &value)
Set the content of a single bin.
RProfile(std::initializer_list< RAxisVariant > axes)
Construct a profile histogram.
RHistEngine< RProfileBin > fEngine
The histogram engine including the bin contents.
const RProfileBin & GetBinContent(const A &...args) const
Get the content of a single bin.
A regular axis with equidistant bins in the interval .
Buffer base class used for serializing objects.
std::tuple< const Ts &..., const A & > AppendReference(const std::tuple< Ts... > &t, const A &a)
std::enable_if_t< std::is_integral_v< T > > AtomicAdd(T *ptr, T val)
The bin content type of a profile histogram.
RProfileBin & operator+=(const RProfileBin &rhs)
void AtomicAdd(const RProfileBin &rhs)
Add another bin content using atomic instructions.
RProfileBin & operator+=(const RValueWeightWrapper &rhs)
RProfileBin & operator+=(const RValueWrapper &rhs)
RProfileBin & operator*=(double factor)
RValueWeightWrapper(double value, double weight)
RValueWrapper(double value)
A weight for filling histograms.