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