Index: trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 671)
+++ trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 672)
@@ -19,7 +19,7 @@
 //=
 //= $RCSfile: creadparam.cxx,v $
-//= $Revision: 1.8 $
-//= $Author: magicsol $ 
-//= $Date: 2001-02-23 10:55:43 $
+//= $Revision: 1.9 $
+//= $Author: blanch $ 
+//= $Date: 2001-03-05 10:43:18 $
 //=
 //=//////////////////////////////////////////////////////////////////////
@@ -77,4 +77,5 @@
 static int anaPixels = -1;      //@< number of pixels for the analysis
 static float meanNSB;           //@< NSB mean value (per pixel)
+static int nphe2NSB=0;            //@< Number of phe from shower to do NSB simulation 
 static float qThreshold;        //@< Threshold value
 static char NSB_directory[PATH_MAX_LENGTH];  //@< database for NSB
@@ -91,4 +92,5 @@
 static int Write_McEvt  = TRUE;
 static int Write_McTrig = FALSE;
+static int Write_McFadc = FALSE;
 static int Write_RawEvt = FALSE;
 static int Write_All_Data = FALSE;
@@ -116,4 +118,6 @@
 static int Trigger_loop_ltop = 0;
 static int Trigger_loop_utop = 2;
+static float FADC_response_ampl = MFADC_RESPONSE_AMPLITUDE;
+static float FADC_response_fwhm = MFADC_RESPONSE_FWHM;
 //!@}
 
@@ -246,5 +250,5 @@
           
       // get value of <NSB> (in photons)
-      sscanf(line, "%s %f", token, &meanNSB);
+      sscanf(line, "%s %f %d", token, &meanNSB, &nphe2NSB);
 
       break;
@@ -361,4 +365,11 @@
       break;
 
+    case write_McFadc:    //@< to write the McFadc info
+          
+      // change boolean value
+      Write_McFadc = TRUE;
+
+      break;
+
     case write_all_data:      //@< to write single pixel data
           
@@ -399,4 +410,11 @@
       break;
 
+    case fadc_prop:
+
+      //  Get parameters for the fadc  response for one phe
+      sscanf(line, "%s %f %f", token, &FADC_response_ampl,&FADC_response_fwhm);
+
+      break;
+
     case trigger_scan:
 
@@ -614,7 +632,8 @@
 //!@{
 int
-get_nsb(float *n)
+get_nsb(float *n, int *m)
 {
   *n = meanNSB;
+  *m = nphe2NSB;
   return ( simulateNSB );
 }
@@ -903,4 +922,22 @@
 
 //!-----------------------------------------------------------
+// @name write_McFadc
+//                                                
+// @desc write the McFadc class for each event to the .root file 
+//
+// @return  TRUE: we'll write it;  FALSE: we won't
+//
+//------------------------------------------------------------
+// @function 
+ 
+//!@{
+int
+get_write_McFadc(void)
+{
+  return ( Write_McFadc );
+}
+//!@}
+
+//!-----------------------------------------------------------
 // @name write_RawEvt
 //                                                
@@ -1018,4 +1055,22 @@
 {
   return ( Trigger_Scan );
+}
+//!@}
+
+//!-----------------------------------------------------------
+// @name Fadc_Propeties
+//                                                
+// @desc fix properties of the FADC response 
+//
+//------------------------------------------------------------
+// @function 
+
+//!@{
+void
+get_FADC_properties(float *ra, float *rf)
+{
+  *ra=FADC_response_ampl;
+  *rf=FADC_response_fwhm;
+
 }
 //!@}
@@ -1090,4 +1145,7 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.8  2001/02/23 10:55:43  magicsol
+// An input commmand that talls the path for the NSB database has been added.
+//
 // Revision 1.7  2001/01/15 12:37:48  magicsol
 // It has been introduced the option to read from the input card the overlaping
