15 #ifndef ROOT7_THistView 16 #define ROOT7_THistView 21 namespace Experimental {
39 template <
class HISTVIEW>
42 bool operator()(
int idx) {
return fHistView.IsBinOutOfRange(idx); }
50 template <
int D_,
class P_,
template <
class P__>
class S_>
class... STAT>
60 fHist(hist), fNBins(nbins), fRange(range) {}
64 return idx < 0 || idx > fNBins;
67 void SetRange(
int axis,
double from,
double to) {
68 TAxisView axisView = fHist.GetImpl()->GetAxis(axis);
69 fRange[axis] = axisView.
FindBin(from);
70 fRange[axis] = axisView.
FindBin(to);
75 size_t nbins = fHist.GetNBins();
76 while (IsBinOutOfRange(beginidx) && beginidx < nbins)
82 return const_iterator(fHist.GetImpl(), fHist.GetImpl().GetNBins());
void SetRange(int axis, double from, double to)
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
typename Hist_t::AxisIterRange_t AxisRange_t
Iterates over the bins of a THist or THistImpl.
int FindBin(double x) const noexcept
Find the bin containing coordinate x. Forwards to the underlying axis.
Common view on a TAxis, no matter what its kind.
A view on a histogram, selecting a range on a subset of dimensions.
const_iterator begin() const noexcept
const_iterator end() const noexcept
Histogram class for histograms with DIMENSIONS dimensions, where each bin count is stored by a value ...
std::array< AxisIter_t< NDIM >, 2 > AxisIterRange_t
Range over n dimensional axes - a pair of arrays of n axis iterators.
THistView(Hist_t &hist, int nbins, const AxisRange_t &range)
bool IsBinOutOfRange(int idx) const noexcept