Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLHistPainter.h
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Timur Pocheptsov 17/11/2005
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGLHistPainter
13#define ROOT_TGLHistPainter
14
15#include "TVirtualHistPainter.h"
16#include "TGLPlotPainter.h"
17#include "TGLPlotCamera.h"
18
19#include <memory>
20
21/*
22 TGLHistPainter is a proxy class. It inherits TVirtualHistPainter and
23 overrides its virtual functions, but all actual work is done by :
24 THistPainter - I name it "default" painter, it's the member of type
25 TVirtualHistPainter * and loaded via plugin-manager;
26 TGLLegoPainter - it draws different legos (lego/lego1/lego2/lego3);
27 TGLSurfacePainter - supports surfaces (surf/surf1/surf2/surf3/surf4/surf5);
28 TGLBoxPainter - box option for TH3;
29 TGLTF3Painter - TF3.
30*/
31
34class TGL5DDataSet;
35class TString;
36class TList;
37class TF3;
38class TH1;
39
41private:
42 //Dynamic type is THistPainter, no problems with simultaneous inheritance and membership
43 //TGLHistPainter delegates unsupported options/calls to this object
44 std::unique_ptr<TVirtualHistPainter> fDefaultPainter;
45 //This member can have different dynamic types: TGLLegoPainter, etc.
46 std::unique_ptr<TGLPlotPainter> fGLPainter;
47
55
56public:
57 TGLHistPainter(TH1 *hist);
61
62 //TVirtualHistPainter final overriders
64 void DrawPanel();
65 void ExecuteEvent(Int_t event, Int_t px, Int_t py);
67 char *GetObjectInfo(Int_t px, Int_t py)const;
68 TList *GetStack()const;
71 void Paint(Option_t *option);
72 void PaintStat(Int_t dostat, TF1 *fit);
73 void ProcessMessage(const char *message, const TObject *obj);
74 void SetHighlight();
75 void SetHistogram(TH1 *hist);
76 void SetStack(TList *stack);
77 Int_t MakeCuts(char *cutsOpt);
78 void SetShowProjection(const char *option, Int_t nbins);
79
81private:
82
83 struct PlotOption_t;
84
85 PlotOption_t ParsePaintOption(const TString &option)const;
86 void CreatePainter(const PlotOption_t &parsed,
87 const TString &option);
88
89 void PadToViewport(Bool_t selectionPass = kFALSE);
90
93
94 ClassDef(TGLHistPainter, 0) //Proxy class for GL hist painters.
95};
96
97#endif
RooFitResult * fit(const char *options)
RooPlot * contour(RooRealVar &var1, RooRealVar &var2, double n1=1, double n2=2, double n3=0.0, double n4=0.0, double n5=0.0, double n6=0.0)
bool Bool_t
Definition RtypesCore.h:63
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
EGLPlotType
Definition TGLUtil.h:51
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
1-Dim function class
Definition TF1.h:213
A 3-Dim function with parameters.
Definition TF3.h:28
The histogram painter class using OpenGL.
void DrawPanel()
Default implementation is OK This function is called from a context menu after right click on a plot'...
EGLPlotType fPlotType
TGLPlotCoordinates fCoord
PlotOption_t ParsePaintOption(const TString &option) const
In principle, we can have several conflicting options: "lego surf pol sph", surfbb: surf,...
void CreatePainter(const PlotOption_t &parsed, const TString &option)
Create painter.
char * GetObjectInfo(Int_t px, Int_t py) const
Overrides TObject::GetObjectInfo.
void SetHistogram(TH1 *hist)
Set histogram.
void SetStack(TList *stack)
Set stack.
Bool_t IsInside(Int_t x, Int_t y)
Returns kTRUE if the cell ix, iy is inside one of the graphical cuts.
void Paint(Option_t *option)
Final-overrider for TObject::Paint.
void PadToViewport(Bool_t selectionPass=kFALSE)
void ProcessMessage(const char *message, const TObject *obj)
Process message.
std::unique_ptr< TGLPlotPainter > fGLPainter
TGLHistPainter & operator=(const TGLHistPainter &)
void PaintStat(Int_t dostat, TF1 *fit)
Paint statistics.
Int_t MakeCuts(char *cutsOpt)
Make cuts.
TGLPlotPainter * GetRealPainter()
std::unique_ptr< TVirtualHistPainter > fDefaultPainter
void SetHighlight()
Set highlight mode.
TGLPlotCamera fCamera
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute event.
TList * GetContourList(Double_t contour) const
Get contour list.
Int_t DistancetoPrimitive(Int_t px, Int_t py)
Selects plot or axis.
TList * GetStack() const
Get stack.
TGLParametricEquation * fEq
TGLHistPainter(const TGLHistPainter &)
void SetShowProjection(const char *option, Int_t nbins)
Set show projection.
A parametric surface is a surface defined by a parametric equation, involving two parameters (u,...
Camera for TGLPlotPainter and sub-classes.
Helper class for plot-painters holding information about axis ranges, numbers of bins and flags if ce...
Base class for plot-painters that provide GL rendering of various 2D and 3D histograms,...
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
Abstract interface to a histogram painter.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17