]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/FORWARD/analysis2/scripts/LoadPars.C
Various
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / scripts / LoadPars.C
index 8fc8cd21cd2b5c1ba314368e2c281ce39bdedb18..7d05ea65a156eae01148d1155fa3fe3634a98096 100644 (file)
@@ -2,7 +2,7 @@
  * Set-up for a PROOF analysis job.   Make TProof object and load pars. 
  * 
  */
-void
+Bool_t
 LoadPars(Int_t nWorkers=4)
 {
   const char* option = nWorkers <= 0 ? "" : Form("workers=%d", nWorkers);
@@ -10,11 +10,21 @@ LoadPars(Int_t nWorkers=4)
   const char* pkgs[] = { "STEERBase", "ESD", "AOD", "ANALYSIS", 
                         "ANALYSISalice", "PWG2forward2", 0};
   const char** pkg = pkgs;
+  Bool_t ret = true;
   while (*pkg) { 
-    gProof->UploadPackage(Form("${ALICE_ROOT}/%s.par",*pkg));
-    gProof->EnablePackage(*pkg);    
+    if (gProof->UploadPackage(Form("${ALICE_ROOT}/%s.par",*pkg)) < 0) {
+      Error("LoadPars", "Failed to upload package %s", *pkg);
+      ret = false;
+      continue;
+    }
+    if (gProof->EnablePackage(*pkg) < 0) { 
+      Error("LoadPars", "Failed to enable package %s", *pkg);
+      ret = false;
+      continue;
+    }
     pkg++;
   }
+  return ret;
 }
 //
 // EOF