Index: trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx	(revision 637)
+++ trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.hxx	(revision 638)
@@ -20,4 +20,5 @@
 
 #include "MTriggerDefine.h"
+#include "MFadcDefine.h"
 
 class MMcEvt  ; 
@@ -40,47 +41,9 @@
 //  values defined in MTriggerDefine.h are also used by this class. 
 //
-//  But a lot of other stuff is defined here. 
-//
-//  --> Frist of all the WIDTH of the time slice of one FADC slice 
-//      this is 3.33333 nsec.
-//
-#define WIDTH_FADC_TIMESLICE   (50./15.)       //  this means 3.33 nsec 
-//
-//  --> Second the number of slices to fill in MFADC. This must by 
-//      connected to the MTrigger class. The time of interest must be
-//      equal in both classes. 
-//
-#define SLICES_MFADC           (TOTAL_TRIGGER_TIME / WIDTH_FADC_TIMESLICE)
-//
-//  --> The amount of FADC slice written to the raw format.
-//
-#define FADC_SLICES  15
-//  --> The amount of ns before trigger that would be read from the ADC
-//      in oder to show also the start of the pulse before the
-//      the trigger time.
-//
-#define TIME_BEFORE_TRIGGER    10.
-//  --> like the trigger the FADC value will also have a standard response
-//      to one single Photo electron. This response is binned with smaller
-//      bins. The WIDTH of that response function is done here. 
-// 
-#define SUBBINS     5.
-#define WIDTH_RESPONSE_MFADC   (WIDTH_FADC_TIMESLICE /  SUBBINS )  
-// 5 sub-bin in one FADC slice 
-//
-//  --> the number of Response slices
-//
-#define RESPONSE_SLICES_MFADC   45         
+//  But a lot of other stuff is defined in MFadcDefine.h. 
 //
 //
-#define MFADC_RESPONSE_FWHM        5.0
 
-//
-//
-#define MFADC_RESPONSE_AMPLITUDE   4.0
-//
-//
-//
-//
+
 class MFadc {
  private:
@@ -89,4 +52,5 @@
   //
   Bool_t   used[CAMERA_PIXELS] ;  //  a boolean to indicated if the pixels is used in this event
+  UChar_t  pedestal[CAMERA_PIXELS] ;  //  Pedestal of FADCs
 
   Float_t  sig[CAMERA_PIXELS][(Int_t) SLICES_MFADC] ; //  the analog signal for pixels
@@ -114,5 +78,13 @@
   void Fill( Int_t, Float_t, Float_t  ) ;  
 
+  void Set( Int_t iPix, Float_t res[(Int_t) SLICES_MFADC]);
+
+  void SetPedestals( Int_t ped);
+
+  void SetPedestals( UChar_t ped[CAMERA_PIXELS]);
+
   void Baseline();
+
+  void Pedestals();
 
   void Offset( Float_t, Int_t );
@@ -126,9 +98,11 @@
   void GetResponse( Float_t *resp ) ; 
 
+  void GetPedestals( Char_t *offset);
+
   void TriggeredFadc(Float_t time);
 
   void ShowSignal ( MMcEvt *McEvt , Float_t ) ; 
 
-  Float_t GetFadcSignal(Int_t pixel, Int_t slice);
+  UChar_t GetFadcSignal(Int_t pixel, Int_t slice);
 
   Float_t GetAmplitude() {
