Index: trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 2335)
+++ trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 2336)
@@ -19,7 +19,7 @@
 //=
 //= $RCSfile: creadparam.cxx,v $
-//= $Revision: 1.20 $
+//= $Revision: 1.21 $
 //= $Author: blanch $ 
-//= $Date: 2003-07-17 18:04:53 $
+//= $Date: 2003-09-15 10:17:09 $
 //=
 //=//////////////////////////////////////////////////////////////////////
@@ -68,5 +68,5 @@
 //!@{
 
-static char Input_filename[PATH_MAX_LENGTH];  //@< input filename
+static char Input_filename[100][PATH_MAX_LENGTH];  //@< input filename
 static char Starfield_filename[PATH_MAX_LENGTH]; //@< starfield input filename
 static int Starfield_center[6];               //@< center of the starfield FOV
@@ -76,5 +76,7 @@
 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 QE_filename[PATH_MAX_LENGTH];     //@< name of the qe file
+static int  CT_geometry = 0;                  //@< CT camera geometry
+static int  CT_number = 1;                    //@< Number of CT
+static char QE_filename[100][PATH_MAX_LENGTH];     //@< name of the qe file
 static char NSB_directory[PATH_MAX_LENGTH];   //@< database for NSB
 static char NSB_outer_directory[PATH_MAX_LENGTH];   //@< database for NSB
@@ -88,5 +90,5 @@
 static float meanNSB;           //@< NSB mean value (per pixel)
 static int nphe2NSB=0;          //@< Number of phe from shower to do NSB simulation 
-static float qThreshold[CAMERA_PIXELS];     //@< Threshold values
+static float qThreshold[100][CAMERA_PIXELS];     //@< Threshold values
 static int Individual_Thres = FALSE;
 static float RiseDisc = -1.0;
@@ -112,7 +114,7 @@
 static float Trigger_response_ampl = 1.0;
 static float Trigger_response_fwhm = 2.0;
-static float Trigger_threshold = 7.0;
-static int Trigger_multiplicity = 4;
-static int Trigger_topology = 2;
+static float Trigger_threshold[100];
+static int Trigger_multiplicity[100];
+static int Trigger_topology[100];
 static float Trigger_loop_lthres = 3.0;
 static float Trigger_loop_uthres = 10.0;
@@ -155,6 +157,7 @@
   int i, j, k;                      //@< dummy counters
   float aux, aux2;                    //@< auxiliar variable
+  int aux3, aux4;                    //@< auxiliar variable
   ifstream ifile;
-
+  char filename_tmp[PATH_MAX_LENGTH];
   // use cin or ifile (reading from STDIN or from parameters file?
   if ( filename != NULL )
@@ -214,6 +217,6 @@
           
       // get the name of the input_file from the line
-      sscanf(line, "%s %s", token, Input_filename);
-
+      sscanf(line, "%s %i %s", token,&k, filename_tmp);
+      strcpy(&Input_filename[k][0],&filename_tmp[0]);
       break;
 
@@ -247,4 +250,18 @@
       break;
 
+    case ct_num:             //@< name of the telescope file
+          
+      // get the name of the ct_file from the line
+      sscanf(line, "%s %i", token, &CT_number);
+
+      break;
+
+    case ct_geom:             //@< name of the telescope file
+          
+      // get the name of the ct_file from the line
+      sscanf(line, "%s %i", token, &CT_geometry);
+
+      break;
+
     case ct_file:             //@< name of the telescope file
           
@@ -257,5 +274,6 @@
           
       // get the name of the ct_file from the line
-      sscanf(line, "%s %s", token, QE_filename);
+      sscanf(line, "%s %i %s", token, &k, filename_tmp);
+      strcpy(&QE_filename[k][0],&filename_tmp[0]);
 
       break;
@@ -347,5 +365,5 @@
       // get value of threshold (in ph.e.)
       sscanf(line, "%s %i %f", token,&k, &aux);
-      qThreshold[k]=aux;
+      qThreshold[0][k]=aux;
       Individual_Thres = TRUE;
 
@@ -479,5 +497,5 @@
       // Set qThreshold to a global value
       for(k=0;k<CAMERA_PIXELS;k++){
-	qThreshold[k]=Trigger_loop_lthres;
+	qThreshold[0][k]=Trigger_loop_lthres;
       }
 
@@ -492,9 +510,12 @@
 
       //  Get trigger conditions
-      sscanf(line, "%s %f %d %d", token, &Trigger_threshold, &Trigger_multiplicity, &Trigger_topology);
+      sscanf(line, "%s %d %f %d %d", token, &j, &aux, &aux3, &aux4);
+      Trigger_threshold[j]=aux;
+      Trigger_multiplicity[j]=aux3;
+      Trigger_topology[j]=aux4;
 
       // Set qThreshold to a global value
       for(k=0;k<CAMERA_PIXELS;k++){
-	qThreshold[k]=Trigger_threshold;
+	qThreshold[j][k]=Trigger_threshold[j];
       }
 
@@ -554,7 +575,7 @@
 //!@{
 char *
-get_input_filename(void)
-{
-  return (Input_filename);
+get_input_filename(int i)
+{
+  return (Input_filename[i]);
 }
 //!@}
@@ -698,4 +719,42 @@
 
 //!-----------------------------------------------------------
+// @name get_ct_number
+//                                                
+// @desc get number of CT 
+//
+// @return   number of CT
+//
+// @date Tue Jul 29 01:48:26 CEST 2003
+//------------------------------------------------------------
+// @function 
+
+//!@{
+int 
+get_ct_number(void)
+{
+  return (CT_number);
+}
+//!@}
+
+//!-----------------------------------------------------------
+// @name get_ct_geometry
+//                                                
+// @desc get geometry of CT
+//
+// @return   geometry of CT
+//
+// @date Mon Sep 14 13:27:56 MET DST 1998
+//------------------------------------------------------------
+// @function 
+
+//!@{
+int 
+get_ct_geometry(void)
+{
+  return (CT_geometry);
+}
+//!@}
+
+//!-----------------------------------------------------------
 // @name get_qe_filename
 //                                                
@@ -710,7 +769,7 @@
 //!@{
 char *
-get_qe_filename(void)
-{
-  return (QE_filename);
+get_qe_filename(int ict)
+{
+  return (QE_filename[ict]);
 }
 //!@}
@@ -816,5 +875,5 @@
 {
   for(int i=0;i<CAMERA_PIXELS;i++)
-    t[i]=qThreshold[i];
+    t[i]=qThreshold[0][i];
 }
 //!@}
@@ -1207,11 +1266,12 @@
 //!@{
 void
-get_Trigger_Single(float *t, int *m, int *g)
-{
-  for(int i=0;i<CAMERA_PIXELS;i++)
-    t[i]=qThreshold[i];
-  *m=Trigger_multiplicity;
-  *g=Trigger_topology;
-
+get_Trigger_Single(float **t, int *m, int *g)
+{
+  for(int j=0;j<100;j++){
+    for(int i=0;i<CAMERA_PIXELS;i++)
+      t[j][i]=qThreshold[j][i];
+    m[j]=Trigger_multiplicity[j];
+    g[j]=Trigger_topology[j];
+  }
 }
 //!@}
@@ -1256,4 +1316,13 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.20  2003/07/17 18:04:53  blanch
+// Some new parameters to be read have been introduced
+//
+// 	- FADC pedestals
+// 	- Response outer FADC
+// 	- Qe file
+//
+// The obsolete ones have been removed.
+//
 // Revision 1.19  2003/02/12 13:47:32  blanch
 // *** empty log message ***
