5#ifndef ROOT_RProfileFillContext
6#define ROOT_RProfileFillContext
18namespace Experimental {
42 const auto &stats = profile.
GetStats();
43 for (std::size_t i = 0; i < stats.GetNDimensions(); i++) {
44 if (!stats.IsEnabled(i)) {
68 template <
typename... A,
typename V>
69 void Fill(
const std::tuple<A...> &args,
const V &
value)
89 template <
typename... A,
typename V>
110 template <
typename... A>
113 static_assert(
sizeof...(A) >= 2,
"need at least two arguments to Fill");
114 if constexpr (
sizeof...(A) >= 2) {
115 auto t = std::forward_as_tuple(args...);
117 static constexpr std::size_t
N =
sizeof...(A) - 2;
119 throw std::invalid_argument(
"invalid number of arguments to Fill");
121 RWeight weight = std::get<N + 1>(t);
125 static constexpr std::size_t
N =
sizeof...(A) - 1;
127 throw std::invalid_argument(
"invalid number of arguments to Fill");
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
Histogram statistics of unbinned values.
void Clear()
Clear this statistics object.
void AddAtomic(const RHistStats &other)
Add all entries from another statistics object using atomic instructions.
void Fill(const std::tuple< A... > &args)
Fill an entry into this statistics object.
void DisableDimension(std::size_t dim)
Disable one dimension of this statistics object.
A histogram filler to concurrently fill an RProfile.
A context to concurrently fill an RProfile.
RProfileFillContext & operator=(RProfileFillContext &&)=default
void Fill(const std::tuple< A... > &args, const V &value)
Fill an entry into the profile histogram.
RProfileFillContext(const RProfileFillContext &)=delete
void Fill(const A &...args)
Fill an entry into the profile histogram.
void Fill(const std::tuple< A... > &args, const V &value, RWeight weight)
Fill an entry into the profile histogram with a weight.
void Flush()
Flush locally accumulated entries to the profile histogram.
RProfileFillContext(RProfile &profile)
RProfileFillContext & operator=(const RProfileFillContext &)=delete
RProfile * fProfile
A pointer to the filled profile histogram.
RProfileFillContext(RProfileFillContext &&)=default
RHistStats fStats
Local histogram statistics.
A profile histogram, computing statistical quantities of an additional variable per bin.
RHistStats fStats
The global histogram statistics.
std::size_t GetNDimensions() const
const RHistStats & GetStats() const
RHistEngine< RProfileBin > fEngine
The histogram engine including the bin contents.
std::tuple< const Ts &..., const A & > AppendReference(const std::tuple< Ts... > &t, const A &a)
A weight for filling histograms.