ED goes to first event after reaching last in a file
authorjniedzie <jeremi.niedziela@cern.ch>
Thu, 19 Feb 2015 08:59:13 +0000 (09:59 +0100)
committerjniedzie <jeremi.niedziela@cern.ch>
Thu, 19 Feb 2015 08:59:13 +0000 (09:59 +0100)
EVE/EveBase/AliEveEventManager.cxx

index ce2a692..5eb2f35 100644 (file)
@@ -1308,16 +1308,24 @@ void AliEveEventManager::NextEvent()
     }
     else if ((fESDTree!=0) || (fHLTESDTree!=0))
     {
+      cout<<"There is ESD or HLTESD tree"<<endl;
       Int_t nextevent=0;
       if (fPEventSelector->FindNext(nextevent))
       {
+       cout<<"GotoEvent:"<<nextevent<<endl;
         GotoEvent(nextevent);
       }
     }
     else if (fEventId < GetMaxEventId(kTRUE))
     {
+      cout<<"GotoEvent:"<<fEventId+1<<endl;
       GotoEvent(fEventId + 1);
     }
+    else
+      {
+       cout<<"Going back to event 0"<<endl;
+       GotoEvent(0);
+      }
     
     gSystem->ProcessEvents();
     
@@ -1997,8 +2005,9 @@ void AliEveEventManager::AutoLoadNextEvent()
 
        StopAutoLoadTimer();
        NextEvent();
-       if (fAutoLoad || fLoopMarked)
+       if (fAutoLoad || fLoopMarked){
                StartAutoLoadTimer();
+       }
 }
 
 //------------------------------------------------------------------------------