]>
Commit | Line | Data |
---|---|---|
39bcd65d | 1 | #ifndef ALITPCCALIBVIEWERGUI |
2 | #define ALITPCCALIBVIEWERGUI | |
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> | |
32 | ||
39bcd65d | 33 | |
34 | #include <iostream> | |
35 | #include "AliTPCCalibViewer.h" | |
36 | ||
37 | ||
a6d2bd0c | 38 | class AliTPCCalibViewerGUI : public TGCompositeFrame { |
39bcd65d | 39 | protected: |
40 | AliTPCCalibViewer *fViewer; // CalibViewer object used for drawing | |
41 | ||
a6d2bd0c | 42 | TGCompositeFrame *fContTopBottom; // container for all GUI elements, vertical divided |
43 | TGCompositeFrame *fContLCR; // container for all GUI elements, horizontal divided | |
39bcd65d | 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 | |
a6d2bd0c | 49 | TGCompositeFrame *fContDrawOptSub1D2D; // container for 1D and 2D radio-button |
39bcd65d | 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 | |
a6d2bd0c | 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 | |
39bcd65d | 60 | TGListBox *fListVariables; // listbox with possible variables |
61 | TGTextButton *fBtnDraw; // draw button | |
a6d2bd0c | 62 | TGTextButton *fBtnFit; // fit button |
63 | TGTextButton *fBtnAddFitFunction; // button to add fit function to normalization | |
64 | TGTextButton *fBtnGetMinMax; // GetMinMax-button | |
39bcd65d | 65 | TRootEmbeddedCanvas *fCanvMain; // main drawing canvas |
66 | TGRadioButton *fRadioRaw; // raw radio button | |
67 | TGRadioButton *fRadioNormalized; // normalized radio button | |
a6d2bd0c | 68 | TGRadioButton *fRadioPredefined; // predefined plot radio button |
39bcd65d | 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 | |
a6d2bd0c | 79 | TGComboBox *fComboCustom; // combo box for custom draw commands |
39bcd65d | 80 | TGNumberEntry *fNmbSector; // number entry box for specifying the sector |
a6d2bd0c | 81 | TGLabel *fLblSector; // label that shows the active sector |
39bcd65d | 82 | TGCheckButton *fChkAddCuts; // additional cuts check box |
a6d2bd0c | 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 | |
90 | ||
39bcd65d | 91 | |
92 | void Initialize(char* fileName); // initializes the GUI with default settings and opens tree for drawing | |
93 | ||
94 | public: | |
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 | |
98 | ||
99 | virtual ~AliTPCCalibViewerGUI(); | |
a6d2bd0c | 100 | // virtual void CloseWindow(); |
39bcd65d | 101 | |
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 | |
a6d2bd0c | 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 | |
39bcd65d | 110 | ClassDef(AliTPCCalibViewerGUI, 0) |
111 | }; | |
112 | ||
113 | #endif |