Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2619)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2620)
@@ -4,4 +4,11 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2003/12/08: Thomas Bretz
+
+   * mraw/MRawFileRead.cc:
+     - implemented an artificial time-stamp for the current data
+
+
+
  2003/12/07: Thomas Bretz
 
Index: trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 2619)
+++ trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 2620)
@@ -231,4 +231,34 @@
     }
 
+    {
+        // FIXME This is a stupid workaround for the missing time stamp!
+        //       Might be used depending on the run number in the future
+        static Double_t tm = 0; // Range of roughly 8min
+        const UInt_t ct = (*fRawCrateArray)[0]->GetFADCClockTick();
+
+        tm = ct<tm ? fmod(tm, (UInt_t)(-1))+(UInt_t)(-1)+ct : ct;
+
+        const Double_t mhz = 9.375;                        // [1e6 ticks/s]
+        const Double_t t   = tm/mhz;                       // [us]
+        cout << (ULong_t)t << endl;
+        const UInt_t ns    = (UInt_t)fmod(t*1e3, 1e6);
+        const UShort_t ms  = (UShort_t)fmod(t/1e3, 1e3);
+        const Byte_t s     = (Byte_t)fmod(t/1e6, 60);
+
+        // Create an artificial time stamp!
+        UInt_t m     = (Byte_t)fmod(t/60e6, 60);
+        //const Byte_t h     = (Byte_t)(t/3600e6);
+        m += fRawRunHeader->GetRunNumber()*10;
+        m %= 360; // 6h
+
+        fRawEvtTime->Set(fRawRunHeader->GetDateYear(),
+                         fRawRunHeader->GetDateMonth(),
+                         fRawRunHeader->GetDateDay(),
+                         m/60, m%60, s, ms, ns);
+
+        //cout << tm << ": ";
+        //fRawEvtTime->Print();
+    }
+
     return kTRUE;
 }
