]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCCalibViewerGUI.h
Possibility to register data - AliTPCselector*
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibViewerGUI.h
1 #ifndef ALITPCCALIBVIEWERGUI_H
2 #define ALITPCCALIBVIEWERGUI_H
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>
30 #include <TGLabel.h>
31 #include <TGTab.h>
32 class AliTPCCalibViewer;
33
34
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        
50 class AliTPCCalibViewerGUI : public TGCompositeFrame {
51    
52 public:
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
56
57    virtual ~AliTPCCalibViewerGUI();
58    // virtual void CloseWindow();
59
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 HandleButtonsStat(Int_t id = -1);    // handles statistic check boxes 
63    void HandleButtonsRight(Int_t id = -1);   // handles mutual radio button exclusions for right side
64    void DoNewSelection();                    // decides whether to redraw if user makes another selection
65    void DoDraw();                            // main method for drawing according to user selection
66    void DoFit();                             // main method for fitting
67    void SavePicture();                       // method for saving
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    
74 protected:
75    AliTPCCalibViewer   *fViewer;             // CalibViewer object used for drawing
76
77    TGCompositeFrame    *fContTopBottom;      // container for all GUI elements, vertical divided
78    TGCompositeFrame    *fContLCR;            // container for all GUI elements, horizontal divided
79    TGCompositeFrame    *fContLeft;           // container for GUI elements on left side
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
83    TGTab               *ftabRight;           // Tabs on the right side
84    TGCompositeFrame    *fTabRight0;          // Tab 0 on the right side for basic
85    TGCompositeFrame    *fTabRight1;          // Tab 1 on the right side for advanced
86    TGCompositeFrame    *fContRight;          // container for GUI elements on right side
87    TGCompositeFrame    *fContCenter;         // container for GUI elements at the center
88    TGCompositeFrame    *fContPlotOpt;        // container for plot options GUI elements
89    TGCompositeFrame    *fContDrawOpt;        // container for draw options GUI elements
90    TGCompositeFrame    *fContDrawOptSub1D2D; // container for 1D and 2D radio-button
91    TGCompositeFrame    *fContNormalized;     // container for normalization options GUI elements
92    TGCompositeFrame    *fContCustom;         // container for custom draw command GUI elements
93    TGCompositeFrame    *fContCuts;           // container for cut options GUI elements
94    TGCompositeFrame    *fContSector;         // container for sector GUI elements
95    TGCompositeFrame    *fContAddCuts;        // container for additional cut command GUI elements
96    TGCompositeFrame    *fContFit;            // container for fit GUI elements
97    TGCompositeFrame    *fContAddFit;         // container for additional fit GUI elements
98    TGCompositeFrame    *fContScaling;        // container for scaling GUI elements
99    TGCompositeFrame    *fContSetMax;         // container for SetMaximum elements
100    TGCompositeFrame    *fContSetMin;         // container for SetMinimum elements
101    TGCompositeFrame    *fContAddDrawOpt;     // additional draw options container
102    TGListBox           *fListVariables;      // listbox with possible variables
103    TGTextButton        *fBtnDraw;            // draw button
104    TGTextButton        *fBtnFit;             // fit button
105    TGTextButton        *fBtnAddFitFunction;  // button to add fit function to normalization
106    TGTextButton        *fBtnGetMinMax;       // GetMinMax-button
107    TRootEmbeddedCanvas *fCanvMain;           // main drawing canvas
108    TGRadioButton       *fRadioRaw;           // raw radio button
109    TGRadioButton       *fRadioNormalized;    // normalized radio button
110    TGRadioButton       *fRadioPredefined;    // predefined plot radio button
111    TGRadioButton       *fRadioCustom;        // custom radio button
112    TGRadioButton       *fRadio1D;            // 1D radio button
113    TGRadioButton       *fRadio2D;            // 2D radio button
114    TGRadioButton       *fRadioTPC;           // TPC radio button
115    TGRadioButton       *fRadioSideA;         // side A radio button
116    TGRadioButton       *fRadioSideC;         // side C radio button
117    TGRadioButton       *fRadioSector;        // sector radio button
118    TGComboBox          *fComboAddDrawOpt;    // additional draw options combo box
119    TGCheckButton       *fChkAuto;            // automatic redraw checkbox
120    TGComboBox          *fComboMethod;        // normalization methods dropdown box
121    TGListBox           *fListNormalization;  // listbox with possible normalization variables
122    TGComboBox          *fComboCustom;        // combo box for custom draw commands
123    TGLabel             *fLblCustomDraw;      // custom draw labal
124    TGCheckButton       *fChkAddDrawOpt;      // additional draw options check box
125    TGNumberEntry       *fNmbSector;          // number entry box for specifying the sector
126    TGLabel             *fLblSector;          // label that shows the active sector
127    TGCheckButton       *fChkCutZero;         // cut zeros check box
128    TGCheckButton       *fChkAddCuts;         // additional cuts check box
129    TGLabel             *fLblAddCuts;         // additional cuts label
130    TGComboBox          *fComboAddCuts;       // additional cuts combo box
131    TGComboBox          *fComboCustomFit;     // custom fit combo box
132    TGCheckButton       *fChkSetMax;          // Set maximum check box
133    TGCheckButton       *fChkSetMin;          // Set maximum check box
134    TGCheckButton       *fChkGetMinMaxAuto;   // Get Min & Max automatically from plot
135    TGTextEntry         *fTxtSetMax;          // custom maximum text box
136    TGTextEntry         *fTxtSetMin;          // custom minimum text box
137    TGGroupFrame        *fContDrawOpt1D;      // container in tabLeft1 
138    TGCompositeFrame    *fcontDrawOpt1DSubLR; // container in tabLeft1 to divide L/R
139    TGCompositeFrame    *fContDrawOpt1DSubNSC; // container in tabLeft1 for following radio buttons 
140    TGRadioButton       *fRadioNorm;          // radio button for normal 1D drawing
141    TGRadioButton       *fRadioSigma;         // radio button for sigma 1D drawing
142    TGTextEntry         *fTxtSigmas;          // text box to specify sigmas
143    TGCompositeFrame    *fContCumuLR;         // container in tabLeft1 for two colums for cumulative and integrative
144    TGCompositeFrame    *fContCumLeft;        // container in tabLeft1 for cumulative, left
145    TGCompositeFrame    *fContCumRight;       // container in tabLeft1 for cumulative, right
146    TGLabel             *fLblSigmaMax;        // label to indicate sigmaMax
147    TGTextEntry         *fTxtSigmaMax;        // text box to specify sigmaMax
148    TGRadioButton       *fRadioCumulative;    // radio button for cumulative 1D drawing
149    TGCheckButton       *fCheckCumulativePM;  // checkbox for plus/minus cumulative 1D drawing
150    TGRadioButton       *fRadioIntegrate;     // radio button for integral 1D drawing
151    TGCompositeFrame    *fContDrawOpt1DSubMML; // container in tabLeft1 for following check boxes
152    TGCheckButton       *fChkMean;            // checkbox to plot mean
153    TGCheckButton       *fChkMedian;          // checkbox to plot median
154    TGCheckButton       *fChkLTM;             // checkbox to plot LTM
155    TGGroupFrame        *fContStatOpt;        // container for statistic options in tabLeft1 
156    TGCheckButton       *fChkStatName;        // checkbox to display histogram name in statistic legend
157    TGCheckButton       *fChkStatEntries;     // checkbox to display entries in statistic legend
158    TGCompositeFrame    *fContStatMean;       // container for mean and its error in stat opt
159    TGCheckButton       *fChkStatMean;        // checkbox to display mean in statistic legend
160    TGCheckButton       *fChkStatMeanPM;      // checkbox to display mean error in statistic legend
161    TGCompositeFrame    *fContStatRMS;        // container for RMS and its error in stat opt
162    TGCheckButton       *fChkStatRMS;         // checkbox to display RMS in statistic legend
163    TGCheckButton       *fChkStatRMSPM;       // checkbox to display RMS error in statistic legend
164    TGCheckButton       *fChkStatUnderflow;   // checkbox to display underflow error in statistic legend
165    TGCheckButton       *fChkStatOverflow;    // checkbox to display overflow error in statistic legend
166    TGCheckButton       *fChkStatIntegral;    // checkbox to display integral in statistic legend
167    TGCompositeFrame    *fContStatSkew;       // container for skewness and its error in stat opt
168    TGCheckButton       *fChkStatSkewness;    // checkbox to display skewness in statistic legend
169    TGCheckButton       *fChkStatSkewnessPM;  // checkbox to display skewness error in statistic legend
170    TGCompositeFrame    *fContStatKurt;       // container for kurtosis and its error in stat opt
171    TGCheckButton       *fChkStatKurtosis;    // checkbox to display kurtosis in statistic legend
172    TGCheckButton       *fChkStatKurtosisPM;  // checkbox to display kurtosis error in statistic legend
173    TGGroupFrame        *fContLabeling;       // groupframe container for labeling
174    TGCheckButton       *fChkLabelTitle;      // checkbox to display specified title
175    TGTextEntry         *fTxtLabelTitle;      // text box to specify title
176    TGCheckButton       *fChkLabelXaxis;      // checkbox to display specified xaxis label
177    TGTextEntry         *fTxtLabelXaxis;      // text box to specify xaxis label
178    TGCheckButton       *fChkLabelYaxis;      // checkbox to display specified yaxis label
179    TGTextEntry         *fTxtLabelYaxis;      // text box to specify yaxis label
180    TGCheckButton       *fChkLabelGetAuto;    // checkbox to get labels atuomatically from plot
181    TGGroupFrame        *fContSave;           // container for save-button
182    TGButton            *fBtnSave;            // Save button
183    TGCompositeFrame    *fContAddSaveOpt;     // container for additional save options
184    TGCheckButton       *fChkAddSaveOpt;      // checkbox for additional save options
185    TGComboBox          *fComboAddSaveOpt;    // combobox for additional save options
186    
187    void Initialize(char* fileName);          // initializes the GUI with default settings and opens tree for drawing
188    
189    ClassDef(AliTPCCalibViewerGUI, 0)
190 };
191
192 #endif