]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCCalibViewerGUI.h
- restoring accidentally removed code
[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>
5312f439 32#include <TString.h>
832bb12c 33class TROOTt;
72d0ab7e 34class AliTPCCalibViewer;
8192627b 35class AliTPCPreprocessorOnline;
a6d2bd0c 36
39bcd65d 37
72d0ab7e 38// class TGListBox;
39// class TGNumberEntry;
40// class TGSplitter;
41// class TGTab;
42// class TGWidget; // ???
43// class TGLabel;
44// class TGButtonGroup;
45// class TGComboBox;
46// class TRootEmbeddedCanvas;
47// class TGButton;
48// class TGRadioButton;
49// class TGCheckButton;
50// class TGTextEntry;
51
52
53class AliTPCCalibViewerGUI : public TGCompositeFrame {
54
55public:
56 AliTPCCalibViewerGUI(const TGWindow *p, UInt_t w, UInt_t h, char* fileName); // constructor; fileName specifies the ROOT tree used for drawing
57 AliTPCCalibViewerGUI(const AliTPCCalibViewerGUI &c); // copy constructor
58 AliTPCCalibViewerGUI &operator = (const AliTPCCalibViewerGUI &param); // assignment operator
39bcd65d 59
72d0ab7e 60 virtual ~AliTPCCalibViewerGUI();
61 // virtual void CloseWindow();
832bb12c 62
63 void DrawGUI(const TGWindow *p, UInt_t w, UInt_t h); // to be called by the costructor, here the windows is drawn
64 void SetInitialValues(); // set the initial button states
a6e0ebfe 65 void Initialize(const char* fileName, const char* treeName = "calPads"); // initializes the GUI with default settings and opens tree for drawing
832bb12c 66 void Initialize(AliTPCCalibViewer *viewer); // initializes the GUI with default settings and opens tree for drawing
67 void Reload(){Initialize(fViewer);} // reload the viewr after it has been changed, e.g. added a new referenceTree, ...
5312f439 68 void Reset();
832bb12c 69 TString* GetDrawString(); // create the draw string out of selection
70 TString* GetCutString(); // create the cut string out of selection
71 TString* GetSectorString(); // create the sector string out of selection
72 AliTPCCalibViewer* GetViewer() {return fViewer;} // returns the internal AliTPCCalibViewer object, which does the work
8192627b 73 static TObjArray* ShowGUI(const char* fileName = 0); // initialize and show GUI for presentation, standalone
832bb12c 74
72d0ab7e 75 void HandleButtonsGeneral(Int_t id = -1); // handles mutual radio button exclusions for general Tab
76 void HandleButtons1D(Int_t id = -1); // handles mutual radio button exclusions for 1D Tab
72d0ab7e 77 void HandleButtonsStat(Int_t id = -1); // handles statistic check boxes
832bb12c 78 void HandleButtonsCuts(Int_t id = -1); // handles mutual radio button exclusions for right side
79 void HandleButtonsNoRedraw(Int_t id = -1);// handles label & scaling checkboxes without redrawing
5312f439 80 void ReplacePlaceHolders(TString &str); // replace place holders of the draw variable and normalisation variable
72d0ab7e 81 void DoNewSelection(); // decides whether to redraw if user makes another selection
82 void DoDraw(); // main method for drawing according to user selection
83 void DoFit(); // main method for fitting
832bb12c 84 void DoExport(); // function to export a CalPad to Cint
8192627b 85 void DoDumpToFile(); // function to dump a new calib tree to file
86 void DoLoadTree(); // function to load a new calib tree
832bb12c 87 void DoExportNorm(); // function to use a calPad for normalization
4f3934a1 88 void SavePicture(); // method for saving
72d0ab7e 89 void GetMinMax(); // Read current Min & Max from the plot and set it to fTxtSetMin & fTxtSetMax
832bb12c 90 void SetMinMaxLabel(); // Set min, max and label without redrawing
72d0ab7e 91 void ChangeSector(); // function that is called, when the number of the sector is changed
92 void AddFitFunction() const; // adds the last fit function to the normalization list
832bb12c 93 void MouseMove(Int_t event, Int_t x, Int_t y, TObject *selected);
94 void UnchekAllStat(); // Disable all statistical legend entries, no statistical legend.
72d0ab7e 95
8192627b 96protected:
39bcd65d 97 AliTPCCalibViewer *fViewer; // CalibViewer object used for drawing
8192627b 98 AliTPCPreprocessorOnline *fPreprocessor; // PreprocessorOnline object, used to collect the exported CalPads and to save them into a new calibTree
39bcd65d 99
a6d2bd0c 100 TGCompositeFrame *fContTopBottom; // container for all GUI elements, vertical divided
101 TGCompositeFrame *fContLCR; // container for all GUI elements, horizontal divided
39bcd65d 102 TGCompositeFrame *fContLeft; // container for GUI elements on left side
72d0ab7e 103 TGTab *ftabLeft; // Tabs on the left side for plot options
104 TGCompositeFrame *ftabLeft0; // Tab 0 on the left side for general plot options
105 TGCompositeFrame *ftabLeft1; // Tab 1 on the left side for 1D plot options
4f3934a1 106 TGTab *ftabRight; // Tabs on the right side
107 TGCompositeFrame *fTabRight0; // Tab 0 on the right side for basic
108 TGCompositeFrame *fTabRight1; // Tab 1 on the right side for advanced
39bcd65d 109 TGCompositeFrame *fContRight; // container for GUI elements on right side
110 TGCompositeFrame *fContCenter; // container for GUI elements at the center
111 TGCompositeFrame *fContPlotOpt; // container for plot options GUI elements
112 TGCompositeFrame *fContDrawOpt; // container for draw options GUI elements
a6d2bd0c 113 TGCompositeFrame *fContDrawOptSub1D2D; // container for 1D and 2D radio-button
39bcd65d 114 TGCompositeFrame *fContNormalized; // container for normalization options GUI elements
115 TGCompositeFrame *fContCustom; // container for custom draw command GUI elements
116 TGCompositeFrame *fContCuts; // container for cut options GUI elements
117 TGCompositeFrame *fContSector; // container for sector GUI elements
118 TGCompositeFrame *fContAddCuts; // container for additional cut command GUI elements
a6d2bd0c 119 TGCompositeFrame *fContFit; // container for fit GUI elements
120 TGCompositeFrame *fContAddFit; // container for additional fit GUI elements
121 TGCompositeFrame *fContScaling; // container for scaling GUI elements
122 TGCompositeFrame *fContSetMax; // container for SetMaximum elements
123 TGCompositeFrame *fContSetMin; // container for SetMinimum elements
72d0ab7e 124 TGCompositeFrame *fContAddDrawOpt; // additional draw options container
39bcd65d 125 TGListBox *fListVariables; // listbox with possible variables
126 TGTextButton *fBtnDraw; // draw button
a6d2bd0c 127 TGTextButton *fBtnFit; // fit button
128 TGTextButton *fBtnAddFitFunction; // button to add fit function to normalization
129 TGTextButton *fBtnGetMinMax; // GetMinMax-button
39bcd65d 130 TRootEmbeddedCanvas *fCanvMain; // main drawing canvas
131 TGRadioButton *fRadioRaw; // raw radio button
132 TGRadioButton *fRadioNormalized; // normalized radio button
a6d2bd0c 133 TGRadioButton *fRadioPredefined; // predefined plot radio button
39bcd65d 134 TGRadioButton *fRadioCustom; // custom radio button
135 TGRadioButton *fRadio1D; // 1D radio button
136 TGRadioButton *fRadio2D; // 2D radio button
137 TGRadioButton *fRadioTPC; // TPC radio button
138 TGRadioButton *fRadioSideA; // side A radio button
139 TGRadioButton *fRadioSideC; // side C radio button
c4607f01 140 TGRadioButton *fRadioROC; // ROC radio button
39bcd65d 141 TGRadioButton *fRadioSector; // sector radio button
72d0ab7e 142 TGComboBox *fComboAddDrawOpt; // additional draw options combo box
39bcd65d 143 TGCheckButton *fChkAuto; // automatic redraw checkbox
8192627b 144 TGCheckButton *fChkAutoAppend; // automatic appendign of "~" checkbox
39bcd65d 145 TGComboBox *fComboMethod; // normalization methods dropdown box
146 TGListBox *fListNormalization; // listbox with possible normalization variables
a6d2bd0c 147 TGComboBox *fComboCustom; // combo box for custom draw commands
4f3934a1 148 TGLabel *fLblCustomDraw; // custom draw labal
72d0ab7e 149 TGCheckButton *fChkAddDrawOpt; // additional draw options check box
39bcd65d 150 TGNumberEntry *fNmbSector; // number entry box for specifying the sector
a6d2bd0c 151 TGLabel *fLblSector; // label that shows the active sector
72d0ab7e 152 TGCheckButton *fChkCutZero; // cut zeros check box
39bcd65d 153 TGCheckButton *fChkAddCuts; // additional cuts check box
4f3934a1 154 TGLabel *fLblAddCuts; // additional cuts label
a6d2bd0c 155 TGComboBox *fComboAddCuts; // additional cuts combo box
156 TGComboBox *fComboCustomFit; // custom fit combo box
157 TGCheckButton *fChkSetMax; // Set maximum check box
158 TGCheckButton *fChkSetMin; // Set maximum check box
159 TGCheckButton *fChkGetMinMaxAuto; // Get Min & Max automatically from plot
160 TGTextEntry *fTxtSetMax; // custom maximum text box
161 TGTextEntry *fTxtSetMin; // custom minimum text box
72d0ab7e 162 TGGroupFrame *fContDrawOpt1D; // container in tabLeft1
163 TGCompositeFrame *fcontDrawOpt1DSubLR; // container in tabLeft1 to divide L/R
164 TGCompositeFrame *fContDrawOpt1DSubNSC; // container in tabLeft1 for following radio buttons
165 TGRadioButton *fRadioNorm; // radio button for normal 1D drawing
166 TGRadioButton *fRadioSigma; // radio button for sigma 1D drawing
167 TGTextEntry *fTxtSigmas; // text box to specify sigmas
168 TGCompositeFrame *fContCumuLR; // container in tabLeft1 for two colums for cumulative and integrative
169 TGCompositeFrame *fContCumLeft; // container in tabLeft1 for cumulative, left
170 TGCompositeFrame *fContCumRight; // container in tabLeft1 for cumulative, right
171 TGLabel *fLblSigmaMax; // label to indicate sigmaMax
172 TGTextEntry *fTxtSigmaMax; // text box to specify sigmaMax
173 TGRadioButton *fRadioCumulative; // radio button for cumulative 1D drawing
174 TGCheckButton *fCheckCumulativePM; // checkbox for plus/minus cumulative 1D drawing
175 TGRadioButton *fRadioIntegrate; // radio button for integral 1D drawing
176 TGCompositeFrame *fContDrawOpt1DSubMML; // container in tabLeft1 for following check boxes
177 TGCheckButton *fChkMean; // checkbox to plot mean
178 TGCheckButton *fChkMedian; // checkbox to plot median
179 TGCheckButton *fChkLTM; // checkbox to plot LTM
180 TGGroupFrame *fContStatOpt; // container for statistic options in tabLeft1
181 TGCheckButton *fChkStatName; // checkbox to display histogram name in statistic legend
182 TGCheckButton *fChkStatEntries; // checkbox to display entries in statistic legend
183 TGCompositeFrame *fContStatMean; // container for mean and its error in stat opt
184 TGCheckButton *fChkStatMean; // checkbox to display mean in statistic legend
185 TGCheckButton *fChkStatMeanPM; // checkbox to display mean error in statistic legend
186 TGCompositeFrame *fContStatRMS; // container for RMS and its error in stat opt
187 TGCheckButton *fChkStatRMS; // checkbox to display RMS in statistic legend
188 TGCheckButton *fChkStatRMSPM; // checkbox to display RMS error in statistic legend
189 TGCheckButton *fChkStatUnderflow; // checkbox to display underflow error in statistic legend
190 TGCheckButton *fChkStatOverflow; // checkbox to display overflow error in statistic legend
191 TGCheckButton *fChkStatIntegral; // checkbox to display integral in statistic legend
192 TGCompositeFrame *fContStatSkew; // container for skewness and its error in stat opt
193 TGCheckButton *fChkStatSkewness; // checkbox to display skewness in statistic legend
194 TGCheckButton *fChkStatSkewnessPM; // checkbox to display skewness error in statistic legend
195 TGCompositeFrame *fContStatKurt; // container for kurtosis and its error in stat opt
196 TGCheckButton *fChkStatKurtosis; // checkbox to display kurtosis in statistic legend
197 TGCheckButton *fChkStatKurtosisPM; // checkbox to display kurtosis error in statistic legend
832bb12c 198 TGButton *fBtnUnchekAll; // Button to uncheck all statistic entries
4f3934a1 199 TGGroupFrame *fContLabeling; // groupframe container for labeling
200 TGCheckButton *fChkLabelTitle; // checkbox to display specified title
201 TGTextEntry *fTxtLabelTitle; // text box to specify title
202 TGCheckButton *fChkLabelXaxis; // checkbox to display specified xaxis label
203 TGTextEntry *fTxtLabelXaxis; // text box to specify xaxis label
204 TGCheckButton *fChkLabelYaxis; // checkbox to display specified yaxis label
205 TGTextEntry *fTxtLabelYaxis; // text box to specify yaxis label
206 TGCheckButton *fChkLabelGetAuto; // checkbox to get labels atuomatically from plot
207 TGGroupFrame *fContSave; // container for save-button
208 TGButton *fBtnSave; // Save button
209 TGCompositeFrame *fContAddSaveOpt; // container for additional save options
210 TGCheckButton *fChkAddSaveOpt; // checkbox for additional save options
211 TGComboBox *fComboAddSaveOpt; // combobox for additional save options
832bb12c 212 TGGroupFrame *fContExport; // container for cint-export
213 TGCompositeFrame *fContAddExport; // container for dropdown list to enter export name
214 TGComboBox *fComboExportName; // dropdownbox to enter a name for the exported CalPad
215 TGTextButton *fBtnExport; // button to export a CalPad
216 TGTextButton *fBtnAddNorm; // button to add a CalPad to the normalization
8192627b 217 TGCompositeFrame *fContTree; // container for tree functions
218 TGTextButton *fBtnDumpToFile; // button to dump a new CalibTree to file
219 TGTextButton *fBtnLoadTree; // button to load a new tree
220 TGCheckButton *fChkAddAsReference; // checkbox to add a new tree as referenceTree
221 TGTextEntry *fTxtRefName; // text box to specify the referenceTree's name
a6d2bd0c 222
832bb12c 223 private:
224 Bool_t fInitialized; // has the GUI already been initialized?
39bcd65d 225
39bcd65d 226 ClassDef(AliTPCCalibViewerGUI, 0)
227};
228
229#endif