Various
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2011 15:40:28 +0000 (15:40 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2011 15:40:28 +0000 (15:40 +0000)
PWG2/FORWARD/analysis2/AddTaskCentral.C
PWG2/FORWARD/analysis2/AliForwarddNdetaTask.cxx
PWG2/FORWARD/analysis2/MakeAOD.C
PWG2/FORWARD/analysis2/scripts/LoadPars.C

index ddc5d55..949faf1 100644 (file)
@@ -13,7 +13,8 @@
  * 
  * @ingroup pwg2_forward_scripts
  */
-AliAnalysisTask* AddTaskCentral(UShort_t sys=1, UShort_t sNN=900, Short_t field=5)
+AliAnalysisTask* AddTaskCentral(UShort_t sys=1, UShort_t sNN=900, 
+                               Short_t field=5)
 {
   gSystem->Load("libPWG2forward2");
 
index 97f6bec..2414a01 100644 (file)
@@ -10,7 +10,7 @@
 #include <AliAODHandler.h>
 #include <AliAODInputHandler.h>
 #include "AliForwardUtil.h"
-#include <AliAODForwardMult.h>
+#include "AliAODForwardMult.h"
 
 //____________________________________________________________________
 AliForwarddNdetaTask::AliForwarddNdetaTask()
index 29c9b98..95a15fc 100644 (file)
@@ -31,7 +31,10 @@ void MakeAOD(const char* esddir,
   // --- Check for proof mode, and possibly upload pars --------------
   if (proof> 0) { 
     gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/LoadPars.C");
-    LoadPars(proof);
+    if (!LoadPars(proof)) { 
+      Error("MakeAOD", "Failed to load PARs");
+      return;
+    }
   }
   
   // --- Our data chain ----------------------------------------------
@@ -95,15 +98,11 @@ void MakeAOD(const char* esddir,
 
 #if 1
   // Centrality 
-  gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/Compile.C");
-  Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskCopyHeader.C","");
-  // Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/AliESDCentrality.C","");
-  AddTaskCopyHeader();
-
-
-  // Central multiplicity
-  // Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskCentralMult.C","");
-  // AddTaskCentralMult();
+  if (!proof) {
+    gROOT->LoadMacro("$ALICE_ROOT/PWG2/FORWARD/analysis2/scripts/Compile.C");
+    Compile("$ALICE_ROOT/PWG2/FORWARD/analysis2/AddTaskCopyHeader.C","");
+    AddTaskCopyHeader();
+  }
 #endif
 
   // FMD 
@@ -130,7 +129,8 @@ void MakeAOD(const char* esddir,
 
   // Run the train 
   t.Start();
-  Printf("=== RUNNING ANALYSIS ==================================");
+  Printf("=== RUNNING ANALYSIS on %9d events ==========================",
+        nEvents);
   mgr->StartAnalysis(proof ? "proof" : "local", chain, nEvents);
   t.Stop();
   t.Print();
index 8fc8cd2..7d05ea6 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