1 #ifndef ALITPCCALIBVIEWERGUI
2 #define ALITPCCALIBVIEWERGUI
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>
35 #include "AliTPCCalibViewer.h"
38 class AliTPCCalibViewerGUI : public TGCompositeFrame {
40 AliTPCCalibViewer *fViewer; // CalibViewer object used for drawing
42 TGCompositeFrame *fContTopBottom; // container for all GUI elements, vertical divided
43 TGCompositeFrame *fContLCR; // container for all GUI elements, horizontal divided
44 TGCompositeFrame *fContLeft; // container for GUI elements on left side
45 TGCompositeFrame *fContRight; // container for GUI elements on right side
46 TGCompositeFrame *fContCenter; // container for GUI elements at the center
47 TGCompositeFrame *fContPlotOpt; // container for plot options GUI elements
48 TGCompositeFrame *fContDrawOpt; // container for draw options GUI elements
49 TGCompositeFrame *fContDrawOptSub1D2D; // container for 1D and 2D radio-button
50 TGCompositeFrame *fContNormalized; // container for normalization options GUI elements
51 TGCompositeFrame *fContCustom; // container for custom draw command GUI elements
52 TGCompositeFrame *fContCuts; // container for cut options GUI elements
53 TGCompositeFrame *fContSector; // container for sector GUI elements
54 TGCompositeFrame *fContAddCuts; // container for additional cut command GUI elements
55 TGCompositeFrame *fContFit; // container for fit GUI elements
56 TGCompositeFrame *fContAddFit; // container for additional fit GUI elements
57 TGCompositeFrame *fContScaling; // container for scaling GUI elements
58 TGCompositeFrame *fContSetMax; // container for SetMaximum elements
59 TGCompositeFrame *fContSetMin; // container for SetMinimum elements
60 TGListBox *fListVariables; // listbox with possible variables
61 TGTextButton *fBtnDraw; // draw button
62 TGTextButton *fBtnFit; // fit button
63 TGTextButton *fBtnAddFitFunction; // button to add fit function to normalization
64 TGTextButton *fBtnGetMinMax; // GetMinMax-button
65 TRootEmbeddedCanvas *fCanvMain; // main drawing canvas
66 TGRadioButton *fRadioRaw; // raw radio button
67 TGRadioButton *fRadioNormalized; // normalized radio button
68 TGRadioButton *fRadioPredefined; // predefined plot radio button
69 TGRadioButton *fRadioCustom; // custom radio button
70 TGRadioButton *fRadio1D; // 1D radio button
71 TGRadioButton *fRadio2D; // 2D radio button
72 TGRadioButton *fRadioTPC; // TPC radio button
73 TGRadioButton *fRadioSideA; // side A radio button
74 TGRadioButton *fRadioSideC; // side C radio button
75 TGRadioButton *fRadioSector; // sector radio button
76 TGCheckButton *fChkAuto; // automatic redraw checkbox
77 TGComboBox *fComboMethod; // normalization methods dropdown box
78 TGListBox *fListNormalization; // listbox with possible normalization variables
79 TGComboBox *fComboCustom; // combo box for custom draw commands
80 TGNumberEntry *fNmbSector; // number entry box for specifying the sector
81 TGLabel *fLblSector; // label that shows the active sector
82 TGCheckButton *fChkAddCuts; // additional cuts check box
83 TGComboBox *fComboAddCuts; // additional cuts combo box
84 TGComboBox *fComboCustomFit; // custom fit combo box
85 TGCheckButton *fChkSetMax; // Set maximum check box
86 TGCheckButton *fChkSetMin; // Set maximum check box
87 TGCheckButton *fChkGetMinMaxAuto; // Get Min & Max automatically from plot
88 TGTextEntry *fTxtSetMax; // custom maximum text box
89 TGTextEntry *fTxtSetMin; // custom minimum text box
92 void Initialize(char* fileName); // initializes the GUI with default settings and opens tree for drawing
95 AliTPCCalibViewerGUI(const TGWindow *p, UInt_t w, UInt_t h, char* fileName); // constructor; fileName specifies the ROOT tree used for drawing
96 AliTPCCalibViewerGUI(const AliTPCCalibViewerGUI &c); // copy constructor
97 AliTPCCalibViewerGUI &operator = (const AliTPCCalibViewerGUI ¶m); // assignment operator
99 virtual ~AliTPCCalibViewerGUI();
100 // virtual void CloseWindow();
102 void HandleButtons(Int_t id = -1); // handles mutual radio button exclusions
103 void DoNewSelection(); // decides whether to redraw if user makes another selection
104 void DoDraw(); // main method for drawing according to user selection
105 void DoFit(); // main method for fitting
106 void GetMinMax(); // Read current Min & Max from the plot and set it to fTxtSetMin & fTxtSetMax
107 void ChangeSector(); // function that is called, when the number of the sector is changed
108 void AddFitFunction(); // adds the last fit function to the normalization list
109 static void ShowGUI(const char* fileName); //initialize and show GUI for presentation
110 ClassDef(AliTPCCalibViewerGUI, 0)