Fix for submitting merging for several runs
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 24 Jan 2011 08:24:41 +0000 (08:24 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 24 Jan 2011 08:24:41 +0000 (08:24 +0000)
ANALYSIS/AliAnalysisAlien.cxx
ANALYSIS/AliAnalysisSelector.cxx

index e45f3c3..ca01a78 100644 (file)
@@ -2840,7 +2840,7 @@ Bool_t AliAnalysisAlien::SubmitMerging()
       }
       delete list;
       Bool_t done = CheckMergedFiles(outputFile, runOutDir, fMaxMergeFiles, mergeJDLName);
-      if (!done) return kFALSE;
+      if (!done && (i==ntosubmit-1)) return kFALSE;
    }
    if (!ntosubmit) return kTRUE;
    Info("StartAnalysis", "\n#### STARTING AN ALIEN SHELL FOR YOU. EXIT WHEN YOUR MERGING JOBS HAVE FINISHED. #### \
index 2448320..2738386 100644 (file)
@@ -144,6 +144,9 @@ Bool_t AliAnalysisSelector::Process(Long64_t entry)
    if (returnCode <= 0) {
       cout << "Error retrieving event:" << entry << " Skipping ..." << endl;
       fAnalysis->CountEvent(1,0,1,0);
+      // Try to skip file
+      Abort("Bad stream to file. Trying next image.", kAbortFile);
+      return kFALSE;
    } else {
       fAnalysis->ExecAnalysis();
       if (returnCode<100000000) fAnalysis->CountEvent(1,1,0,0);