]>
Commit | Line | Data |
---|---|---|
5312f439 | 1 | #ifndef AliTPCCalibViewerGUItime_H |
2 | #define AliTPCCalibViewerGUItime_H | |
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 displaying calibration entires over time // | |
12 | // Calibration Trees are created using the macro TPC/CalibMacros/CalibEnv.C // | |
13 | // used for the calibration monitor // | |
14 | // // | |
15 | /////////////////////////////////////////////////////////////////////////////// | |
16 | ||
17 | ||
18 | #ifndef ROOT_TGButton | |
19 | #include "TGWidget.h" | |
20 | #endif | |
21 | #ifndef ROOT_TGFrame | |
22 | #include "TGFrame.h" | |
23 | #endif | |
24 | ||
25 | // #include <TGButton.h> | |
26 | // #include <TGListBox.h> | |
27 | // #include <TGComboBox.h> | |
28 | // #include <TGNumberEntry.h> | |
29 | // #include <TRootEmbeddedCanvas.h> | |
30 | // #include <TGSplitter.h> | |
31 | // #include <TGButtonGroup.h> | |
32 | // #include <TGLabel.h> | |
33 | // #include <TGTab.h> | |
34 | #include <TString.h> | |
35 | #include <TVectorT.h> | |
36 | ||
37 | class TGCompositeFrame; | |
38 | class TRootEmbeddedCanvas; | |
39 | class TGTextButton; | |
40 | class TGListBox; | |
41 | class TGRadioButton; | |
42 | class TGGroupFrame; | |
43 | class TGLabel; | |
44 | class TGComboBox; | |
45 | class TGTabElement; | |
46 | ||
47 | class TFile; | |
48 | class TTree; | |
49 | class TGraph; | |
50 | ||
51 | class AliTPCCalibViewerGUI; | |
6fb51ca4 | 52 | class AliTPCConfigParser; |
5312f439 | 53 | |
54 | ||
55 | ||
56 | class AliTPCCalibViewerGUItime : public TGCompositeFrame { | |
57 | public: | |
58 | AliTPCCalibViewerGUItime(const TGWindow *p, UInt_t w, UInt_t h); | |
59 | virtual ~AliTPCCalibViewerGUItime(); | |
60 | ||
61 | static TObjArray* ShowGUI(const char* fileName = 0); // initialize and show GUI standalone | |
62 | ||
6fb51ca4 | 63 | void DrawGUI(const TGWindow */*p*/, UInt_t w, UInt_t h); |
5312f439 | 64 | |
65 | void UseFile(const char* fileName); | |
6fb51ca4 | 66 | void Reload(Int_t first=1); |
5312f439 | 67 | |
68 | ||
69 | void SetCalibViewerGUI(AliTPCCalibViewerGUI *gui) {fCalibViewerGUI=gui;} | |
70 | void SetCalibViewerGUItab(TGTabElement *tab) {fCalibViewerGUItab=tab;} | |
6fb51ca4 | 71 | void SetConfigFile(const char* file) {fConfigFile=file;} |
5312f439 | 72 | const char* GetDrawString(); |
73 | const char* GetCutString(); | |
74 | //Slots | |
75 | void DoDraw(); | |
76 | void DoDumpRuns(); | |
77 | void DoCustomDraw(); | |
78 | void DoCustomCutsDraw(); | |
79 | void DoParLimitChange(); | |
80 | void DoNewSelection(); // decides whether to redraw if user makes another selection | |
6fb51ca4 | 81 | void DoChangeSelectionList() {Reload(0);} |
5312f439 | 82 | void HandleButtonsDrawSel(Int_t id = -1); |
6fb51ca4 | 83 | void MouseMove(Int_t event, Int_t x, Int_t y, TObject */*selected*/); |
5312f439 | 84 | |
85 | private: | |
86 | TFile* fFile; //file that keeps the tree | |
87 | TTree* fTree; //internal tree | |
88 | AliTPCCalibViewerGUI *fCalibViewerGUI; //calib viewer gui used to display verbose information for one run | |
89 | TGTabElement *fCalibViewerGUItab; //tab the calib view gui redies in | |
90 | TH1* fCurrentHist; //histogram currently drawn in main canvas | |
91 | TGraph* fCurrentGraph; //current graph | |
92 | Int_t fCurrentRunDetails; //run number for wich details are currently shown | |
93 | TString fOutputCacheDir; //output cache diretory for AliTPCCalibViewerGUI trees, created on the fly | |
94 | TString fDrawString; //current draw string | |
6fb51ca4 | 95 | TString fConfigFile; //configuration file keeping active branches and branch descriptions |
96 | AliTPCConfigParser *fConfigParser; //configuration parser | |
5312f439 | 97 | Bool_t fIsCustomDraw; //if custom draw string is selected |
98 | TVectorD fRunNumbers; //run numbers of current selection | |
99 | TVectorD fTimeStamps; //timr stamps of current selection | |
100 | TVectorD fValuesX; //values of current selection | |
101 | TVectorD fValuesY; //values of current selection | |
102 | ||
103 | //GUI elements | |
104 | //main canvas Top part, bottom part | |
105 | TGCompositeFrame *fContTopBottom; // container for all GUI elements, vertical divided | |
106 | //top left, centre, right | |
107 | TGCompositeFrame *fContLCR; // container for all GUI elements, horizontal divided | |
108 | //content left | |
109 | TGCompositeFrame *fContLeft; // container for GUI elements on left side | |
110 | TGGroupFrame *fContDrawSel; // Subgroup for draw selection | |
111 | TGCompositeFrame *fContDrawSelSubRunTime; //Radio button subframe | |
112 | TGRadioButton *fRadioXhist; // Radio button x-variable: show only 1D distribution | |
113 | TGRadioButton *fRadioXrun; // Radio button x-variable: run | |
114 | TGRadioButton *fRadioXtime; // Radio button x-variable: time | |
115 | TGListBox *fListVariables; // listbox with possible variables | |
6fb51ca4 | 116 | TGComboBox *fComboRunType; // run type selection box |
117 | TGLabel *fLblRunType; // run type label | |
5312f439 | 118 | TGNumberEntry *fNmbPar; // parameter number |
119 | TGLabel *fLblPar; // parameter name | |
6fb51ca4 | 120 | TGListBox *fListCalibType; // calibration type selection box |
121 | TGGroupFrame *fContCalibType; // calibration type label | |
5312f439 | 122 | //content centre |
123 | TGCompositeFrame *fContCenter; // container for GUI elements at the center | |
124 | TRootEmbeddedCanvas *fCanvMain; // main drawing canvas | |
125 | //content right | |
126 | TGCompositeFrame *fContRight; // container for GUI elements on right side | |
127 | TGGroupFrame *fContValues; // container to keep data point information | |
128 | TGLabel *fLblRunNumber; // run number label | |
129 | TGLabel *fLblRunTime; // time stamp label | |
130 | TGLabel *fLblValueX; // value label | |
131 | TGLabel *fLblValueY; // value label | |
132 | TGLabel *fLblRunNumberVal; // run number of the data point hoovered | |
133 | TGLabel *fLblRunTimeVal; // time stamp of the data point hoovered | |
134 | TGLabel *fLblValueXVal; // value of the data point hoovered | |
135 | TGLabel *fLblValueYVal; // value of the data point hoovered | |
136 | TGTextButton *fBtnDumpRuns; // draw button | |
137 | //content bottom | |
138 | TGCompositeFrame *fContCustom; // container for custom draw command GUI elements | |
139 | TGCompositeFrame *fContCustomCuts; // container for custom cut options GUI elements | |
140 | TGLabel *fLblCustomDraw; // label for custom draw string | |
141 | TGLabel *fLblCustomCuts; // label for custom cuts string | |
142 | TGComboBox *fComboCustomDraw; // combo box custom draw string | |
143 | TGComboBox *fComboCustomCuts; // combo box custom cuts string | |
144 | ||
145 | enum { kRadioXhist=10, kRadioXrun=11, kRadioXtime=12 }; | |
6fb51ca4 | 146 | enum { kBranchOnOff=0, kBranchTitle=1, kCalibType=2, kParamNames=3 }; |
5312f439 | 147 | |
148 | void UpdateParLimits(); | |
6fb51ca4 | 149 | void UpdateParName(); |
5312f439 | 150 | void SetGuiTree(Int_t run); |
6fb51ca4 | 151 | void FillRunTypes(); |
152 | void FillCalibTypes(); | |
153 | void SetInitialValues(); | |
154 | const char* SubstituteUnderscores(const char* in); | |
5312f439 | 155 | |
156 | AliTPCCalibViewerGUItime(const AliTPCCalibViewerGUItime &v); | |
157 | AliTPCCalibViewerGUItime &operator = (const AliTPCCalibViewerGUItime &v); // assignment operator | |
158 | ||
159 | ClassDef(AliTPCCalibViewerGUItime, 0) | |
160 | ||
161 | }; | |
162 | ||
163 | #endif |