Index: trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 1674)
+++ trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 1684)
@@ -21,7 +21,7 @@
 //
 // $RCSfile: camera.cxx,v $
-// $Revision: 1.47 $
+// $Revision: 1.48 $
 // $Author: blanch $ 
-// $Date: 2002-12-10 17:19:31 $
+// $Date: 2002-12-12 17:40:50 $
 //
 ////////////////////////////////////////////////////////////////////////
@@ -70,4 +70,6 @@
 #include "MMcTrig.hxx"
 #include "MMcRunHeader.hxx"
+#include "MMcConfigRunHeader.h"
+#include "MMcCorsikaRunHeader.h"
 #include "MMcTrigHeader.hxx"
 #include "MMcFadcHeader.hxx"
@@ -799,4 +801,5 @@
   // Set Right Discriminator threshold, taking into account trigger pixels
 
+
   Trigger.CheckThreshold(&qThreshold[0]);
 
@@ -860,4 +863,6 @@
   MRawRunHeader *RunHeader= new MRawRunHeader();
   MMcRunHeader  *McRunHeader = new MMcRunHeader();
+  MMcConfigRunHeader  *McConfigRunHeader = new MMcConfigRunHeader();
+  MMcCorsikaRunHeader  *McCorsikaRunHeader = new MMcCorsikaRunHeader();
 
        // Header branch
@@ -907,4 +912,10 @@
   HeaderTree.Branch("MMcRunHeader","MMcRunHeader",
   		    &McRunHeader);
+
+  HeaderTree.Branch("MMcConfigRunHeader","MMcConfigRunHeader",
+  		    &McConfigRunHeader);
+
+  HeaderTree.Branch("MMcCorsikaRunHeader","MMcCorsikaRunHeader",
+  		    &McCorsikaRunHeader);
 
   if(!Trigger_Loop && Write_McTrig){
@@ -1935,6 +1946,6 @@
 	  still_in_loop  = FALSE;
 	  log(SIGNATURE, "Reading ASCII files at the end of the reflector file.  . .\n");
-	  read_ascii(inputfile);
-	  break;
+	  read_ascii(inputfile, McConfigRunHeader);
+	  //break;
 	  if ((! Data_From_STDIN) && ( !feof(inputfile) )){
 	    
@@ -2832,7 +2843,58 @@
 //!@{
 void 
-read_ascii(FILE *sp)
+read_ascii(FILE *sp, MMcConfigRunHeader *config)
 {
+  Float_t radius = -1.0;
+  Float_t focal = -1.0;
+  Float_t stdfocal = -1.0;
+  Float_t point = -1.0;
+  Float_t stdpoint = -1.0;
+  Float_t adjust = -1.0;
+  Float_t spot = -1.0;
+  Float_t camwidth = -1.0;
+
+  Char_t token[40];
+  Char_t line[511];
+  Char_t flag;
   cout<<"To be implemented..."<<endl;
+  while(1){
+    if((flag=fgetc(sp))==EOF)
+      break;
+    fgets(&line[1],500,sp);
+    line[0]=flag;
+    if (line[0]== '#')
+      continue;
+    if (strstr(line, "type") == line)
+      continue;
+    if (strstr(line, "focal_distance") == line)
+      sscanf(line,"%s %f",token,&focal);
+      continue;
+    if (strstr(line, "focal_std") == line)
+      continue;
+    if (strstr(line, "point_spread") == line)
+      continue;
+    if (strstr(line, "point_std") == line)
+      continue;
+    if (strstr(line, "adjustment_dev") == line)
+      continue;
+    if (strstr(line, "black_spot") == line)
+      continue;
+    if (strstr(line, "camera_width") == line)
+      continue;
+    if (strstr(line, "n_pixels") == line)
+      continue;
+    if (strstr(line, "pixel_width") == line)
+      continue;
+    if (strstr(line, "n_centralpixels") == line)
+      continue;
+    if (strstr(line, "n_gappixels") == line)
+      continue;
+    if (strstr(line, "n_mirrors") == line)
+      continue;
+    if (strstr(line, "r_mirror") == line)
+      continue;
+    if (strstr(line, "define_mirrors") == line)
+      break;
+  }
 }
 
@@ -3795,4 +3857,7 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.47  2002/12/10 17:19:31  blanch
+// *** empty log message ***
+//
 // Revision 1.46  2002/11/08 17:51:00  blanch
 // *** empty log message ***
@@ -3937,4 +4002,7 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.47  2002/12/10 17:19:31  blanch
+// *** empty log message ***
+//
 // Revision 1.46  2002/11/08 17:51:00  blanch
 // *** empty log message ***
Index: trunk/MagicSoft/Simulation/Detector/Camera/camera.h
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/camera.h	(revision 1674)
+++ trunk/MagicSoft/Simulation/Detector/Camera/camera.h	(revision 1684)
@@ -19,7 +19,7 @@
 //=
 //= $RCSfile: camera.h,v $
-//= $Revision: 1.13 $
+//= $Revision: 1.14 $
 //= $Author: blanch $ 
-//= $Date: 2002-12-10 17:20:32 $
+//= $Date: 2002-12-12 17:41:13 $
 //=
 //=//////////////////////////////////////////////////////////////////////
@@ -282,5 +282,6 @@
 void read_QE(void);
 void read_WC(void);
-void read_ascii( FILE *sp // the input file
+void read_ascii( FILE *sp, // the input file
+		 MMcConfigRunHeader *config
 		 );
 int pixels_are_neig(int pix1, int pix2);
@@ -333,4 +334,7 @@
 /*
  *$Log: not supported by cvs2svn $
+ *Revision 1.13  2002/12/10 17:20:32  blanch
+ **** empty log message ***
+ *
  *Revision 1.12  2002/10/29 17:16:28  blanch
  *Header file for camera.cxx version 1.45
