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