Index: trunk/MagicSoft/Simulation/Detector/include-MC/MCCphoton.hxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MC/MCCphoton.hxx	(revision 1598)
+++ trunk/MagicSoft/Simulation/Detector/include-MC/MCCphoton.hxx	(revision 1674)
@@ -43,5 +43,7 @@
 
 const char FLAG_START_OF_RUN[]   = "\nSTART---RUN\n";
+const char FLAG_START_OF_HEADER[]   = "RUNH";
 const char FLAG_START_OF_EVENT[] = "\nSTART-EVENT\n";
+const char FLAG_EVENT_HEADER[]   = "EVTH";
 const char FLAG_END_OF_EVENT[] =   "\nEND---EVENT\n";
 const char FLAG_END_OF_RUN[] =     "\nEND-----RUN\n";
@@ -50,4 +52,5 @@
 
 #define SIZE_OF_FLAGS  13
+#define SIZE_OF_HEADER    8       /* floats */
 #define SIZE_OF_MCCPHOTON    8   /* floats */
 
Index: trunk/MagicSoft/Simulation/Detector/include-MC/MCEventHeader_2.hxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MC/MCEventHeader_2.hxx	(revision 1598)
+++ trunk/MagicSoft/Simulation/Detector/include-MC/MCEventHeader_2.hxx	(revision 1674)
@@ -39,5 +39,5 @@
 #include "COREventHeader.hxx"
 
-#define SIZE_OF_MCEVENTHEADER_2    178   /* floats */
+#define SIZE_OF_MCEVENTHEADER_2    181   /* floats */
 
 // @endcode
Index: trunk/MagicSoft/Simulation/Detector/include-MC/MCRunHeader.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MC/MCRunHeader.cxx	(revision 1674)
+++ trunk/MagicSoft/Simulation/Detector/include-MC/MCRunHeader.cxx	(revision 1674)
@@ -0,0 +1,22 @@
+/////////////////////////////////////////////////////////////////
+//
+// MCRunHeader
+//
+//  Created: Tue Apr 28 16:27:14 1998
+//  Author:  Jose Carlos Gonzales
+//  Purpose: Base class for EventHeader-classes
+//  Notes:   
+//
+/////////////////////////////////////////////////////////////////
+
+// @T \newpage
+
+// @section Source code of {\tt MCRunHeader.cxx}
+
+// @subsection Class {\em MCRunHeader}: Implementation
+
+// @code
+
+#include "MCRunHeader.hxx"
+
+// @endcode
Index: trunk/MagicSoft/Simulation/Detector/include-MC/MCRunHeader.hxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MC/MCRunHeader.hxx	(revision 1674)
+++ trunk/MagicSoft/Simulation/Detector/include-MC/MCRunHeader.hxx	(revision 1674)
@@ -0,0 +1,104 @@
+/////////////////////////////////////////////////////////////////
+//
+// MCRunHeader
+//
+//  Created: Wed Oct 30 17:43:14 2002
+//  Author:  Oscar Blanch Bigas
+//  Purpose: Base class for RunHeader-classes
+//  Notes:   
+//
+/////////////////////////////////////////////////////////////////
+
+// @T \newpage
+
+// @section Source code of {\tt MCRunHeader.hxx}
+
+/* @text
+This section shows the include file {\tt MCRunHeader.hxx}
+@endtext */
+
+#ifndef MCRunHeader_Class
+#define MCRunHeader_Class
+
+// @subsection Include files
+
+// @code
+#ifdef __ROOT__
+#include "TROOT.h"
+#include "TObject.h"
+#else // not __ROOT__
+#include "Rtypes.h"
+#endif
+
+#include <iostream.h>
+#include <iomanip.h>
+#include <fstream.h>
+#include <stdlib.h>
+#include <math.h>
+
+#define SIZE_OF_MCRUNHEADER    272   /* floats */
+
+// @endcode
+
+// @subsection Class {\em MCRunHeader}: Definition
+
+// @code
+class MCRunHeader {
+
+protected:
+    Float_t RunNumber;
+    Float_t date;
+    Float_t Corsika_version;
+    Float_t NumObsLev;
+    Float_t HeightLev[10];
+    Float_t SlopeSpec;  /* Slope of primaries' energy spectrum */
+    Float_t ELowLim;
+    Float_t EUppLim;    /* Limits of energy range for generation */
+    Float_t EGS4_flag;
+    Float_t NKG_flag;
+    Float_t Ecutoffh;
+    Float_t Ecutoffm;
+    Float_t Ecutoffe;
+    Float_t Ecutoffg;
+    /* Physical constants and interaction flags (see CORSIKA manual): */
+    Float_t C[50];
+    Float_t dummy1[20]; /* not used */
+    Float_t CKA[40];
+    Float_t CETA[5];
+    Float_t CSTRBA[11];
+    Float_t dummy2[104]; /* not used */
+    Float_t AATM[5];
+    Float_t BATM[5];
+    Float_t CATM[5];
+    Float_t NFL[4];
+
+public:
+  MCRunHeader(void) {}  // default constructor
+
+  virtual ~MCRunHeader(void) {}  // default destructor
+  
+  // reads EventHeader from binary input stream
+  Int_t read ( ifstream &is ) {
+    is.read ( (char *)this, mysize() ); 
+    return is.gcount();
+  }
+
+  // writes EventHeader to binary output stream
+  Int_t write ( ofstream &os ) {
+    os.write ( (char *)this, mysize() ); 
+    return 0;
+  }
+  
+  inline int mysize(void) 
+    { return ( sizeof( float ) * SIZE_OF_MCRUNHEADER ); }
+
+  inline void print ( void ) {
+    float *ptr = (float *)this;
+    for(int i=0; i<SIZE_OF_MCRUNHEADER; ++i,++ptr)
+      cerr << i << ':' << *ptr << '\n';
+  }
+
+};
+// @endcode
+
+#endif  // not defined MCRunHeader_Class
