Index: trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.cc
===================================================================
--- trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.cc	(revision 1619)
+++ trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.cc	(revision 1619)
@@ -0,0 +1,141 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Oscar Blanch  11/2002 (blanch@ifae.es)
+!
+!   Copyright: MAGIC Software Development, 2000-2001
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// MMcCorsikaRunHeader
+//
+// Root storage container for the CORSIKA run header
+//
+// It saves in a root file all variable that are in the CORSIKA run header, except
+// dummies.
+//
+////////////////////////////////////////////////////////////////////////////
+
+#ifndef MARS_MMcCorsikaRunHeader
+#include "MMcCorsikaRunHeader.h"
+#endif
+
+#include <fstream.h>
+#include <iomanip.h>
+
+#include "MLog.h"
+#include "MLogManip.h"
+ClassImp(MMcCorsikaRunHeader);
+
+// --------------------------------------------------------------------------
+//
+// Default constructor.
+//
+//
+MMcCorsikaRunHeader::MMcCorsikaRunHeader(const char *name, const char *title)
+{
+    fName  = name  ? name  : "MMcCorsikaRunHeader";
+    fTitle = title ? title : "Translation of the CORSIKA header";
+
+    fRunNumber = 0.0;
+    fDate = 0.0;
+    fCorsika_version = 0.0;
+    fNumObsLev = 0.0;
+    for(int i=0;i<10;i++)
+    	fHeightLev[i]=0.0;
+    fSlopeSpec = 0.0;
+    fELowLim = 0.0;
+    fEUppLim = 0.0;
+    fEGS4_flag = 0.0;
+    fNKG_flag = 0.0;
+    fEcutoffh = 0.0;
+    fEcutoffm = 0.0;
+    fEcutoffe = 0.0;
+    fEcutoffg = 0.0;
+
+    for(int i=0;i<50;i++)  fC[i] = 0.0;
+    for(int i=0;i<40;i++)  fCKA[i] = 0.0;
+    for(int i=0;i<5 ;i++)  fCETA[i] = 0.0;
+    for(int i=0;i<11;i++)  fCSTRBA[i] = 0.0;
+    for(int i=0;i<5;i++){
+	 fAATM[i] = 0.0;
+	 fBATM[i] = 0.0;
+	 fCATM[i] = 0.0;
+    }
+    for(int i=0;i<4;i++)  fNFL[i] = 0.0;
+
+}
+
+// -------------------------------------------------------------------------
+//
+// Fill Corsika Run Header 
+//
+void MMcCorsikaRunHeader::Fill(const Float_t  runnumber,
+		               const Float_t  date,
+			       const Float_t  vers,
+			       const Float_t  numobslev,
+			       const Float_t  height[10],
+			       const Float_t  slope,
+			       const Float_t  elow,
+			       const Float_t  eupp,
+			       const Float_t  egs4,
+			       const Float_t  nkg,
+			       const Float_t  eh,
+			       const Float_t  em,
+			       const Float_t  ee,
+			       const Float_t  eg,
+			       const Float_t  c[50],
+			       const Float_t  cka[40],
+			       const Float_t  ceta[5],
+			       const Float_t  cstrba[11],
+			       const Float_t  aatm[5],
+			       const Float_t  batm[5],
+			       const Float_t  catm[5],
+			       const Float_t  nfl[4])
+{
+    fRunNumber = runnumber;
+    fDate = date;
+    fCorsika_version = vers;
+    fNumObsLev = numobslev;
+    for(int i=0;i<10;i++)
+        fHeightLev[i]=height[i];
+    fSlopeSpec = slope;
+    fELowLim = elow;
+    fEUppLim = eupp;
+    fEGS4_flag = egs4;
+    fNKG_flag = nkg;
+    fEcutoffh = eh;
+    fEcutoffm = em;
+    fEcutoffe = ee;
+    fEcutoffg = eg;
+
+    for(int i=0;i<50;i++)  fC[i] = c[i];
+    for(int i=0;i<40;i++)  fCKA[i] = cka[i];
+    for(int i=0;i<5 ;i++)  fCETA[i] = ceta[i];
+    for(int i=0;i<11;i++)  fCSTRBA[i] = cstrba[i];
+    for(int i=0;i<5;i++){
+        fAATM[i] = aatm[i];
+        fBATM[i] = batm[i];
+        fCATM[i] = catm[i];
+       }
+    for(int i=0;i<4;i++)  fNFL[i] = nfl[i];
+}
+
+
Index: trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.h
===================================================================
--- trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.h	(revision 1619)
+++ trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.h	(revision 1619)
@@ -0,0 +1,77 @@
+#ifndef MARS_MMcCorsikaRunHeader
+#define MARS_MMcCorsikaRunHeader
+///////////////////////////////////////////////////////////////////////
+//                                                                   //
+// MMcCorsikaRunHeader                                                        //
+//                                                                   //
+///////////////////////////////////////////////////////////////////////
+
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif
+
+
+class MMcCorsikaRunHeader : public MParContainer
+{
+private:
+  // Header copied directly from CORSIKA header, skiping dummy values.
+  // The propouse of this container is being able to cmopare with
+  // Corsika run Header
+  // See CORSIKA manual for explanations
+    Float_t fRunNumber;
+    Float_t fDate;
+    Float_t fCorsika_version;
+    Float_t fNumObsLev;
+    Float_t fHeightLev[10];
+    Float_t fSlopeSpec;  // Slope of primaries' energy spectrum 
+    Float_t fELowLim;  
+    Float_t fEUppLim;    // Limits of energy range for generation 
+    Float_t fEGS4_flag;
+    Float_t fNKG_flag;
+    Float_t fEcutoffh;  
+    Float_t fEcutoffm;  
+    Float_t fEcutoffe;  
+    Float_t fEcutoffg;  
+    // Physical constants and interaction flags (see CORSIKA manual): 
+    Float_t fC[50];
+    Float_t fCKA[40];
+    Float_t fCETA[5];
+    Float_t fCSTRBA[11];
+    Float_t fAATM[5];
+    Float_t fBATM[5];
+    Float_t fCATM[5];
+    Float_t fNFL[4];
+
+public:
+  MMcCorsikaRunHeader(const char *name=NULL, const char *title=NULL);
+  ~MMcCorsikaRunHeader();
+
+  void Fill(const Float_t  runnumber,
+	    const Float_t  date,
+	    const Float_t  vers,
+	    const Float_t  fNumObsLev,
+	    const Float_t  height[10],
+	    const Float_t  slope,
+	    const Float_t  elow,
+	    const Float_t  eupp,
+	    const Float_t  egs4,
+	    const Float_t  nkg,
+	    const Float_t  eh,
+	    const Float_t  em,
+	    const Float_t  ee,
+	    const Float_t  eg,
+	    const Float_t  c[50],
+	    const Float_t  cka[40],
+	    const Float_t  ceta[5],
+	    const Float_t  cstrba[11],
+	    const Float_t  aatm[5],
+	    const Float_t  batm[5],
+	    const Float_t  catm[5],
+	    const Float_t  nfl[4]
+	    );
+  
+  ClassDef(MMcCorsikaRunHeader, 1)	// storage container for general info
+};
+#endif
+
+
Index: trunk/MagicSoft/include-Classes/MMcFormat/Makefile
===================================================================
--- trunk/MagicSoft/include-Classes/MMcFormat/Makefile	(revision 1607)
+++ trunk/MagicSoft/include-Classes/MMcFormat/Makefile	(revision 1619)
@@ -37,5 +37,6 @@
            MMcTrig.cxx 
 
-SRCFILESCC = MMcConfigRunHeader.cc
+SRCFILESCC = MMcConfigRunHeader.cc \
+	     MMcCorsikaRunHeader.cc
 
 
