Index: trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 672)
+++ trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 884)
@@ -19,7 +19,7 @@
 //=
 //= $RCSfile: creadparam.cxx,v $
-//= $Revision: 1.9 $
+//= $Revision: 1.10 $
 //= $Author: blanch $ 
-//= $Date: 2001-03-05 10:43:18 $
+//= $Date: 2001-07-19 09:28:30 $
 //=
 //=//////////////////////////////////////////////////////////////////////
@@ -78,5 +78,6 @@
 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 float qThreshold[TRIGGER_PIXELS];     //@< Threshold values
+static int Individual_Thres = FALSE;
 static char NSB_directory[PATH_MAX_LENGTH];  //@< database for NSB
 static float qTailCut;          //@< Tail Cut value
@@ -142,5 +143,6 @@
   char line[LINE_MAX_LENGTH];    //@< line to get from the stdin
   char token[ITEM_MAX_LENGTH];   //@< a single token
-  int i, j;                      //@< dummy counters
+  int i, j, k;                      //@< dummy counters
+  float aux;                    //@< auxiliar variable
   ifstream ifile;
 
@@ -268,8 +270,10 @@
       break;
 
-    case threshold:           //@< value of threshold for trigger (q0)
+    case pixel_thres:           //@< value of threshold for trigger (q0)
           
       // get value of threshold (in ph.e.)
-      sscanf(line, "%s %f", token, &qThreshold);
+      sscanf(line, "%s %i %f", token,&k, &aux);
+      qThreshold[k]=aux;
+      Individual_Thres = TRUE;
 
       break;
@@ -436,7 +440,13 @@
       sscanf(line, "%s %d %d %d %d %d %d", token, &Trigger_loop_lthres, &Trigger_loop_uthres, &Trigger_loop_lmult, &Trigger_loop_umult, &Trigger_loop_ltop, &Trigger_loop_utop );
 
+      // Set qThreshold to a global value
+      for(k=0;k<TRIGGER_PIXELS;k++){
+	qThreshold[k]=Trigger_loop_lthres;
+      }
+
       // change boolean value
       Trigger_Loop = TRUE;
       Write_RawEvt = FALSE;
+      Individual_Thres = FALSE;
 
       break;
@@ -446,8 +456,14 @@
       //  Get trigger conditions
       sscanf(line, "%s %f %d %d", token, &Trigger_threshold, &Trigger_multiplicity, &Trigger_topology);
+
+      // Set qThreshold to a global value
+      for(k=0;k<TRIGGER_PIXELS;k++){
+	qThreshold[k]=Trigger_threshold;
+      }
 
       // change boolean value
       Trigger_Loop = FALSE;
       Write_RawEvt = TRUE;
+      Individual_Thres = FALSE;
 
       break;
@@ -653,8 +669,28 @@
 
 //!@{
-float 
-get_threshold(void)
-{
-  return( qThreshold );
+void 
+get_threshold(float *t)
+{
+  for(int i=0;i<TRIGGER_PIXELS;i++)
+    t[i]=qThreshold[i];
+}
+//!@}
+
+
+//!-----------------------------------------------------------
+// @name get_indi_thres_pixel
+//                                                
+// @desc get boolean information about global (FALSE) or 
+// @desc individual (TRUE) pixel trigger threshold
+//
+// @return   Value for the Individual_Thres
+//
+// @date Wed Jul 18 16:29:43 CEST 2001
+//------------------------------------------------------------
+// @function 
+
+//!@{
+int get_indi_thres_pixel(void){
+  return  Individual_Thres;
 }
 //!@}
@@ -1132,5 +1168,6 @@
 get_Trigger_Single(float *t, int *m, int *g)
 {
-  *t=Trigger_threshold;
+  for(int i=0;i<TRIGGER_PIXELS;i++)
+    t[i]=qThreshold[i];
   *m=Trigger_multiplicity;
   *g=Trigger_topology;
@@ -1145,4 +1182,14 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.9  2001/03/05 10:43:18  blanch
+// New input commands have been added:
+//
+// 	- write_McFadc: to write the FADC simulation information.
+// 	- fadc_prop: gives the shape of the single phe response of the FADC
+//
+// And new value has been added in the mean_NSB command that tells how many phes
+// have to come from the shower to do the NSB simulation in that shower (it speeds
+// up the simulation).
+//
 // Revision 1.8  2001/02/23 10:55:43  magicsol
 // An input commmand that talls the path for the NSB database has been added.
