Index: trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.cc
===================================================================
--- trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.cc	(revision 8917)
+++ trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.cc	(revision 8918)
@@ -19,5 +19,5 @@
 !   Author(s): Thomas Bretz, 08/2006 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2006
+!   Copyright: MAGIC Software Development, 2000-2008
 !
 !
@@ -31,4 +31,5 @@
 #include "MExtralgoDigitalFilter.h"
 
+#include <TMath.h>
 #include <TRandom.h>
 
@@ -139,5 +140,42 @@
 }
 
-#include <iostream>
+Int_t MExtralgoDigitalFilter::AlignExtractionWindow(Int_t &maxp, Int_t &frac, const Double_t ampsum)
+{
+    // Align extraction window to signal position
+
+    const Double_t timesum = Eval(fWeightsTime, maxp, frac);
+
+    // Because fWeightsPerBin/2 doesn't correspond to the center
+    // of a bin the time-values extracted are slightly positive.
+    // They are roughly between -0.45 and 0.55
+    const Double_t binoffset = TMath::Even(fWeightsPerBin) ? 0.5 : 0;
+
+    // This is the time offset from the extraction position
+    Double_t tmoffset = (frac+binoffset)/fWeightsPerBin + timesum/ampsum;
+
+    // Convert the residual fraction of one slice into an
+    // offset position in the extraction weights
+    const Int_t integ = TMath::FloorNint(tmoffset+0.5);
+
+    /*
+    if (integ>0)
+        tmoffset=0.49-0.05;
+    if (integ<0)
+        tmoffset=-0.49-0.05;
+    integ=0;
+    */
+
+    // move the extractor by an offset number of slices
+    // determined by the extracted time
+    maxp -= integ;
+
+    frac  = TMath::FloorNint((tmoffset-integ)*fWeightsPerBin);
+
+    // Align maxp into available range (TO BE CHECKED)
+    AlignIntoLimits(maxp, frac);
+
+    return integ;
+}
+
 void MExtralgoDigitalFilter::Extract(Int_t maxpos)
 {
Index: trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.h
===================================================================
--- trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.h	(revision 8917)
+++ trunk/MagicSoft/Mars/mextralgo/MExtralgoDigitalFilter.h	(revision 8918)
@@ -11,6 +11,4 @@
 class TH2F;
 class TArrayF;
-
-//#include <TMatrix.h>
 
 class MExtralgoDigitalFilter
@@ -97,43 +95,6 @@
     }
 
-    inline Int_t AlignExtractionWindow(Int_t &maxp, Int_t &frac, const Double_t ampsum)
-    {
-        // Align extraction window to signal position
-
-        const Double_t timesum = Eval(fWeightsTime, maxp, frac);
-
-        // Because fWeightsPerBin/2 doesn't correspond to the center
-        // of a bin the time-values extracted are slightly positive.
-        // They are roughly between -0.45 and 0.55
-        const Double_t binoffset = TMath::Even(fWeightsPerBin) ? 0.5 : 0;
-
-        // This is the time offset from the extraction position
-        Double_t tmoffset = (frac+binoffset)/fWeightsPerBin + timesum/ampsum;
-
-        // Convert the residual fraction of one slice into an
-        // offset position in the extraction weights
-        const Int_t integ = TMath::FloorNint(tmoffset+0.5);
-
-        /*
-        if (integ>0)
-            tmoffset=0.49-0.05;
-        if (integ<0)
-            tmoffset=-0.49-0.05;
-        integ=0;
-        */
-
-        // move the extractor by an offset number of slices
-        // determined by the extracted time
-        maxp -= integ;
-
-        frac  = TMath::FloorNint((tmoffset-integ)*fWeightsPerBin);
-
-        // Align maxp into available range (TO BE CHECKED)
-        AlignIntoLimits(maxp, frac);
-
-        return integ;
-    }
-
-    inline void AlignExtractionWindow(Int_t &maxp, Int_t &frac)
+    inline Int_t AlignExtractionWindow(Int_t &maxp, Int_t &frac, const Double_t ampsum);
+    inline void  AlignExtractionWindow(Int_t &maxp, Int_t &frac)
     {
         const Double_t amp = Eval(fWeightsAmp, maxp, frac);
