Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Timur Pocheptsov 17/11/2005
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 *************************************************************************/
12#ifndef ROOT_TGLHistPainter
13#define ROOT_TGLHistPainter
15#include "TVirtualHistPainter.h"
16#include "TGLPlotPainter.h"
17#include "TGLPlotCamera.h"
19#include <memory>
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.
34class TGL5DDataSet;
35class TString;
36class TList;
37class TF3;
38class TH1;
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;
57 TGLHistPainter(TH1 *hist);
62 //TVirtualHistPainter final overriders
64 void DrawPanel();
65 void ExecuteEvent(Int_t event, Int_t px, Int_t py);
66 TList *GetContourList(Double_t contour)const;
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);
83 struct PlotOption_t;
85 PlotOption_t ParsePaintOption(const TString &option)const;
86 void CreatePainter(const PlotOption_t &parsed,
87 const TString &option);
89 void PadToViewport(Bool_t selectionPass = kFALSE);
94 ClassDef(TGLHistPainter, 0) //Proxy class for GL hist painters.
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
Definition: TGLUtil.h:50
1-Dim function class
Definition: TF1.h:211
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.
TGLHistPainter(TH1 *hist)
ROOT does not use exceptions, so, if default painter's creation failed, fDefaultPainter is 0.
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,...
Definition: TGLParametric.h:35
Camera for TGLPlotPainter and sub-classes.
Definition: TGLPlotCamera.h:22
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,...
The TH1 histogram class.
Definition: TH1.h:56
A doubly linked list.
Definition: TList.h:44
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131
Abstract interface to a histogram painter.
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17