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