]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/EventMixing/AliMixInputEventHandler.cxx
Event mixing is now working propertly with buffersize > 1 + Mixing info fixed
[u/mrichter/AliRoot.git] / ANALYSIS / EventMixing / AliMixInputEventHandler.cxx
index 3294e24c2871f81cc5c1cc47f6cfd8fd8f79a83e..6220343ae46701710a29bd3365ecdc4c04e29579 100644 (file)
@@ -341,12 +341,16 @@ Bool_t AliMixInputEventHandler::MixBuffer()
       } else {
          AliDebug(AliLog::kDebug + 3, Form("Preparing InputEventHandler(%d)", counter));
          mihi->PrepareEntry(te, entryMix, (AliInputEventHandler *)InputEventHandler(counter), fAnalysisType);
-         // runs UserExecMix for all tasks
-         UserExecMixAllTasks(fEntryCounter, idEntryList, fEntryCounter, entryMixReal, counter);
          fNumberMixed++;
       }
       counter++;
    }
+
+   if (fNumberMixed == fBufferSize) {
+      // runs UserExecMix for all tasks
+      UserExecMixAllTasks(fEntryCounter, idEntryList, fEntryCounter, entryMixReal, counter);
+   }
+   
    AliDebug(AliLog::kDebug + 3, Form("fEntryCounter=%lld fMixEventNumber=%d", fEntryCounter, fNumberMixed));
    AliDebug(AliLog::kDebug + 3, Form("++++++++++++++ END SETUP EVENT %lld +++++++++++++++++++", fEntryCounter));
    AliDebug(AliLog::kDebug + 5, Form("->"));