1 #ifndef ALITPCCALIBVIEWERGUI_H
2 #define ALITPCCALIBVIEWERGUI_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 /* $Id: AliTPCCalibViewerGUI.h,v */
9 ///////////////////////////////////////////////////////////////////////////////
11 // GUI for the AliTPCCalibViewer //
12 // used for the calibration monitor //
14 ///////////////////////////////////////////////////////////////////////////////
24 #include <TGListBox.h>
25 #include <TGComboBox.h>
26 #include <TGNumberEntry.h>
27 #include <TRootEmbeddedCanvas.h>
28 #include <TGSplitter.h>
29 #include <TGButtonGroup.h>
32 class AliTPCCalibViewer;
36 // class TGNumberEntry;
39 // class TGWidget; // ???
41 // class TGButtonGroup;
43 // class TRootEmbeddedCanvas;
45 // class TGRadioButton;
46 // class TGCheckButton;
50 class AliTPCCalibViewerGUI : public TGCompositeFrame {
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 ¶m); // assignment operator
57 virtual ~AliTPCCalibViewerGUI();
58 // virtual void CloseWindow();
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 SavePicture(); // method for saving
69 void GetMinMax(); // Read current Min & Max from the plot and set it to fTxtSetMin & fTxtSetMax
70 void ChangeSector(); // function that is called, when the number of the sector is changed
71 void AddFitFunction() const; // adds the last fit function to the normalization list
72 static void ShowGUI(const char* fileName); //initialize and show GUI for presentation
76 AliTPCCalibViewer *fViewer; // CalibViewer object used for drawing
78 TGCompositeFrame *fContTopBottom; // container for all GUI elements, vertical divided
79 TGCompositeFrame *fContLCR; // container for all GUI elements, horizontal divided
80 TGCompositeFrame *fContLeft; // container for GUI elements on left side
81 TGTab *ftabLeft; // Tabs on the left side for plot options
82 TGCompositeFrame *ftabLeft0; // Tab 0 on the left side for general plot options
83 TGCompositeFrame *ftabLeft1; // Tab 1 on the left side for 1D plot options
84 TGTab *ftabRight; // Tabs on the right side
85 TGCompositeFrame *fTabRight0; // Tab 0 on the right side for basic
86 TGCompositeFrame *fTabRight1; // Tab 1 on the right side for advanced
87 TGCompositeFrame *fContRight; // container for GUI elements on right side
88 TGCompositeFrame *fContCenter; // container for GUI elements at the center
89 TGCompositeFrame *fContPlotOpt; // container for plot options GUI elements
90 TGCompositeFrame *fContDrawOpt; // container for draw options GUI elements
91 TGCompositeFrame *fContDrawOptSub1D2D; // container for 1D and 2D radio-button
92 TGCompositeFrame *fContNormalized; // container for normalization options GUI elements
93 TGCompositeFrame *fContCustom; // container for custom draw command GUI elements
94 TGCompositeFrame *fContCuts; // container for cut options GUI elements
95 TGCompositeFrame *fContSector; // container for sector GUI elements
96 TGCompositeFrame *fContAddCuts; // container for additional cut command GUI elements
97 TGCompositeFrame *fContFit; // container for fit GUI elements
98 TGCompositeFrame *fContAddFit; // container for additional fit GUI elements
99 TGCompositeFrame *fContScaling; // container for scaling GUI elements
100 TGCompositeFrame *fContSetMax; // container for SetMaximum elements
101 TGCompositeFrame *fContSetMin; // container for SetMinimum elements
102 TGCompositeFrame *fContAddDrawOpt; // additional draw options container
103 TGListBox *fListVariables; // listbox with possible variables
104 TGTextButton *fBtnDraw; // draw button
105 TGTextButton *fBtnFit; // fit button
106 TGTextButton *fBtnAddFitFunction; // button to add fit function to normalization
107 TGTextButton *fBtnGetMinMax; // GetMinMax-button
108 TRootEmbeddedCanvas *fCanvMain; // main drawing canvas
109 TGRadioButton *fRadioRaw; // raw radio button
110 TGRadioButton *fRadioNormalized; // normalized radio button
111 TGRadioButton *fRadioPredefined; // predefined plot radio button
112 TGRadioButton *fRadioCustom; // custom radio button
113 TGRadioButton *fRadio1D; // 1D radio button
114 TGRadioButton *fRadio2D; // 2D radio button
115 TGRadioButton *fRadioTPC; // TPC radio button
116 TGRadioButton *fRadioSideA; // side A radio button
117 TGRadioButton *fRadioSideC; // side C radio button
118 TGRadioButton *fRadioSector; // sector radio button
119 TGComboBox *fComboAddDrawOpt; // additional draw options combo box
120 TGCheckButton *fChkAuto; // automatic redraw checkbox
121 TGComboBox *fComboMethod; // normalization methods dropdown box
122 TGListBox *fListNormalization; // listbox with possible normalization variables
123 TGComboBox *fComboCustom; // combo box for custom draw commands
124 TGLabel *fLblCustomDraw; // custom draw labal
125 TGCheckButton *fChkAddDrawOpt; // additional draw options check box
126 TGNumberEntry *fNmbSector; // number entry box for specifying the sector
127 TGLabel *fLblSector; // label that shows the active sector
128 TGCheckButton *fChkCutZero; // cut zeros check box
129 TGCheckButton *fChkAddCuts; // additional cuts check box
130 TGLabel *fLblAddCuts; // additional cuts label
131 TGComboBox *fComboAddCuts; // additional cuts combo box
132 TGComboBox *fComboCustomFit; // custom fit combo box
133 TGCheckButton *fChkSetMax; // Set maximum check box
134 TGCheckButton *fChkSetMin; // Set maximum check box
135 TGCheckButton *fChkGetMinMaxAuto; // Get Min & Max automatically from plot
136 TGTextEntry *fTxtSetMax; // custom maximum text box
137 TGTextEntry *fTxtSetMin; // custom minimum text box
138 TGGroupFrame *fContDrawOpt1D; // container in tabLeft1
139 TGCompositeFrame *fcontDrawOpt1DSubLR; // container in tabLeft1 to divide L/R
140 TGCompositeFrame *fContDrawOpt1DSubNSC; // container in tabLeft1 for following radio buttons
141 TGRadioButton *fRadioNorm; // radio button for normal 1D drawing
142 TGRadioButton *fRadioSigma; // radio button for sigma 1D drawing
143 TGTextEntry *fTxtSigmas; // text box to specify sigmas
144 TGCompositeFrame *fContCumuLR; // container in tabLeft1 for two colums for cumulative and integrative
145 TGCompositeFrame *fContCumLeft; // container in tabLeft1 for cumulative, left
146 TGCompositeFrame *fContCumRight; // container in tabLeft1 for cumulative, right
147 TGLabel *fLblSigmaMax; // label to indicate sigmaMax
148 TGTextEntry *fTxtSigmaMax; // text box to specify sigmaMax
149 TGRadioButton *fRadioCumulative; // radio button for cumulative 1D drawing
150 TGCheckButton *fCheckCumulativePM; // checkbox for plus/minus cumulative 1D drawing
151 TGRadioButton *fRadioIntegrate; // radio button for integral 1D drawing
152 TGCompositeFrame *fContDrawOpt1DSubMML; // container in tabLeft1 for following check boxes
153 TGCheckButton *fChkMean; // checkbox to plot mean
154 TGCheckButton *fChkMedian; // checkbox to plot median
155 TGCheckButton *fChkLTM; // checkbox to plot LTM
156 TGGroupFrame *fContStatOpt; // container for statistic options in tabLeft1
157 TGCheckButton *fChkStatName; // checkbox to display histogram name in statistic legend
158 TGCheckButton *fChkStatEntries; // checkbox to display entries in statistic legend
159 TGCompositeFrame *fContStatMean; // container for mean and its error in stat opt
160 TGCheckButton *fChkStatMean; // checkbox to display mean in statistic legend
161 TGCheckButton *fChkStatMeanPM; // checkbox to display mean error in statistic legend
162 TGCompositeFrame *fContStatRMS; // container for RMS and its error in stat opt
163 TGCheckButton *fChkStatRMS; // checkbox to display RMS in statistic legend
164 TGCheckButton *fChkStatRMSPM; // checkbox to display RMS error in statistic legend
165 TGCheckButton *fChkStatUnderflow; // checkbox to display underflow error in statistic legend
166 TGCheckButton *fChkStatOverflow; // checkbox to display overflow error in statistic legend
167 TGCheckButton *fChkStatIntegral; // checkbox to display integral in statistic legend
168 TGCompositeFrame *fContStatSkew; // container for skewness and its error in stat opt
169 TGCheckButton *fChkStatSkewness; // checkbox to display skewness in statistic legend
170 TGCheckButton *fChkStatSkewnessPM; // checkbox to display skewness error in statistic legend
171 TGCompositeFrame *fContStatKurt; // container for kurtosis and its error in stat opt
172 TGCheckButton *fChkStatKurtosis; // checkbox to display kurtosis in statistic legend
173 TGCheckButton *fChkStatKurtosisPM; // checkbox to display kurtosis error in statistic legend
174 TGGroupFrame *fContLabeling; // groupframe container for labeling
175 TGCheckButton *fChkLabelTitle; // checkbox to display specified title
176 TGTextEntry *fTxtLabelTitle; // text box to specify title
177 TGCheckButton *fChkLabelXaxis; // checkbox to display specified xaxis label
178 TGTextEntry *fTxtLabelXaxis; // text box to specify xaxis label
179 TGCheckButton *fChkLabelYaxis; // checkbox to display specified yaxis label
180 TGTextEntry *fTxtLabelYaxis; // text box to specify yaxis label
181 TGCheckButton *fChkLabelGetAuto; // checkbox to get labels atuomatically from plot
182 TGGroupFrame *fContSave; // container for save-button
183 TGButton *fBtnSave; // Save button
184 TGCompositeFrame *fContAddSaveOpt; // container for additional save options
185 TGCheckButton *fChkAddSaveOpt; // checkbox for additional save options
186 TGComboBox *fComboAddSaveOpt; // combobox for additional save options
188 void Initialize(char* fileName); // initializes the GUI with default settings and opens tree for drawing
190 ClassDef(AliTPCCalibViewerGUI, 0)