Skip standard output while buffer is not ready.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Jan 2009 09:41:36 +0000 (09:41 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Jan 2009 09:41:36 +0000 (09:41 +0000)
ANALYSIS/AliAnalysisTaskME.cxx

index 99d9d24..4be9966 100644 (file)
@@ -142,13 +142,18 @@ void AliAnalysisTaskME::Exec(Option_t* option)
        fEntry = fInputHandler->GetReadEntry();
     if ( !((Entry()-1)%100) && fDebug > 0) 
          AliInfo(Form("%s ----> Processing event # %lld", CurrentFileName(), Entry()));
-         
+
+    AliAODHandler* outputHandler = (AliAODHandler*) 
+       ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());         
 // Call the user analysis    
     if (fInputHandler->IsBufferReady()) {
        if ((fFreshBufferOnly && fInputHandler->IsFreshBuffer()) || !fFreshBufferOnly)
        {
+           outputHandler->SetFillAOD(kTRUE);
            UserExec(option);
            PostData(0, fTreeA);
+       } else {
+           outputHandler->SetFillAOD(kFALSE);
        }
     } else {
        AliInfo(Form("Waiting for buffer to be ready !\n"));