Index: trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 1234)
+++ trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 1239)
@@ -21,7 +21,7 @@
 //
 // $RCSfile: camera.cxx,v $
-// $Revision: 1.33 $
+// $Revision: 1.34 $
 // $Author: blanch $ 
-// $Date: 2002-03-04 17:21:48 $
+// $Date: 2002-03-13 18:13:56 $
 //
 ////////////////////////////////////////////////////////////////////////
@@ -1775,4 +1775,8 @@
   //<@ Finally we should fill th McRunHeader
 
+  Float_t heights[10];
+  time_t ltime;
+  Float_t ftime;
+  Float_t rnum;
 
   get_starfield_center(&sfRaH,&sfRaM,&sfRaS,&sfDeD,&sfDeM,&sfDeS);
@@ -1781,33 +1785,51 @@
   mcevth.get_theta_range(&shthetamin, &shthetamax);
   mcevth.get_phi_range(&shphimin,&shphimax);
-  corsika=get_corsika_ver();
+  corsika=UInt_t(mcevth.get_VersionPGM()*1000);
   if(!Trigger_Loop) icontrigger=0;
-  McRunHeader->Fill(icontrigger,
-		   !Write_All_Images,
-		   Write_McEvt,
-		   Write_McTrig,
-		   Write_McFADC,
-		   CAMERA_PIXELS,
-		   (UInt_t)ntshow,
-		   (UInt_t)ntrigger,
-		   sfRaH,
-		   sfRaM,
-		   sfRaS,
-		   sfDeD,
-		   sfDeM,
-		   sfDeS,
-		   meanNSB,
-		   telestheta,
-		   telesphi,
-		   sofftheta,
-		   soffphi,
-		   shthetamax,
-		   shthetamin,
-		   shphimax,
-		   shphimin,
-		   corsika,
-		   (UInt_t)(REFL_VERSION*100),
-		   (UInt_t)(VERSION*100));
-
+  time (&ltime);
+  ftime = ((Float_t)ltime)/1000;
+  for (int i=0; i< 10;i++)
+    heights[i]=mcevth.get_HeightLev (i);
+  rnum=mcevth.get_RunNumber();
+
+  McRunHeader->Fill(rnum,
+		    (UInt_t) 1,
+		    mcevth.get_DateRun(),
+		    ftime,
+		    icontrigger,
+		    !Write_All_Images,
+		    Write_McEvt,
+		    Write_McTrig,
+		    Write_McFADC,
+		    Write_RawEvt,
+		    addElecNoise,
+		    CAMERA_PIXELS,
+		    (UInt_t)ntshow,
+		    (UInt_t)ntrigger,
+		    0,
+		    sfRaH,
+		    sfRaM,
+		    sfRaS,
+		    sfDeD,
+		    sfDeM,
+		    sfDeS,
+		    meanNSB,
+		    telestheta,
+		    telesphi,
+		    sofftheta,
+		    soffphi,
+		    shthetamax,
+		    shthetamin,
+		    shphimax,
+		    shphimin,
+		    mcevth.get_CWaveLower(),
+		    mcevth.get_CWaveUpper(),
+		    mcevth.get_slope(),
+		    mcevth.get_NumObsLev(),
+		    heights,
+		    corsika,
+		    (UInt_t)(REFL_VERSION*100),
+		    (UInt_t)(VERSION*100));
+  
   //  Fill the Header Tree with the current leaves of each branch
   HeaderTree.Fill() ;
@@ -1820,5 +1842,4 @@
   outfile_temp.Close() ; 
   
-
   // close input file
   
@@ -3348,4 +3369,7 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.33  2002/03/04 17:21:48  blanch
+// Small and not important changes.
+//
 // Revision 1.32  2002/02/28 15:04:52  blanch
 // A small back has been solved. Before, while not using the option
@@ -3448,4 +3472,7 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.33  2002/03/04 17:21:48  blanch
+// Small and not important changes.
+//
 // Revision 1.32  2002/02/28 15:04:52  blanch
 // A small back has been solved. Before, while not using the option
