Index: trunk/MagicSoft/Mars/mbase/MAGIC.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MAGIC.h	(revision 689)
+++ trunk/MagicSoft/Mars/mbase/MAGIC.h	(revision 690)
@@ -10,9 +10,4 @@
 
 #include <TROOT.h>
-
-//
-// Magic number to detect the magic file type
-//
-// const UShort_t kMagicNumber = 0xc0c0;
 
 //
Index: trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 689)
+++ trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 690)
@@ -25,5 +25,5 @@
 
 
-//  ----------- please don't delete ------------
+/*/  ----------- please don't delete ------------
 #define kBUFSZ 1024
 
@@ -53,5 +53,5 @@
     }
 };
-
+*/
 
 MRawFileRead::MRawFileRead(const char *fname, const char *name, const char *title)
@@ -63,5 +63,5 @@
     // open the input stream
     //
-    fIn = new bifstream(fname);
+    fIn = new ifstream(fname);
 
     if (!(*fIn))
@@ -109,4 +109,7 @@
     fRawRunHeader->ReadEvt(*fIn);
     fRawRunHeader->Print();
+
+    if (fRawRunHeader->GetMagicNumber()!=kMagicNumber)
+        return kFALSE;
 
     //
Index: trunk/MagicSoft/Mars/mraw/MRawFileRead.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawFileRead.h	(revision 689)
+++ trunk/MagicSoft/Mars/mraw/MRawFileRead.h	(revision 690)
@@ -6,5 +6,5 @@
 #endif
 
-class bifstream;
+class ifstream;
 
 class MTime;
@@ -24,5 +24,5 @@
     MTime          *fRawEvtTime;    // raw evt time information container to fill from file
 
-    bifstream      *fIn;            //! buffered input stream (file to read from)
+    ifstream       *fIn;            //! buffered input stream (file to read from)
 
 public:
Index: trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 689)
+++ trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 690)
@@ -88,5 +88,5 @@
     //
     *fLog << endl;
-    *fLog << "MagicNumber:  0x" << hex << fMagicNumber << " - " << (fMagicNumber==0xc0c0?"OK":"Wrong!") << endl;
+    *fLog << "MagicNumber:  0x" << hex << fMagicNumber << " - " << (fMagicNumber==kMagicNumber?"OK":"Wrong!") << endl;
     *fLog << "Version:      " << dec << "Format=" << fFormatVersion << "  ";
     *fLog << "Software=" << fSoftVersion << endl;
Index: trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawRunHeader.h	(revision 689)
+++ trunk/MagicSoft/Mars/mraw/MRawRunHeader.h	(revision 690)
@@ -15,4 +15,7 @@
 class MArrayS;
 
+//
+// Magic number to detect the magic file type
+//
 const UShort_t kMagicNumber = 0xc0c0;
 
