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