Changes needed by the online event reconstruction: AliRawReaderDate's NextEvent(...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Mar 2008 12:41:54 +0000 (12:41 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Mar 2008 12:41:54 +0000 (12:41 +0000)
RAW/AliRawReaderDate.cxx

index 0f72d48e766140099470d3794890d74efd0ccdaa..88c3e6515b2be04d3aba741c3dfbc427cc6f0879 100644 (file)
@@ -514,7 +514,14 @@ Bool_t AliRawReaderDate::NextEvent()
 // go to the next event in the date file
 
 #ifdef ALI_DATE
-  if (!fFile) return kFALSE;
+  if (!fFile) {
+    if (fEventNumber < 0 && fEvent) {
+      fEventNumber++;
+      return kTRUE;
+    }
+    else
+      return kFALSE;
+  }
 
   Reset();
   eventHeaderStruct header;
@@ -549,9 +556,9 @@ Bool_t AliRawReaderDate::RewindEvents()
 {
 // go back to the beginning of the date file
 
-  if (!fFile) return kFALSE;
+  if (fFile)
+    fseek(fFile, 0, SEEK_SET);
 
-  fseek(fFile, 0, SEEK_SET);
   fEventNumber = -1;
   return Reset();
 }