ROOT  6.06/09
Reference Guide
THistPainter.cxx
Go to the documentation of this file.
1 /// \file ROOT/THistPainter.cxx
2 /// \ingroup HistPainter ROOT7
3 /// \author Axel Naumann <axel@cern.ch>
4 /// \date 2015-07-09
5 /// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
6 
7 /*************************************************************************
8  * Copyright (C) 1995-2015, Rene Brun and Fons Rademakers. *
9  * All rights reserved. *
10  * *
11  * For the licensing terms see $ROOTSYS/LICENSE. *
12  * For the list of contributors see $ROOTSYS/README/CREDITS. *
13  *************************************************************************/
14 
15 #include <iostream>
16 #include "ROOT/THistDrawable.h"
17 
18 using namespace ROOT;
19 using namespace ROOT::Internal;
20 
21 namespace {
22 class THistPainter1D: public THistPainterBase<1> {
23 public:
24  void Paint(TDrawable& hist, THistDrawOptions<1> /*opts*/) final {
25  // TODO: paint!
26  std::cout << "Painting histogram @" << &hist << '\n';
27  }
28  virtual ~THistPainter1D() final {}
29 };
30 
31 class THistPainter2D: public THistPainterBase<2> {
32 public:
33  void Paint(TDrawable& hist, THistDrawOptions<2> /*opts*/) final {
34  // TODO: paint!
35  std::cout << "Painting histogram @" << &hist << '\n';
36  }
37  virtual ~THistPainter2D() final {}
38 };
39 
40 class THistPainter3D: public THistPainterBase<3> {
41 public:
42  void Paint(TDrawable& hist, THistDrawOptions<3> /*opts*/) final {
43  // TODO: paint!
44  std::cout << "Painting histogram @" << &hist << '\n';
45  }
46  virtual ~THistPainter3D() final {}
47 };
48 
49 
50 struct HistPainterReg {
51  THistPainter1D fPainter1D;
52  THistPainter2D fPainter2D;
53  THistPainter3D fPainter3D;
54 } histPainterReg;
55 } // unnamed namespace
Base class for drawable entities: objects that can be painted on a TPad.
Definition: TDrawable.h:25
Namespace for new ROOT classes and functions.
Definition: ROOT.py:1
Drawing options for a histogram with DIMENSIONS.