16#ifndef ROOT7_RHistDrawable
17#define ROOT7_RHistDrawable
28namespace Experimental {
30template <
int DIMENSIONS,
class PRECISION,
template <
int D_,
class P_>
class... STAT>
34template <
int DIMENSIONS>
35class RHistImplPrecisionAgnosticBase;
42template <
int DIMENSION>
63template <
class DERIVED>
76template <
int DIMENSIONS>
90 : fHistImpl(std::shared_ptr<HistImpl_t>(hist, hist->GetImpl())), fOpts(opts)
95 : fHistImpl(std::unique_ptr<HistImpl_t>(std::move(*hist).TakeImpl())), fOpts(opts)
99 void Paint(Internal::RPadPainter &pad)
final;
105extern template class RHistDrawableBase<RHistDrawable<1>>;
106extern template class RHistDrawableBase<RHistDrawable<2>>;
107extern template class RHistDrawableBase<RHistDrawable<3>>;
109extern template class RHistDrawable<1>;
110extern template class RHistDrawable<2>;
111extern template class RHistDrawable<3>;
115template <
int DIMENSIONS,
class PRECISION,
template <
int D_,
class P_>
class... STAT>
116std::shared_ptr<RHistDrawable<DIMENSIONS>>
120 return std::make_unique<RHistDrawable<DIMENSIONS>>(hist, opts);
124template <
int DIMENSIONS,
class PRECISION,
template <
int D_,
class P_>
class... STAT>
125std::shared_ptr<RHistDrawable<DIMENSIONS>>
129 return std::make_unique<RHistDrawable<DIMENSIONS>>(std::move(hist), opts);
Base class for RHistImplBase that abstracts out the histogram's PRECISION.
virtual ~RHistPainterBase()
static RHistPainterBase< DIMENSION > *& GetPainterPtr()
virtual void Paint(RDrawable &obj, const RHistDrawingOpts< DIMENSION > &opts, RPadPainter &pad)=0
Paint a RHist. All we need is access to its GetBinContent()
static RHistPainterBase< DIMENSION > * GetPainter()
Abstract interface for object painting on the pad/canvas.
Base class for drawable entities: objects that can be painted on a RPad.
void Execute(const std::string &) final
virtual ~RHistDrawableBase()
RHistDrawable(const std::shared_ptr< HIST > &hist, const RHistDrawingOpts< DIMENSIONS > &opts={})
RHistDrawable(std::unique_ptr< HIST > &&hist, const RHistDrawingOpts< DIMENSIONS > &opts={})
const RHistDrawingOpts< DIMENSIONS > & GetOptions() const
RHistDrawingOpts< DIMENSIONS > & GetOptions()
RHistDrawingOpts< DIMENSIONS > fOpts
Internal::TUniWeakPtr< HistImpl_t > fHistImpl
Histogram class for histograms with DIMENSIONS dimensions, where each bin count is stored by a value ...
void LoadHistPainterLibrary()
std::shared_ptr< RPadDrawable > GetDrawable(std::unique_ptr< RPad > &&pad, ARGS... args)
Namespace for new ROOT classes and functions.