Index: /trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
===================================================================
--- /trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 1195)
+++ /trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 1196)
@@ -19,7 +19,7 @@
 //=
 //= $RCSfile: creadparam.cxx,v $
-//= $Revision: 1.12 $
+//= $Revision: 1.13 $
 //= $Author: blanch $ 
-//= $Date: 2001-11-13 17:05:14 $
+//= $Date: 2002-01-18 17:43:08 $
 //=
 //=//////////////////////////////////////////////////////////////////////
@@ -76,9 +76,12 @@
 static char Loop_filename[PATH_MAX_LENGTH];   //@< special data filename
 static char CT_filename[PATH_MAX_LENGTH];     //@< name of the CT def. file
-static char NSB_directory[PATH_MAX_LENGTH];  //@< database for NSB
+static char NSB_directory[PATH_MAX_LENGTH];   //@< database for NSB
+static int ElecNoise = TRUE;                  //@< Will we add ElecNoise?
+static float FADC_Noise = 2.0;                //@< Value for FADC ElecNoise
+static float Trig_Noise = 0.3;                //@< Factor for Trigger ElecNoise
 static int simulateNSB = TRUE;                //@< Will we simulate NSB?
 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 int nphe2NSB=0;          //@< Number of phe from shower to do NSB simulation 
 static float qThreshold[TRIGGER_PIXELS];     //@< Threshold values
 static int Individual_Thres = FALSE;
@@ -167,5 +170,7 @@
     cin.getline(line, LINE_MAX_LENGTH);
   line[strlen(SIGNATURE)] = '\0';
-  strcpy(line, sign);
+  strcpy(sign, line);
+  cout<< '"' << sign << '"' << '\n';
+  cout<< "should be: " << SIGNATURE << '\n';
   if (strcmp(sign, SIGNATURE) != 0) {
     cerr << "ERROR: Signature of parameters file is not correct\n";
@@ -252,4 +257,29 @@
       break;
 
+    case elec_noise_off:              //@< add ElecNoise?
+          
+      // we will not add electronic noise for FADC and Trigger channels.
+      ElecNoise = FALSE;
+      FADC_Noise = 0.0;
+      Trig_Noise =0.0;
+
+      break;
+
+    case fadc_noise:              //@< FADC ElecNoise
+          
+      // value for FADC Elec Noise
+      sscanf(line, "%s %f", token, &FADC_Noise);
+      ElecNoise = TRUE;
+          
+      break;
+
+    case trig_noise:              //@< add ElecNoise?
+          
+      // factor for Trigger Elec Noise
+      sscanf(line, "%s %f", token, &Trig_Noise);
+      ElecNoise = TRUE;
+          
+      break;
+
     case nsb_on:              //@< simulate NSB?
           
@@ -696,4 +726,23 @@
 
 //!-----------------------------------------------------------
+// @name add_elec_noise
+//                                                
+// @desc are we going to add the ElecNoise?
+//
+// @date Mon Jan 14 19:27:56 MET DST 2002
+//------------------------------------------------------------
+// @function 
+
+//!@{
+int
+add_elec_noise(float *fadc, float *trig)
+{
+  *fadc = FADC_Noise;
+  *trig = Trig_Noise;
+  return ( ElecNoise);
+}
+//!@}
+
+//!-----------------------------------------------------------
 // @name get_nsb
 //                                                
@@ -1288,4 +1337,9 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.12  2001/11/13 17:05:14  blanch
+// New input items int the input card parameter list have been included to fill
+// the MMcRunHeader.
+// There has been also some change to remove warnings in the compilation.
+//
 // Revision 1.11  2001/07/25 11:38:00  magicsol
 // Minnor changes
