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 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
75 AliTPCCalibViewer *fViewer; // CalibViewer object used for drawing
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 TGCompositeFrame *fContRight; // container for GUI elements on right side
84 TGCompositeFrame *fContCenter; // container for GUI elements at the center
85 TGCompositeFrame *fContPlotOpt; // container for plot options GUI elements
86 TGCompositeFrame *fContDrawOpt; // container for draw options GUI elements
87 TGCompositeFrame *fContDrawOptSub1D2D; // container for 1D and 2D radio-button
88 TGCompositeFrame *fContNormalized; // container for normalization options GUI elements
89 TGCompositeFrame *fContCustom; // container for custom draw command GUI elements
90 TGCompositeFrame *fContCuts; // container for cut options GUI elements
91 TGCompositeFrame *fContSector; // container for sector GUI elements
92 TGCompositeFrame *fContAddCuts; // container for additional cut command GUI elements
93 TGCompositeFrame *fContFit; // container for fit GUI elements
94 TGCompositeFrame *fContAddFit; // container for additional fit GUI elements
95 TGCompositeFrame *fContScaling; // container for scaling GUI elements
96 TGCompositeFrame *fContSetMax; // container for SetMaximum elements
97 TGCompositeFrame *fContSetMin; // container for SetMinimum elements
98 TGCompositeFrame *fContAddDrawOpt; // additional draw options container
99 TGListBox *fListVariables; // listbox with possible variables
100 TGTextButton *fBtnDraw; // draw button
101 TGTextButton *fBtnFit; // fit button
102 TGTextButton *fBtnAddFitFunction; // button to add fit function to normalization
103 TGTextButton *fBtnGetMinMax; // GetMinMax-button
104 TRootEmbeddedCanvas *fCanvMain; // main drawing canvas
105 TGRadioButton *fRadioRaw; // raw radio button
106 TGRadioButton *fRadioNormalized; // normalized radio button
107 TGRadioButton *fRadioPredefined; // predefined plot radio button
108 TGRadioButton *fRadioCustom; // custom radio button
109 TGRadioButton *fRadio1D; // 1D radio button
110 TGRadioButton *fRadio2D; // 2D radio button
111 TGRadioButton *fRadioTPC; // TPC radio button
112 TGRadioButton *fRadioSideA; // side A radio button
113 TGRadioButton *fRadioSideC; // side C radio button
114 TGRadioButton *fRadioSector; // sector radio button
115 TGComboBox *fComboAddDrawOpt; // additional draw options combo box
116 TGCheckButton *fChkAuto; // automatic redraw checkbox
117 TGComboBox *fComboMethod; // normalization methods dropdown box
118 TGListBox *fListNormalization; // listbox with possible normalization variables
119 TGComboBox *fComboCustom; // combo box for custom draw commands
120 TGCheckButton *fChkAddDrawOpt; // additional draw options check box
121 TGNumberEntry *fNmbSector; // number entry box for specifying the sector
122 TGLabel *fLblSector; // label that shows the active sector
123 TGCheckButton *fChkCutZero; // cut zeros check box
124 TGCheckButton *fChkAddCuts; // additional cuts check box
125 TGComboBox *fComboAddCuts; // additional cuts combo box
126 TGComboBox *fComboCustomFit; // custom fit combo box
127 TGCheckButton *fChkSetMax; // Set maximum check box
128 TGCheckButton *fChkSetMin; // Set maximum check box
129 TGCheckButton *fChkGetMinMaxAuto; // Get Min & Max automatically from plot
130 TGTextEntry *fTxtSetMax; // custom maximum text box
131 TGTextEntry *fTxtSetMin; // custom minimum text box
132 TGGroupFrame *fContDrawOpt1D; // container in tabLeft1
133 TGCompositeFrame *fcontDrawOpt1DSubLR; // container in tabLeft1 to divide L/R
134 TGCompositeFrame *fContDrawOpt1DSubNSC; // container in tabLeft1 for following radio buttons
135 TGRadioButton *fRadioNorm; // radio button for normal 1D drawing
136 TGRadioButton *fRadioSigma; // radio button for sigma 1D drawing
137 TGTextEntry *fTxtSigmas; // text box to specify sigmas
138 TGCompositeFrame *fContCumuLR; // container in tabLeft1 for two colums for cumulative and integrative
139 TGCompositeFrame *fContCumLeft; // container in tabLeft1 for cumulative, left
140 TGCompositeFrame *fContCumRight; // container in tabLeft1 for cumulative, right
141 TGLabel *fLblSigmaMax; // label to indicate sigmaMax
142 TGTextEntry *fTxtSigmaMax; // text box to specify sigmaMax
143 TGRadioButton *fRadioCumulative; // radio button for cumulative 1D drawing
144 TGCheckButton *fCheckCumulativePM; // checkbox for plus/minus cumulative 1D drawing
145 TGRadioButton *fRadioIntegrate; // radio button for integral 1D drawing
146 TGCompositeFrame *fContDrawOpt1DSubMML; // container in tabLeft1 for following check boxes
147 TGCheckButton *fChkMean; // checkbox to plot mean
148 TGCheckButton *fChkMedian; // checkbox to plot median
149 TGCheckButton *fChkLTM; // checkbox to plot LTM
150 TGGroupFrame *fContStatOpt; // container for statistic options in tabLeft1
151 TGCheckButton *fChkStatName; // checkbox to display histogram name in statistic legend
152 TGCheckButton *fChkStatEntries; // checkbox to display entries in statistic legend
153 TGCompositeFrame *fContStatMean; // container for mean and its error in stat opt
154 TGCheckButton *fChkStatMean; // checkbox to display mean in statistic legend
155 TGCheckButton *fChkStatMeanPM; // checkbox to display mean error in statistic legend
156 TGCompositeFrame *fContStatRMS; // container for RMS and its error in stat opt
157 TGCheckButton *fChkStatRMS; // checkbox to display RMS in statistic legend
158 TGCheckButton *fChkStatRMSPM; // checkbox to display RMS error in statistic legend
159 TGCheckButton *fChkStatUnderflow; // checkbox to display underflow error in statistic legend
160 TGCheckButton *fChkStatOverflow; // checkbox to display overflow error in statistic legend
161 TGCheckButton *fChkStatIntegral; // checkbox to display integral in statistic legend
162 TGCompositeFrame *fContStatSkew; // container for skewness and its error in stat opt
163 TGCheckButton *fChkStatSkewness; // checkbox to display skewness in statistic legend
164 TGCheckButton *fChkStatSkewnessPM; // checkbox to display skewness error in statistic legend
165 TGCompositeFrame *fContStatKurt; // container for kurtosis and its error in stat opt
166 TGCheckButton *fChkStatKurtosis; // checkbox to display kurtosis in statistic legend
167 TGCheckButton *fChkStatKurtosisPM; // checkbox to display kurtosis error in statistic legend
169 void Initialize(char* fileName); // initializes the GUI with default settings and opens tree for drawing
171 ClassDef(AliTPCCalibViewerGUI, 0)