Index: trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 2964)
+++ trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 2965)
@@ -19,7 +19,7 @@
 //=
 //= $RCSfile: creadparam.cxx,v $
-//= $Revision: 1.25 $
+//= $Revision: 1.26 $
 //= $Author: blanch $ 
-//= $Date: 2003-10-26 19:45:38 $
+//= $Date: 2004-01-30 09:58:39 $
 //=
 //=//////////////////////////////////////////////////////////////////////
@@ -122,7 +122,7 @@
 static int Trigger_loop_ltop = 0;
 static int Trigger_loop_utop = 2;
-static float FADC_response_ampl = MFADC_RESPONSE_AMPLITUDE;
+static float FADC_response_ampl = MFADC_RESPONSE_INTEGRAL;
 static float FADC_response_fwhm = MFADC_RESPONSE_FWHM;
-static float FADC_resp_ampl_out = MFADC_RESPONSE_AMPLITUDE;
+static float FADC_resp_ampl_out = MFADC_RESPONSE_INTEGRAL;
 static float FADC_resp_fwhm_out = MFADC_RESPONSE_FWHM;
 static float High_to_Low = 10.0;      //@< Low gain channel respct to High
@@ -131,4 +131,11 @@
 static float Source_offset_ph=0.;     //@<  Displacement in Phi of the 
                                       //@< source from the center
+
+static float sigma_spot = -1.; // Sigma in x and y for additional 
+                               // gaussian spread of the mirror spot.
+
+static float trig_delay = 25.;  // Delay in ns between beginning of FADC
+                                // time window and the trigger instant.
+
 
 //!@}
@@ -288,4 +295,18 @@
       sscanf(line, "%s %f", token, &FADC_pedestal);
           
+      //
+      // A. Moralejo:
+      // Require integer mean pedestal. Although it seems a silly
+      // restriction, this saves lots of trouble (due to rounding 
+      // happening in the FADC), particularly when running the
+      // simulation with no noise (NSB or electronic):
+      //
+
+      if (fmod(FADC_pedestal, 1.) > 1.e-4)
+      {
+	  printf("ERROR :  requested average FADC pedestal (%f) is not integer. Please use an integer value.\n", FADC_pedestal);
+	  exit(1);
+      }
+
       break;
 
@@ -301,4 +322,5 @@
       // value for FADC Elec Noise
       sscanf(line, "%s %f %f", token, &FADC_Noise, &Digital_Noise);
+
       ElecNoise = TRUE;
           
@@ -541,4 +563,14 @@
       break;
 
+    case sigma_xy_cm_spot:
+
+      sscanf(line, "%s %f", token, &sigma_spot);
+      break;
+
+    case trigger_delay:
+
+      sscanf(line, "%s %f", token, &trig_delay);
+      break;
+
     case end_file:            //@< end of the parameters file
 
@@ -547,4 +579,5 @@
 
       break;
+
 
     } // switch ( i ) 
@@ -1267,4 +1300,16 @@
 }
 
+float get_sigma_xy_cm_spot(void){
+
+  return sigma_spot;
+
+}
+
+float get_trig_delay(void){
+
+  return trig_delay;
+
+}
+
 //!@}
 //=------------------------------------------------------------
@@ -1274,4 +1319,7 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.25  2003/10/26 19:45:38  blanch
+// The write_all_data input card command has been removed.
+//
 // Revision 1.24  2003/10/17 19:40:24  blanch
 // The gain ratio between the high and low FADC gain is controlled from the
