]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/FORWARD/analysis2/qa/RunQA.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / qa / RunQA.C
index 54cf415f6a30e0c65e279590bbb8aa08d7da4460..4d396868de1bd02cc8f780042e56bc54fec85922 100644 (file)
@@ -43,12 +43,20 @@ RunQA(const char* input,
       Long_t      runNo) 
 {
   Bool_t keep = true;
-  gROOT->SetMacroPath(Form(".:$(ANA_SRC)/qa:$(ANA_SRC)/corrs:"
-                          "$(ALICE_ROOT)/PWGLF/FORWARD/analysis2/qa:"
-                          "$(ALICE_ROOT)/PWGLF/FORWARD/analysis2/corrs:"
-                          "%s",
-                          gROOT->GetMacroPath()));
-  gSystem->AddIncludePath("-I${ALICE_ROOT}/PWGLF/FORWARD/analysis2/qa");
+  TString fwd(gSystem->Getenv("QA_FWD"));
+  TString mac(gROOT->GetMacroPath());
+  if (!fwd.IsNull()) {
+    mac.Prepend(Form(".:%s:",fwd.Data()));
+    gSystem->AddIncludePath(Form("-I%s", fwd.Data()));
+  }
+  else { 
+    fwd = gSystem->Getenv("ANA_SRC");
+    if (fwd.IsNull()) 
+      fwd = "$(ALICE_ROOT)/PWGLF/FORWARD/analysis2";
+    mac.Prepend(Form(".:%s/qa:%s/corrs:",fwd.Data(), fwd.Data()));
+    gSystem->AddIncludePath(Form("-I%s/qa", fwd.Data()));
+  }
+  gROOT->SetMacroPath(mac);
   gSystem->Load("libGpad");
   gSystem->Load("libTree");