Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 5722)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 5723)
@@ -25,7 +25,10 @@
      - Added #include "TSystem.h", otherwise gSystem is not recognized
        in Mac OSX.
+
    * manalysis/MMakePadHistograms.cc
      - Changed badcalc.SetNamePedPhotContainer to 
        badcalc.SetNamePedPhotCam
+
+
 
  2005/01/07 Thomas Bretz
@@ -58,4 +61,8 @@
    * manalysis/Makefile:
      - removed unintantionally introduced wrong include
+
+   * msignal/MExtractTimeAndChargeDigitalFilter.cc:
+     - a small acceleration discussed with Hendrik by replacing a
+       counter in a loop by pointer arithmetics
 
 
Index: /trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc
===================================================================
--- /trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc	(revision 5722)
+++ /trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc	(revision 5723)
@@ -227,5 +227,4 @@
   Byte_t maxpos = 0;
   Byte_t max    = 0;
-  Int_t count   = 0;
 
   //
@@ -235,19 +234,14 @@
   const Float_t ABoffs = ped.GetPedestalABoffset();
 
-  Float_t pedmean[2];
-  pedmean[0] = pedes + ABoffs;
-  pedmean[1] = pedes - ABoffs;
+  const Float_t pedmean[2] = { pedes + ABoffs, pedes - ABoffs };
 
   //
   // Check for saturation in all other slices
   //
+  Int_t ids = fHiGainFirst;
+  Float_t *sample = fHiGainSignal.GetArray();
   while (p<end)
     {
-
-      const Int_t ids      = fHiGainFirst + count ;
-      const Float_t signal = (Float_t)*p - pedmean[(ids+abflag) & 0x1];
-      fHiGainSignal[count] = signal;
-
-      count++;
+      *sample++ = (Float_t)*p - pedmean[(ids++ + abflag) & 0x1];
 
       if (*p > max)
@@ -266,10 +260,10 @@
       end = logain + fHiLoLast;
 
+      ids = fHiGainFirst;
+      sample = fHiGainSignal.GetArray();
       while (logain<end)
         {
 
-          const Int_t ids      = fHiGainFirst + range ;
-          const Float_t signal = (Float_t)*logain - pedmean[(ids+abflag) & 0x1];
-          fHiGainSignal[range] = signal;
+          *sample++ = (Float_t)*logain - pedmean[(ids++ + abflag) & 0x1];
           range++;
 
@@ -402,5 +396,4 @@
   Byte_t maxpos = 0;
   Byte_t max    = 0;
-  Int_t count   = 0;
 
   //
@@ -410,19 +403,14 @@
   const Float_t ABoffs = ped.GetPedestalABoffset();
 	
-  Float_t pedmean[2];
-  pedmean[0] = pedes + ABoffs;
-  pedmean[1] = pedes - ABoffs;
+  const Float_t pedmean[2] = { pedes + ABoffs, pedes - ABoffs };
 
   //
   // Check for saturation in all other slices
   //
+  Float_t *sample = fLoGainSignal.GetArray();
+  Int_t    ids    = fLoGainFirst;
   while (p<end)
     {
-
-      const Int_t ids      = fLoGainFirst + count ;
-      const Float_t signal = (Float_t)*p - pedmean[(ids+abflag) & 0x1];
-      fLoGainSignal[count] = signal;
-
-      count++;
+      *sample++ = (Float_t)*p - pedmean[(ids++ + abflag) & 0x1];
 
       if (*p > max)
