KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVCanvas.h
1
3
4#ifndef __KVCanvas_H
5#define __KVCanvas_H
6
7#include "TCanvas.h"
8#include "TH2.h"
9#include "TGFrame.h"
10#include "TList.h"
11#include "TGFileDialog.h"
12#include "TSystem.h"
13#include "TGClient.h"
14
54class KVCanvas : public TCanvas {
55 friend class KVKeyHandler;
56
57protected:
68
77
82
85
86public:
87 KVCanvas();
89 KVCanvas(const char* name, const char* title, Int_t ww, Int_t wh, Bool_t keyHandler = kTRUE);
90 KVCanvas(const char* name, Int_t ww, Int_t wh, Int_t winid);
91 virtual ~KVCanvas();
92
94 Bool_t IsLogz();
95 Bool_t IsLogy();
96 Bool_t IsLogx();
97
98 void DisableClass(const char* className);
99 void DisableObject(TObject* obj);
100 void ResetDisabledClass();
101 void ResetDisabledObject();
102
103 void FreezCavans(Bool_t freez)
104 {
105 fFreezed = freez;
106 }
107 void ShowShortcutsInfos(); // *MENU*
108
109 void SetVenerMode(Int_t value = 1); // *TOGGLE*
111 {
112 return fVenerMode;
113 }
114
115 void SetEnabledShortcuts(Int_t value = 1); // *TOGGLE*
117 {
118 return fEnabledShortcuts;
119 }
120
121protected:
122
124 virtual Bool_t HandleKey(Int_t, Int_t py);
125
126 void DynamicZoom(Int_t Sign, Int_t px, Int_t py);
127 void DynamicZoomTH1(Int_t Sign, Int_t px, Int_t py);
128 void RunAutoExec();
129 void DrawEventStatus(Int_t event, Int_t px, Int_t py, TObject* selected);
130 void ZoomSelected(TH2* TheHisto);
131
132 void MoveAxis(TAxis* ax, Int_t sign);
133 void ProfileX(TH2* hh);
134 void ProfileY(TH2* hh);
135 void ProjectionX(TH2* hh);
136 void ProjectionY(TH2* hh);
137
138 void SaveCanvasAs();
140 TH1* FindHisto();
141
142 void InitInfos();
143 void AddShortcutsInfo(const char* cut, const char* desc);
144
145 ClassDef(KVCanvas, 1) //TCanvas with mouse-controlled dynamic zoom and pan & scan
146};
147
149R__EXTERN TObject* gCopyObject;
150
151#endif
EEventType
int Int_t
#define R__EXTERN
bool Bool_t
double Double_t
#define ClassDef(name, id)
TCanvas with mouse-controlled dynamic zoom and pan & scan.
Definition KVCanvas.h:54
void ShowShortcutsInfos()
void ProjectionY(TH2 *hh)
Int_t Xlast0
number of bins on x-axis, initial displayed bins
Definition KVCanvas.h:63
TString fSavedAs
Definition KVCanvas.h:81
Bool_t IsLogy()
Definition KVCanvas.cpp:106
Bool_t IsLogz()
Definition KVCanvas.cpp:97
void AddShortcutsInfo(const char *cut, const char *desc)
Bool_t fFreezed
Definition KVCanvas.h:84
void MoveAxis(TAxis *ax, Int_t sign)
Double_t XbinPixel
Definition KVCanvas.h:66
void FreezCavans(Bool_t freez)
Definition KVCanvas.h:103
TList fShortCuts
Definition KVCanvas.h:79
Double_t ymin
Definition KVCanvas.h:58
Int_t fEnabledShortcuts
Definition KVCanvas.h:80
TAxis * theXaxis
Definition KVCanvas.h:65
Double_t ymax
Definition KVCanvas.h:58
Int_t Xf1
Definition KVCanvas.h:67
Bool_t fVenerMode
Definition KVCanvas.h:73
Bool_t fPPressed
Definition KVCanvas.h:70
Bool_t ExpandFunctionRange()
void DisableObject(TObject *obj)
Definition KVCanvas.cpp:170
Double_t oldx
Definition KVCanvas.h:59
Bool_t IsLogx()
Definition KVCanvas.cpp:115
void HandleInput(EEventType event, Int_t px, Int_t py)
Definition KVCanvas.cpp:221
Int_t X0
! variables for pan & scan
Definition KVCanvas.h:61
void DisableClass(const char *className)
Definition KVCanvas.cpp:139
Int_t NdisYbins
number of displayed bins on X & Y
Definition KVCanvas.h:62
Bool_t fHasDisabledClasses
Definition KVCanvas.h:74
Int_t NYbins
Definition KVCanvas.h:64
Bool_t fJPressed
Definition KVCanvas.h:71
void ResetDisabledObject()
Definition KVCanvas.cpp:160
void ProfileY(TH2 *hh)
virtual ~KVCanvas()
Definition KVCanvas.cpp:51
TAxis * theYaxis
the axes of the histogram
Definition KVCanvas.h:65
void RunAutoExec()
Execute the list of TExecs in the current pad.
Definition KVCanvas.cpp:125
Int_t Ylast0
number of bins on y-axis, initial displayed bins
Definition KVCanvas.h:64
Int_t Yfirst0
Definition KVCanvas.h:64
void SetEnabledShortcuts(Int_t value=1)
TList fDisabledObjects
Definition KVCanvas.h:78
TString fDisabledClasses
Definition KVCanvas.h:75
void DrawEventStatus(Int_t event, Int_t px, Int_t py, TObject *selected)
Definition KVCanvas.cpp:185
void ProfileX(TH2 *hh)
Double_t xmax
Definition KVCanvas.h:58
void InitInfos()
Int_t NdisXbins
Definition KVCanvas.h:62
Int_t Yf1
Definition KVCanvas.h:67
Bool_t fAgeOfEmpire
Definition KVCanvas.h:72
TGFrame * fKeyHandler
handler for keys
Definition KVCanvas.h:83
Double_t xmin
Definition KVCanvas.h:58
Int_t Xl1
Definition KVCanvas.h:67
void ZoomSelected(TH2 *TheHisto)
Definition KVCanvas.cpp:659
void DynamicZoomTH1(Int_t Sign, Int_t px, Int_t py)
Zoom in or out of histogram with mouse wheel.
Definition KVCanvas.cpp:683
Int_t GetEnabledShortcuts()
Definition KVCanvas.h:116
TH1 * FindHisto()
void SetVenerMode(Int_t value=1)
Double_t oldy
Definition KVCanvas.h:59
Double_t YbinPixel
size of bins in pixels
Definition KVCanvas.h:66
Int_t Xfirst0
Definition KVCanvas.h:63
virtual Bool_t HandleKey(Int_t, Int_t py)
virtual Bool_t HandleKey(Event_t* /*event*‍/){return kTRUE;}
Definition KVCanvas.cpp:778
void DynamicZoom(Int_t Sign, Int_t px, Int_t py)
Definition KVCanvas.cpp:722
void ResetDisabledClass()
Definition KVCanvas.cpp:150
Int_t Y0
coordinates of initial click in pad pixels
Definition KVCanvas.h:61
Int_t Yl1
last modification to axis limits
Definition KVCanvas.h:67
Int_t GetVenerMode()
Definition KVCanvas.h:110
void SaveCanvasAs()
Int_t NXbins
Definition KVCanvas.h:63
Bool_t fHasDisabledObject
Definition KVCanvas.h:76
void ProjectionX(TH2 *hh)
Bool_t moved
Definition KVCanvas.h:69
Utility class to redirect keyboard events to KVCanvas.