]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCCalibViewerGUI.h
Adding new functionality to the AliTPCCalibViewer
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibViewerGUI.h
CommitLineData
72d0ab7e 1#ifndef ALITPCCALIBVIEWERGUI_H
2#define ALITPCCALIBVIEWERGUI_H
39bcd65d 3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id: AliTPCCalibViewerGUI.h,v */
8
9///////////////////////////////////////////////////////////////////////////////
10// //
11// GUI for the AliTPCCalibViewer //
12// used for the calibration monitor //
13// //
14///////////////////////////////////////////////////////////////////////////////
15
16#ifndef ROOT_TGButton
17#include "TGWidget.h"
18#endif
19#ifndef ROOT_TGFrame
20#include "TGFrame.h"
21#endif
22
23#include <TGButton.h>
24#include <TGListBox.h>
25#include <TGComboBox.h>
26#include <TGNumberEntry.h>
27#include <TRootEmbeddedCanvas.h>
28#include <TGSplitter.h>
29#include <TGButtonGroup.h>
a6d2bd0c 30#include <TGLabel.h>
31#include <TGTab.h>
72d0ab7e 32class AliTPCCalibViewer;
a6d2bd0c 33
39bcd65d 34
72d0ab7e 35// class TGListBox;
36// class TGNumberEntry;
37// class TGSplitter;
38// class TGTab;
39// class TGWidget; // ???
40// class TGLabel;
41// class TGButtonGroup;
42// class TGComboBox;
43// class TRootEmbeddedCanvas;
44// class TGButton;
45// class TGRadioButton;
46// class TGCheckButton;
47// class TGTextEntry;
48
49
50class AliTPCCalibViewerGUI : public TGCompositeFrame {
51
52public:
53 AliTPCCalibViewerGUI(const TGWindow *p, UInt_t w, UInt_t h, char* fileName); // constructor; fileName specifies the ROOT tree used for drawing
54 AliTPCCalibViewerGUI(const AliTPCCalibViewerGUI &c); // copy constructor
55 AliTPCCalibViewerGUI &operator = (const AliTPCCalibViewerGUI &param); // assignment operator
39bcd65d 56
72d0ab7e 57 virtual ~AliTPCCalibViewerGUI();
58 // virtual void CloseWindow();
39bcd65d 59
72d0ab7e 60 void HandleButtonsGeneral(Int_t id = -1); // handles mutual radio button exclusions for general Tab
61 void HandleButtons1D(Int_t id = -1); // handles mutual radio button exclusions for 1D Tab
62 void HandleButtons2D(Int_t id = -1); // handles mutual radio button exclusions for 2D Tab
63 void HandleButtonsStat(Int_t id = -1); // handles statistic check boxes
64 void HandleButtonsRight(Int_t id = -1); // handles mutual radio button exclusions for right side
65 void DoNewSelection(); // decides whether to redraw if user makes another selection
66 void DoDraw(); // main method for drawing according to user selection
67 void DoFit(); // main method for fitting
68 void GetMinMax(); // Read current Min & Max from the plot and set it to fTxtSetMin & fTxtSetMax
69 void ChangeSector(); // function that is called, when the number of the sector is changed
70 void AddFitFunction() const; // adds the last fit function to the normalization list
71 static void ShowGUI(const char* fileName); //initialize and show GUI for presentation
72
73
39bcd65d 74protected:
75 AliTPCCalibViewer *fViewer; // CalibViewer object used for drawing
76
a6d2bd0c 77 TGCompositeFrame *fContTopBottom; // container for all GUI elements, vertical divided
78 TGCompositeFrame *fContLCR; // container for all GUI elements, horizontal divided
39bcd65d 79 TGCompositeFrame *fContLeft; // container for GUI elements on left side
72d0ab7e 80 TGTab *ftabLeft; // Tabs on the left side for plot options
81 TGCompositeFrame *ftabLeft0; // Tab 0 on the left side for general plot options
82 TGCompositeFrame *ftabLeft1; // Tab 1 on the left side for 1D plot options
39bcd65d 83 TGCompositeFrame *fContRight; // container for GUI elements on right side
84 TGCompositeFrame *fContCenter; // container for GUI elements at the center
85 TGCompositeFrame *fContPlotOpt; // container for plot options GUI elements
86 TGCompositeFrame *fContDrawOpt; // container for draw options GUI elements
a6d2bd0c 87 TGCompositeFrame *fContDrawOptSub1D2D; // container for 1D and 2D radio-button
39bcd65d 88 TGCompositeFrame *fContNormalized; // container for normalization options GUI elements
89 TGCompositeFrame *fContCustom; // container for custom draw command GUI elements
90 TGCompositeFrame *fContCuts; // container for cut options GUI elements
91 TGCompositeFrame *fContSector; // container for sector GUI elements
92 TGCompositeFrame *fContAddCuts; // container for additional cut command GUI elements
a6d2bd0c 93 TGCompositeFrame *fContFit; // container for fit GUI elements
94 TGCompositeFrame *fContAddFit; // container for additional fit GUI elements
95 TGCompositeFrame *fContScaling; // container for scaling GUI elements
96 TGCompositeFrame *fContSetMax; // container for SetMaximum elements
97 TGCompositeFrame *fContSetMin; // container for SetMinimum elements
72d0ab7e 98 TGCompositeFrame *fContAddDrawOpt; // additional draw options container
39bcd65d 99 TGListBox *fListVariables; // listbox with possible variables
100 TGTextButton *fBtnDraw; // draw button
a6d2bd0c 101 TGTextButton *fBtnFit; // fit button
102 TGTextButton *fBtnAddFitFunction; // button to add fit function to normalization
103 TGTextButton *fBtnGetMinMax; // GetMinMax-button
39bcd65d 104 TRootEmbeddedCanvas *fCanvMain; // main drawing canvas
105 TGRadioButton *fRadioRaw; // raw radio button
106 TGRadioButton *fRadioNormalized; // normalized radio button
a6d2bd0c 107 TGRadioButton *fRadioPredefined; // predefined plot radio button
39bcd65d 108 TGRadioButton *fRadioCustom; // custom radio button
109 TGRadioButton *fRadio1D; // 1D radio button
110 TGRadioButton *fRadio2D; // 2D radio button
111 TGRadioButton *fRadioTPC; // TPC radio button
112 TGRadioButton *fRadioSideA; // side A radio button
113 TGRadioButton *fRadioSideC; // side C radio button
114 TGRadioButton *fRadioSector; // sector radio button
72d0ab7e 115 TGComboBox *fComboAddDrawOpt; // additional draw options combo box
39bcd65d 116 TGCheckButton *fChkAuto; // automatic redraw checkbox
117 TGComboBox *fComboMethod; // normalization methods dropdown box
118 TGListBox *fListNormalization; // listbox with possible normalization variables
a6d2bd0c 119 TGComboBox *fComboCustom; // combo box for custom draw commands
72d0ab7e 120 TGCheckButton *fChkAddDrawOpt; // additional draw options check box
39bcd65d 121 TGNumberEntry *fNmbSector; // number entry box for specifying the sector
a6d2bd0c 122 TGLabel *fLblSector; // label that shows the active sector
72d0ab7e 123 TGCheckButton *fChkCutZero; // cut zeros check box
39bcd65d 124 TGCheckButton *fChkAddCuts; // additional cuts check box
a6d2bd0c 125 TGComboBox *fComboAddCuts; // additional cuts combo box
126 TGComboBox *fComboCustomFit; // custom fit combo box
127 TGCheckButton *fChkSetMax; // Set maximum check box
128 TGCheckButton *fChkSetMin; // Set maximum check box
129 TGCheckButton *fChkGetMinMaxAuto; // Get Min & Max automatically from plot
130 TGTextEntry *fTxtSetMax; // custom maximum text box
131 TGTextEntry *fTxtSetMin; // custom minimum text box
72d0ab7e 132 TGGroupFrame *fContDrawOpt1D; // container in tabLeft1
133 TGCompositeFrame *fcontDrawOpt1DSubLR; // container in tabLeft1 to divide L/R
134 TGCompositeFrame *fContDrawOpt1DSubNSC; // container in tabLeft1 for following radio buttons
135 TGRadioButton *fRadioNorm; // radio button for normal 1D drawing
136 TGRadioButton *fRadioSigma; // radio button for sigma 1D drawing
137 TGTextEntry *fTxtSigmas; // text box to specify sigmas
138 TGCompositeFrame *fContCumuLR; // container in tabLeft1 for two colums for cumulative and integrative
139 TGCompositeFrame *fContCumLeft; // container in tabLeft1 for cumulative, left
140 TGCompositeFrame *fContCumRight; // container in tabLeft1 for cumulative, right
141 TGLabel *fLblSigmaMax; // label to indicate sigmaMax
142 TGTextEntry *fTxtSigmaMax; // text box to specify sigmaMax
143 TGRadioButton *fRadioCumulative; // radio button for cumulative 1D drawing
144 TGCheckButton *fCheckCumulativePM; // checkbox for plus/minus cumulative 1D drawing
145 TGRadioButton *fRadioIntegrate; // radio button for integral 1D drawing
146 TGCompositeFrame *fContDrawOpt1DSubMML; // container in tabLeft1 for following check boxes
147 TGCheckButton *fChkMean; // checkbox to plot mean
148 TGCheckButton *fChkMedian; // checkbox to plot median
149 TGCheckButton *fChkLTM; // checkbox to plot LTM
150 TGGroupFrame *fContStatOpt; // container for statistic options in tabLeft1
151 TGCheckButton *fChkStatName; // checkbox to display histogram name in statistic legend
152 TGCheckButton *fChkStatEntries; // checkbox to display entries in statistic legend
153 TGCompositeFrame *fContStatMean; // container for mean and its error in stat opt
154 TGCheckButton *fChkStatMean; // checkbox to display mean in statistic legend
155 TGCheckButton *fChkStatMeanPM; // checkbox to display mean error in statistic legend
156 TGCompositeFrame *fContStatRMS; // container for RMS and its error in stat opt
157 TGCheckButton *fChkStatRMS; // checkbox to display RMS in statistic legend
158 TGCheckButton *fChkStatRMSPM; // checkbox to display RMS error in statistic legend
159 TGCheckButton *fChkStatUnderflow; // checkbox to display underflow error in statistic legend
160 TGCheckButton *fChkStatOverflow; // checkbox to display overflow error in statistic legend
161 TGCheckButton *fChkStatIntegral; // checkbox to display integral in statistic legend
162 TGCompositeFrame *fContStatSkew; // container for skewness and its error in stat opt
163 TGCheckButton *fChkStatSkewness; // checkbox to display skewness in statistic legend
164 TGCheckButton *fChkStatSkewnessPM; // checkbox to display skewness error in statistic legend
165 TGCompositeFrame *fContStatKurt; // container for kurtosis and its error in stat opt
166 TGCheckButton *fChkStatKurtosis; // checkbox to display kurtosis in statistic legend
167 TGCheckButton *fChkStatKurtosisPM; // checkbox to display kurtosis error in statistic legend
a6d2bd0c 168
39bcd65d 169 void Initialize(char* fileName); // initializes the GUI with default settings and opens tree for drawing
170
39bcd65d 171 ClassDef(AliTPCCalibViewerGUI, 0)
172};
173
174#endif