Index: trunk/MagicSoft/Simulation/Detector/StarResponse/starresponse.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/StarResponse/starresponse.cxx	(revision 680)
+++ trunk/MagicSoft/Simulation/Detector/StarResponse/starresponse.cxx	(revision 681)
@@ -22,10 +22,13 @@
 
   MStarLight  data  ;    // create  instance of the MStarLight 
+
+  //  Shall I write the root file???
+
+  int write_root;
+
+  write_root= get_write_root();
   
-  //  create a Standard Trigger !!!
-
-  //MTrigger  trigger  ;  
-
-  
+  //  Get information from Trigger instance!!!
+   
   cout << sizeof (trigger) << endl ; 
 
@@ -37,7 +40,6 @@
   data.SetFwhmTrig ( trigger->GetFwhm() ) ; 
   
-  //  create a Standard FADC !!!!!
+  //  Get infroamtion from FADC instance !!!!!
 
-  //MFadc     fadc ; 
   Float_t   fadcresp[45] ; 
   fadc->GetResponse (fadcresp ) ;   
@@ -61,9 +63,4 @@
     
   }
-  
-  //  data.ElecNoise() ; 
-
-    
-
 
   sprintf(filename, "%sBrightness%.1f.slt", path, brightness) ; 
@@ -72,11 +69,13 @@
   data.Reset() ; 
 
-  data.ReadBinary( filename ) ;
+  if(write_root){
+    data.ReadBinary( filename ) ;
+    
+    sprintf(filename, "%sBrightness%.1f.root", path, brightness) ; 
+    cout << " the file will be written in " << filename
+	 << endl ; 
 
-  sprintf(filename, "%sBrightness%.1f.root", path, brightness) ; 
-  cout << " the file will be written in " << filename
-       << endl ; 
-
-  data.StoreHisto( filename ) ; 
+    data.StoreHisto( filename ) ; 
+  }
 
   return  (0) ; 
@@ -101,4 +100,7 @@
   float nphe_min=0.0, nphe_max=10.0, nphe_pre=0.1;
 
+  float trig_fwhm,trig_ampl,trig_shape;
+  float fadc_fwhm,fadc_ampl,fadc_shape;
+
   // 
   char path[256] ; 
@@ -117,9 +119,20 @@
   }
 
+  //  Reading parameters from input card
+
   readparam(parfilename);
 
+  //  Setting the parameters read from teh input card
   strcpy( path,get_database_path());
 
   get_simulated_phe(&nphe_min, &nphe_max, &nphe_pre);
+
+  get_trig_properties(&trig_shape, &trig_ampl, &trig_fwhm);
+  trigger->SetAmpl(trig_ampl);
+  trigger->SetFwhm(trig_fwhm);
+
+  get_fadc_properties(&fadc_shape, &fadc_ampl, &fadc_fwhm);
+  fadc->SetAmpl(fadc_ampl);
+  fadc->SetFwhm(fadc_fwhm);
 
   for (Float_t b=nphe_min; b<=nphe_max; b=b+nphe_pre )  //  loop over Brightness
