Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 4039)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 4040)
@@ -18,8 +18,22 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2004/05/10: Thomas Bretz
+
+   * mraw/MRawEvtHeader.[h,cc]:
+     - changed return type of ReadEvt from int to Int_t
+     - Enhanced output in case of invalid time
+
+   * mraw/MRawRead.cc:
+     - fixed the return type of ReadEvt (was bool instead of int)
+       which confused merpp completely in case of invalid times
+
+
+
  2004/05/10: Markus Gaug
 
    * macros/calibrate_data.C
      - updated setting of arr. time extractor
+
+
 
  2004/05/09: Thomas Bretz
Index: /trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc	(revision 4039)
+++ /trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc	(revision 4040)
@@ -293,5 +293,11 @@
     // with the start-date/time of the run (after reading the run header)
     //
-    return fTime->UpdMagicTime(h, m, s, ns);
+    if (fTime->UpdMagicTime(h, m, s, ns))
+        return kTRUE;
+
+    *fLog << warn << "WARNING - Time (" << Form("%2d:%02d:%02d,%09d", h, m, s, ns);
+    *fLog << ") in header of event #" << dec << fDAQEvtNumber << " invalid..." << endl;
+ 
+    return kFALSE;
 }
 
@@ -309,5 +315,5 @@
 // Remark: This 'feature' disallows single runs of more than 11h!
 //
-int MRawEvtHeader::ReadEvt(istream &fin, UShort_t ver)
+Int_t MRawEvtHeader::ReadEvt(istream &fin, UShort_t ver)
 {
     fin.read((char*)&fDAQEvtNumber, 4);  // Total=4
@@ -319,5 +325,4 @@
         if (!DecodeTime(abstime))
         {
-            *fLog << warn << "WARNING - Event time in event header invalid..." << endl;
             // Skip the rest of the header in case of merpps force-mode
             fin.seekg(GetNumBytes()-12, ios::cur);
Index: /trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h	(revision 4039)
+++ /trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h	(revision 4040)
@@ -67,5 +67,5 @@
     UInt_t GetTriggerID() const;
 
-    int ReadEvt(istream& fin, UShort_t ver);
+    Int_t ReadEvt(istream& fin, UShort_t ver);
     void SkipEvt(istream& fin, UShort_t ver);
 
Index: /trunk/MagicSoft/Mars/mraw/MRawRead.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawRead.cc	(revision 4039)
+++ /trunk/MagicSoft/Mars/mraw/MRawRead.cc	(revision 4040)
@@ -165,5 +165,5 @@
     // if there is no next event anymore stop eventloop
     //
-    const Bool_t rc = fRawEvtHeader->ReadEvt(fin, ver);
+    const Int_t rc = fRawEvtHeader->ReadEvt(fin, ver);
     if (rc==kCONTINUE && fForceMode==kFALSE)
     {
