16 #ifndef ROOT7_THistView 17 #define ROOT7_THistView 22 namespace Experimental {
40 template <
class HISTVIEW>
43 bool operator()(
int idx) {
return fHistView.IsBinOutOfRange(idx); }
50 template <
int DIMENSIONS,
class PRECISION,
template <
int D_,
class P_,
template <
class P__>
class S_>
class... STAT>
64 return idx < 0 || idx > fNBins;
67 void SetRange(
int axis,
double from,
double to)
69 TAxisView axisView = fHist.GetImpl()->GetAxis(axis);
70 fRange[axis] = axisView.
FindBin(from);
71 fRange[axis] = axisView.
FindBin(to);
77 size_t nbins = fHist.GetNBins();
78 while (IsBinOutOfRange(beginidx) && beginidx < nbins)
void SetRange(int axis, double from, double to)
Namespace for new ROOT classes and functions.
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