Adding helper macros for calibration visualization
[u/mrichter/AliRoot.git] / TPC / scripts / startGUItime.C
CommitLineData
4ef03eb2 1//global variables to access the gui components
2AliTPCCalibViewerGUItime *guiTime=0x0;
3TObjArray *arrGUI=0x0;
4AliTPCCalibViewerGUI *gui=0x0;
5
6
7void startGUItime(const char* file=""){
8 TString filename(file);
9 if (filename.IsNull()){
10 filename=gSystem->ExpandPathName("$GUI_OUTDIR_TIME");
11 if (filename=="$GUI_OUTDIR_TIME") return;
12 if (!filename.EndsWith("/")) filename+="/";
13 filename+="calibTreeTime_*.root";
14 }
15 arrGUI=AliTPCCalibViewerGUItime::ShowGUI(filename.Data());
16 guiTime=(AliTPCCalibViewerGUItime*)arrGUI->At(0);
17 gui=(AliTPCCalibViewerGUI*)arrGUI->At(1);
18 TString cacheDir=gSystem->ExpandPathName("$GUI_OUTDIR_RUNS");
19 if (cacheDir=="$GUI_OUTDIR_RUNS") cacheDir="/tmp";
20 guiTime->SetCacheDir(cacheDir.Data());
21 TString refDataTree=gSystem->ExpandPathName("$REF_DATA_TREE");
22 if (!refDataTree.IsNull()&&refDataTree!="$REF_DATA_TREE"){
23 guiTime->AddReferenceTree(refDataTree.Data(),"Ref");
24 }
25}