Logo ROOT   6.16/01
Reference Guide
RHistDrawable.cxx
Go to the documentation of this file.
1/// \file RHistDrawable.cxx
2/// \ingroup Hist ROOT7
3/// \author Axel Naumann <axel@cern.ch>
4/// \date 2015-09-11
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2015, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
17
18#include "ROOT/RHistImpl.hxx"
19
20#include "TSystem.h" // RSystem::Load
21
22#include <cassert>
23
24using namespace ROOT::Experimental;
25using namespace ROOT::Experimental::Internal;
26
28{
29 gSystem->Load("libHistPainter");
30}
31
32template <int DIMENSION>
34{
35 GetPainterPtr() = this;
36}
37
38template <int DIMENSION>
40{
41 GetPainterPtr() = nullptr;
42}
43
44template <int DIMENSION>
46{
47 static RHistPainterBase<DIMENSION> *painter = nullptr;
48
49 return painter;
50}
51
52template <int DIMENSION>
54{
55 // Trigger loading of the painter library within the init guard of the static:
56 static int triggerLibLoad = (LoadHistPainterLibrary(), 0);
57
58 (void)triggerLibLoad; // unused.
59
60 return GetPainterPtr();
61}
62
63template <class DERIVED>
65{
66 // here should be filling of context menu for the given object
68
69// GCC 5 needs to have that outlined - is that a compiler bug?
70template <int DIMENSIONS>
72
73/// Paint the histogram
74template <int DIMENSIONS>
76{
78}
79
80namespace ROOT {
81namespace Experimental {
82
83namespace Internal {
84template class RHistPainterBase<1>;
85template class RHistPainterBase<2>;
86template class RHistPainterBase<3>;
87} // namespace Internal
88
89template <class DERIVED>
91
95
96template class RHistDrawable<1>;
97template class RHistDrawable<2>;
98template class RHistDrawable<3>;
99} // namespace Experimental
100} // namespace ROOT
typedef void((*Func_t)())
R__EXTERN TSystem * gSystem
Definition: TSystem.h:540
virtual void Paint(RDrawable &obj, const RHistDrawingOpts< DIMENSION > &opts, RPadPainter &pad)=0
Paint a RHist. All we need is access to its GetBinContent()
Abstract interface for object painting on the pad/canvas.
Definition: RPadPainter.hxx:37
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
Definition: TSystem.cxx:1843
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21