Index: trunk/Mars/mcorsika/MCorsikaEvtHeader.cc
===================================================================
--- trunk/Mars/mcorsika/MCorsikaEvtHeader.cc	(revision 9946)
+++ trunk/Mars/mcorsika/MCorsikaEvtHeader.cc	(revision 9949)
@@ -129,10 +129,11 @@
 Int_t MCorsikaEvtHeader::ReadEvt(MCorsikaFormat *fInFormat)
 {
-    if (!fInFormat->SeekNextBlock("EVTH", 1202))
-        return kFALSE;
+    const Int_t rc=fInFormat->SeekNextBlock("EVTH", 1202);
+    if (rc!=kTRUE)
+        return rc;
 
     Float_t f[273];
     if (!fInFormat->ReadData(272, f))
-        return kFALSE;
+        return kERROR;
 
     fEvtNumber  = TMath::Nint(f[0]);
@@ -169,5 +170,5 @@
     fWeightedNumPhotons = 0;
 
-    return !fInFormat->Eof();
+    return fInFormat->Eof() ? kERROR : kTRUE;
 }
 
@@ -177,13 +178,12 @@
 Int_t MCorsikaEvtHeader::ReadEvtEnd(MCorsikaFormat * fInFormat)
 {
-    if (!fInFormat->SeekNextBlock("EVTE", 1209))
-        return kFALSE;
+    if (fInFormat->SeekNextBlock("EVTE", 1209)!=kTRUE)
+        return kERROR;
 
     //fin.seekg(-1088,ios::cur);
 
     Float_t f[2];
-
     if (!fInFormat->ReadData(2, f))
-        return kFALSE;
+        return kERROR;
 
     const UInt_t evtnum = TMath::Nint(f[0]);
@@ -199,4 +199,4 @@
     fWeightedNumPhotons = f[1];
 
-    return !fInFormat->Eof();
-}
+    return fInFormat->Eof() ? kERROR : kTRUE;
+}
Index: trunk/Mars/mcorsika/MCorsikaFormat.cc
===================================================================
--- trunk/Mars/mcorsika/MCorsikaFormat.cc	(revision 9946)
+++ trunk/Mars/mcorsika/MCorsikaFormat.cc	(revision 9949)
@@ -151,5 +151,5 @@
 // of the id.
 //
-Bool_t MCorsikaFormatRaw::SeekNextBlock(const char * id, unsigned short type) const
+Int_t MCorsikaFormatRaw::SeekNextBlock(const char * id, unsigned short type) const
 {
     char blockHeader[5]="\0\0\0\0";
@@ -162,11 +162,11 @@
     // but find the end of a run. This is expected, therefor no error
     // message.
-    if (strcmp(id, "EVTH")==0 && strcmp(blockHeader, "RUNE")==0)
-        return kTRUE;
+    if (strcmp(blockHeader, "RUNE")==0)
+        return kFALSE;
 
     gLog << err << "ERROR - Wrong identifier: " << id << " expected.";
     gLog << " But read " << blockHeader << " from file." << endl;
 
-    return kFALSE;
+    return kERROR;
 }
 
@@ -182,5 +182,4 @@
 Bool_t MCorsikaFormatRaw::SeekEvtEnd()
 {
-
     // Search subblockwise backward (Block: 5733*4 = 21*273*4)
     for (int i=1; i<22; i++)
@@ -250,5 +249,5 @@
 // of the id.
 //
-Bool_t MCorsikaFormatEventIO::SeekNextBlock(const char * id, unsigned short type) const
+Int_t MCorsikaFormatEventIO::SeekNextBlock(const char * id, unsigned short type) const
 {
     cout << "Seek " << type << endl;
@@ -267,5 +266,5 @@
         {
             gLog << err << "MCorsikaFormatEventIO::SeekNextBlock: ERROR - Unexpected end-of-file seeking " << id << " (" << type << ")." << endl;
-            return kFALSE;
+            return kERROR;
         }
 
@@ -343,5 +342,5 @@
     // we have to search in the file
     fIn->seekg(currentPos, ios::beg);
-    if (!SeekNextBlock("RUNE", 1210))
+    if (SeekNextBlock("RUNE", 1210)!=kTRUE)
         return kFALSE;
 
Index: trunk/Mars/mcorsika/MCorsikaFormat.h
===================================================================
--- trunk/Mars/mcorsika/MCorsikaFormat.h	(revision 9946)
+++ trunk/Mars/mcorsika/MCorsikaFormat.h	(revision 9949)
@@ -27,5 +27,5 @@
    virtual ~MCorsikaFormat();
 
-   virtual Bool_t SeekNextBlock(const char * id, unsigned short type) const = 0;
+   virtual Int_t  SeekNextBlock(const char * id, unsigned short type) const = 0;
    virtual void   UnreadLastHeader() const = 0;
 
@@ -60,5 +60,5 @@
         : MCorsikaFormat(in) {}
 
-   Bool_t SeekNextBlock(const char * id, unsigned short type) const;
+   Int_t  SeekNextBlock(const char * id, unsigned short type) const;
    void   UnreadLastHeader() const;
 
@@ -79,5 +79,5 @@
         : MCorsikaFormat(in) {fRunePos = std::streampos(0);}
 
-    Bool_t SeekNextBlock(const char *id, unsigned short type) const;
+    Int_t  SeekNextBlock(const char *id, unsigned short type) const;
     void   UnreadLastHeader() const;
 
Index: trunk/Mars/mcorsika/MCorsikaRunHeader.cc
===================================================================
--- trunk/Mars/mcorsika/MCorsikaRunHeader.cc	(revision 9946)
+++ trunk/Mars/mcorsika/MCorsikaRunHeader.cc	(revision 9949)
@@ -85,5 +85,5 @@
 Bool_t MCorsikaRunHeader::ReadEvt(MCorsikaFormat * fInFormat)
 {
-    if (!fInFormat->SeekNextBlock("RUNH", 1200))
+    if (fInFormat->SeekNextBlock("RUNH", 1200)!=kTRUE)
         return kFALSE;
 
@@ -158,5 +158,5 @@
     // f[145] Muon multiple scattering flag
 
-    if (!fInFormat->SeekNextBlock("EVTH", 1202))
+    if (fInFormat->SeekNextBlock("EVTH", 1202)!=kTRUE)
         return kFALSE;
 
@@ -221,6 +221,5 @@
 Bool_t MCorsikaRunHeader::ReadEvtEnd(MCorsikaFormat * fInFormat)
 {
-
-    if (!fInFormat->SeekNextBlock("RUNE", 1210))
+    if (fInFormat->SeekNextBlock("RUNE", 1210)!=kTRUE)
         return kFALSE;
 
