--This li
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibViewerGUItime.h
CommitLineData
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
37class TGCompositeFrame;
38class TRootEmbeddedCanvas;
39class TGTextButton;
40class TGListBox;
41class TGRadioButton;
42class TGGroupFrame;
43class TGLabel;
44class TGComboBox;
45class TGTabElement;
46
47class TFile;
48class TTree;
49class TGraph;
50
51class AliTPCCalibViewerGUI;
52
53
54
55class AliTPCCalibViewerGUItime : public TGCompositeFrame {
56public:
57 AliTPCCalibViewerGUItime(const TGWindow *p, UInt_t w, UInt_t h);
58 virtual ~AliTPCCalibViewerGUItime();
59
60 static TObjArray* ShowGUI(const char* fileName = 0); // initialize and show GUI standalone
61
62 void DrawGUI(const TGWindow *p, UInt_t w, UInt_t h);
63
64 void UseFile(const char* fileName);
65 void Reload();
66 void SetInitialValues();
67
68
69 void SetCalibViewerGUI(AliTPCCalibViewerGUI *gui) {fCalibViewerGUI=gui;}
70 void SetCalibViewerGUItab(TGTabElement *tab) {fCalibViewerGUItab=tab;}
71 const char* GetDrawString();
72 const char* GetCutString();
73 //Slots
74 void DoDraw();
75 void DoDumpRuns();
76 void DoCustomDraw();
77 void DoCustomCutsDraw();
78 void DoParLimitChange();
79 void DoNewSelection(); // decides whether to redraw if user makes another selection
80 void HandleButtonsDrawSel(Int_t id = -1);
81 void MouseMove(Int_t event, Int_t x, Int_t y, TObject *selected);
82
83private:
84 TFile* fFile; //file that keeps the tree
85 TTree* fTree; //internal tree
86 AliTPCCalibViewerGUI *fCalibViewerGUI; //calib viewer gui used to display verbose information for one run
87 TGTabElement *fCalibViewerGUItab; //tab the calib view gui redies in
88 TH1* fCurrentHist; //histogram currently drawn in main canvas
89 TGraph* fCurrentGraph; //current graph
90 Int_t fCurrentRunDetails; //run number for wich details are currently shown
91 TString fOutputCacheDir; //output cache diretory for AliTPCCalibViewerGUI trees, created on the fly
92 TString fDrawString; //current draw string
93 Bool_t fIsCustomDraw; //if custom draw string is selected
94 TVectorD fRunNumbers; //run numbers of current selection
95 TVectorD fTimeStamps; //timr stamps of current selection
96 TVectorD fValuesX; //values of current selection
97 TVectorD fValuesY; //values of current selection
98
99 //GUI elements
100 //main canvas Top part, bottom part
101 TGCompositeFrame *fContTopBottom; // container for all GUI elements, vertical divided
102 //top left, centre, right
103 TGCompositeFrame *fContLCR; // container for all GUI elements, horizontal divided
104 //content left
105 TGCompositeFrame *fContLeft; // container for GUI elements on left side
106 TGGroupFrame *fContDrawSel; // Subgroup for draw selection
107 TGCompositeFrame *fContDrawSelSubRunTime; //Radio button subframe
108 TGRadioButton *fRadioXhist; // Radio button x-variable: show only 1D distribution
109 TGRadioButton *fRadioXrun; // Radio button x-variable: run
110 TGRadioButton *fRadioXtime; // Radio button x-variable: time
111 TGListBox *fListVariables; // listbox with possible variables
112 TGComboBox *fComboRunType; // parameter number
113 TGLabel *fLblRunType; // parameter name
114 TGNumberEntry *fNmbPar; // parameter number
115 TGLabel *fLblPar; // parameter name
116 //content centre
117 TGCompositeFrame *fContCenter; // container for GUI elements at the center
118 TRootEmbeddedCanvas *fCanvMain; // main drawing canvas
119 //content right
120 TGCompositeFrame *fContRight; // container for GUI elements on right side
121 TGGroupFrame *fContValues; // container to keep data point information
122 TGLabel *fLblRunNumber; // run number label
123 TGLabel *fLblRunTime; // time stamp label
124 TGLabel *fLblValueX; // value label
125 TGLabel *fLblValueY; // value label
126 TGLabel *fLblRunNumberVal; // run number of the data point hoovered
127 TGLabel *fLblRunTimeVal; // time stamp of the data point hoovered
128 TGLabel *fLblValueXVal; // value of the data point hoovered
129 TGLabel *fLblValueYVal; // value of the data point hoovered
130 TGTextButton *fBtnDumpRuns; // draw button
131 //content bottom
132 TGCompositeFrame *fContCustom; // container for custom draw command GUI elements
133 TGCompositeFrame *fContCustomCuts; // container for custom cut options GUI elements
134 TGLabel *fLblCustomDraw; // label for custom draw string
135 TGLabel *fLblCustomCuts; // label for custom cuts string
136 TGComboBox *fComboCustomDraw; // combo box custom draw string
137 TGComboBox *fComboCustomCuts; // combo box custom cuts string
138
139 enum { kRadioXhist=10, kRadioXrun=11, kRadioXtime=12 };
140
141 void UpdateParLimits();
142 void SetGuiTree(Int_t run);
143
144 AliTPCCalibViewerGUItime(const AliTPCCalibViewerGUItime &v);
145 AliTPCCalibViewerGUItime &operator = (const AliTPCCalibViewerGUItime &v); // assignment operator
146
147 ClassDef(AliTPCCalibViewerGUItime, 0)
148
149};
150
151#endif