Adding helper macros for calibration visualization
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Oct 2009 19:50:55 +0000 (19:50 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Oct 2009 19:50:55 +0000 (19:50 +0000)
(Jens Wiechula)

TPC/scripts/loadlibsREC.C [new file with mode: 0644]
TPC/scripts/startGUI.C [new file with mode: 0644]
TPC/scripts/startGUItime.C [new file with mode: 0644]

diff --git a/TPC/scripts/loadlibsREC.C b/TPC/scripts/loadlibsREC.C
new file mode 100644 (file)
index 0000000..40be969
--- /dev/null
@@ -0,0 +1,31 @@
+void loadlibsREC ()
+{
+  gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/ -I$ALICE_ROOT/include -I$ALICE_ROOT/STEER  -I$ALICE_ROOT/TPC -I$ALICE_ROOT/TPC/CalibMacros -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TRD ");
+  gSystem->Load("libCore");
+  gSystem->Load("libPhysics");
+  gSystem->Load("libMinuit");
+  gSystem->Load("libGui.so");
+
+  gSystem->Load("libGeom");
+  gSystem->Load("libVMC");
+
+  gSystem->Load("libNet");
+  gSystem->Load("libTree");
+  gSystem->Load("libProof");
+
+  gSystem->Load("libSTEERBase");
+  gSystem->Load("libESD");
+  gSystem->Load("libCDB");
+  gSystem->Load("libRAWDatabase");
+  gSystem->Load("libRAWDatarec");
+  gSystem->Load("libSTEER");
+  gSystem->Load("libANALYSIS");
+  
+  gSystem->Load("libTPCbase");
+  gSystem->Load("libTPCrec");
+  gSystem->Load("libTPCcalib");
+  
+  gSystem->Load("libSTAT");
+  
+  gSystem->Load("libThread");
+}
diff --git a/TPC/scripts/startGUI.C b/TPC/scripts/startGUI.C
new file mode 100644 (file)
index 0000000..0e88894
--- /dev/null
@@ -0,0 +1,26 @@
+TObjArray *arrGUI=0x0;
+TTree *calPads=0x0;
+TTree *calPads2=0x0;
+AliTPCCalibViewerGUI *gui=0x0;
+AliTPCCalibViewerGUI *gui2=0x0;
+AliTPCCalibViewer *viewer=0x0;
+AliTPCCalibViewer *viewer2=0x0;
+
+startGUI(char *file=0x0){
+  if ( file ) {
+    arrGUI=AliTPCCalibViewerGUI::ShowGUI(file);
+    gui=((AliTPCCalibViewerGUI*)arrGUI->At(0));
+    gui2=((AliTPCCalibViewerGUI*)arrGUI->At(1));
+    viewer=gui->GetViewer();
+    viewer2=gui2->GetViewer();
+    calPads=viewer->GetTree();
+    calPads2=viewer2->GetTree();
+    TString refDataTree=gSystem->ExpandPathName("$REF_DATA_TREE");
+    if (!refDataTree.IsNull()&&refDataTree!="$REF_DATA_TREE"){
+      viewer->AddReferenceTree(refDataTree.Data(),"calPads","Ref");
+      viewer2->AddReferenceTree(refDataTree.Data(),"calPads","Ref");
+      gui->Reload();
+      gui2->Reload();
+    }
+  }
+}
diff --git a/TPC/scripts/startGUItime.C b/TPC/scripts/startGUItime.C
new file mode 100644 (file)
index 0000000..2ea2d9c
--- /dev/null
@@ -0,0 +1,25 @@
+//global variables to access the gui components
+AliTPCCalibViewerGUItime *guiTime=0x0;
+TObjArray *arrGUI=0x0;
+AliTPCCalibViewerGUI *gui=0x0;
+
+
+void startGUItime(const char* file=""){
+  TString filename(file);
+  if (filename.IsNull()){
+    filename=gSystem->ExpandPathName("$GUI_OUTDIR_TIME");
+    if (filename=="$GUI_OUTDIR_TIME") return;
+    if (!filename.EndsWith("/")) filename+="/";
+    filename+="calibTreeTime_*.root";
+  }
+  arrGUI=AliTPCCalibViewerGUItime::ShowGUI(filename.Data());
+  guiTime=(AliTPCCalibViewerGUItime*)arrGUI->At(0);
+  gui=(AliTPCCalibViewerGUI*)arrGUI->At(1);
+  TString cacheDir=gSystem->ExpandPathName("$GUI_OUTDIR_RUNS");
+  if (cacheDir=="$GUI_OUTDIR_RUNS") cacheDir="/tmp";
+  guiTime->SetCacheDir(cacheDir.Data());
+  TString refDataTree=gSystem->ExpandPathName("$REF_DATA_TREE");
+  if (!refDataTree.IsNull()&&refDataTree!="$REF_DATA_TREE"){
+    guiTime->AddReferenceTree(refDataTree.Data(),"Ref");
+  }
+}