Index: trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 8351)
+++ trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 8352)
@@ -18,5 +18,5 @@
 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2004
+!   Copyright: MAGIC Software Development, 2000-2007
 !
 !
Index: trunk/MagicSoft/Mars/mraw/MRawRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawRead.cc	(revision 8351)
+++ trunk/MagicSoft/Mars/mraw/MRawRead.cc	(revision 8352)
@@ -18,5 +18,5 @@
 !   Author(s): Thomas Bretz 10/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2004
+!   Copyright: MAGIC Software Development, 2000-2007
 !
 !
@@ -197,5 +197,5 @@
     // Calculate the number of byte to be skipped in a file if a pixel is not connected
     //
-    const UShort_t nskip = fRawRunHeader->GetNumSamplesLoGain()+fRawRunHeader->GetNumSamplesHiGain();
+    const UShort_t nskip = fRawRunHeader->GetNumSamples()*fRawRunHeader->GetNumBytesPerSample();
 
     //
@@ -216,5 +216,5 @@
         {
             // calc the spiral hardware pixel number
-             const UShort_t ipos = posinarray*npic+j;
+            const UShort_t ipos = posinarray*npic+j;
 
             // Get Hardware Id
@@ -230,8 +230,15 @@
             // -1 converts the hardware pixel Id into the software pixel index
             if (hwid>0)
-                fRawEvtData1->ReadPixel(fin,   hwid-1,  TESTBIT(ab, j));
+                fRawEvtData1->ReadPixel(fin,   hwid-1);
             else
-                fRawEvtData2->ReadPixel(fin, -(hwid+1), TESTBIT(ab, j));
-
+                fRawEvtData2->ReadPixel(fin, -(hwid+1));
+
+            if (ver>=7)
+                continue;
+
+            if (hwid>0)
+                fRawEvtData1->SetABFlag(  hwid-1,  TESTBIT(ab, j));
+            else
+                fRawEvtData1->SetABFlag(-(hwid+1), TESTBIT(ab, j));
         }
         if (!fin)
