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