]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisTaskSE.cxx
Fix for
[u/mrichter/AliRoot.git] / 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());
 }