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