]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix for
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Nov 2009 12:08:35 +0000 (12:08 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Nov 2009 12:08:35 +0000 (12:08 +0000)
#59596  AliAnalisysManager crashes when looping over a TChain of local MC files

ANALYSIS/AliAnalysisTaskSE.cxx

index 125256e71c53414db788ac70163e6bbc91c4262a..fdaaa65efb1d93f87bf1d6c8b9977932e1982efa 100644 (file)
@@ -277,7 +277,11 @@ void AliAnalysisTaskSE::Exec(Option_t* option)
     if( fInputHandler ) {
        fEntry = fInputHandler->GetReadEntry();
     }
-    
+// Notify the change of run number
+    if (InputEvent()->GetRunNumber() != fCurrentRunNumber) {
+       fCurrentRunNumber = InputEvent()->GetRunNumber();
+       NotifyRun();
+    }    
           
     else if( fMCEvent )
        fEntry = fMCEvent->Header()->GetEvent(); 
@@ -451,16 +455,6 @@ Bool_t AliAnalysisTaskSE::IsStandardAOD() const
 
 Bool_t AliAnalysisTaskSE::Notify()
 {
-    // Called for every change of input file
-    if (fInputHandler) {
-       if (fInputHandler->GetTree()) 
-           fInputHandler->GetTree()->GetEntry(0);
-    }
-    
-    if (InputEvent()->GetRunNumber() != fCurrentRunNumber) {
-       fCurrentRunNumber = InputEvent()->GetRunNumber();
-       NotifyRun();
-    }
     return (UserNotify());
 }