Adding helper macros for calibration visualization
[u/mrichter/AliRoot.git] / TPC / scripts / startGUI.C
1 TObjArray *arrGUI=0x0;
2 TTree *calPads=0x0;
3 TTree *calPads2=0x0;
4 AliTPCCalibViewerGUI *gui=0x0;
5 AliTPCCalibViewerGUI *gui2=0x0;
6 AliTPCCalibViewer *viewer=0x0;
7 AliTPCCalibViewer *viewer2=0x0;
8
9 startGUI(char *file=0x0){
10   if ( file ) {
11     arrGUI=AliTPCCalibViewerGUI::ShowGUI(file);
12     gui=((AliTPCCalibViewerGUI*)arrGUI->At(0));
13     gui2=((AliTPCCalibViewerGUI*)arrGUI->At(1));
14     viewer=gui->GetViewer();
15     viewer2=gui2->GetViewer();
16     calPads=viewer->GetTree();
17     calPads2=viewer2->GetTree();
18     TString refDataTree=gSystem->ExpandPathName("$REF_DATA_TREE");
19     if (!refDataTree.IsNull()&&refDataTree!="$REF_DATA_TREE"){
20       viewer->AddReferenceTree(refDataTree.Data(),"calPads","Ref");
21       viewer2->AddReferenceTree(refDataTree.Data(),"calPads","Ref");
22       gui->Reload();
23       gui2->Reload();
24     }
25   }
26 }