1 #ifndef AliTPCCalibViewerGUItime_H
2 #define AliTPCCalibViewerGUItime_H
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 displaying calibration entires over time //
12 // Calibration Trees are created using the macro TPC/CalibMacros/CalibEnv.C //
13 // used for the calibration monitor //
15 ///////////////////////////////////////////////////////////////////////////////
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>
37 class TGCompositeFrame;
38 class TRootEmbeddedCanvas;
51 class AliTPCCalibViewerGUI;
52 class AliTPCConfigParser;
56 class AliTPCCalibViewerGUItime : public TGCompositeFrame {
58 AliTPCCalibViewerGUItime(const TGWindow *p, UInt_t w, UInt_t h);
59 virtual ~AliTPCCalibViewerGUItime();
61 static TObjArray* ShowGUI(const char* fileName = 0); // initialize and show GUI standalone
63 void DrawGUI(const TGWindow */*p*/, UInt_t w, UInt_t h);
65 void UseFile(const char* fileName);
66 void Reload(Int_t first=1);
69 void SetCalibViewerGUI(AliTPCCalibViewerGUI *gui) {fCalibViewerGUI=gui;}
70 void SetCalibViewerGUItab(TGTabElement *tab) {fCalibViewerGUItab=tab;}
71 void SetConfigFile(const char* file) {fConfigFile=file;}
72 const char* GetDrawString();
73 const char* GetCutString();
78 void DoCustomCutsDraw();
79 void DoParLimitChange();
80 void DoNewSelection(); // decides whether to redraw if user makes another selection
81 void DoChangeSelectionList() {Reload(0);}
82 void HandleButtonsDrawSel(Int_t id = -1);
83 void MouseMove(Int_t event, Int_t x, Int_t y, TObject */*selected*/);
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
95 TString fConfigFile; //configuration file keeping active branches and branch descriptions
96 AliTPCConfigParser *fConfigParser; //configuration parser
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
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
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
116 TGComboBox *fComboRunType; // run type selection box
117 TGLabel *fLblRunType; // run type label
118 TGNumberEntry *fNmbPar; // parameter number
119 TGLabel *fLblPar; // parameter name
120 TGListBox *fListCalibType; // calibration type selection box
121 TGGroupFrame *fContCalibType; // calibration type label
123 TGCompositeFrame *fContCenter; // container for GUI elements at the center
124 TRootEmbeddedCanvas *fCanvMain; // main drawing canvas
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
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
145 enum { kRadioXhist=10, kRadioXrun=11, kRadioXtime=12 };
146 enum { kBranchOnOff=0, kBranchTitle=1, kCalibType=2, kParamNames=3 };
148 void UpdateParLimits();
149 void UpdateParName();
150 void SetGuiTree(Int_t run);
152 void FillCalibTypes();
153 void SetInitialValues();
154 const char* SubstituteUnderscores(const char* in);
156 AliTPCCalibViewerGUItime(const AliTPCCalibViewerGUItime &v);
157 AliTPCCalibViewerGUItime &operator = (const AliTPCCalibViewerGUItime &v); // assignment operator
159 ClassDef(AliTPCCalibViewerGUItime, 0)