Index: trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilterPeakSearch.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilterPeakSearch.cc	(revision 6150)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilterPeakSearch.cc	(revision 6151)
@@ -271,5 +271,5 @@
   // Shift the start slice to the left:
   //
-  if (higainfirst > fHiGainFirst + fOffsetLeftFromPeak)
+  if (higainfirst >= fHiGainFirst + fOffsetLeftFromPeak)
     fHiGainFirst = higainfirst - fOffsetLeftFromPeak;
   else
@@ -279,5 +279,5 @@
   // Shift the last slice to the right:
   //
-  if (higainfirst + fOffsetRightFromPeak + fWindowSizeHiGain < hiGainLastsave)
+  if (higainfirst + fOffsetRightFromPeak + fWindowSizeHiGain <= hiGainLastsave)
     fHiGainLast  = higainfirst + fOffsetRightFromPeak + fWindowSizeHiGain;
   else 
@@ -285,5 +285,5 @@
       
 
-  if ( fHiGainFirst+(Int_t)fOffsetLoGain > fLoGainFirst ) 
+  if ( fHiGainFirst+(Int_t)fOffsetLoGain >= fLoGainFirst ) 
     fLoGainFirst = fHiGainFirst + (Int_t)fOffsetLoGain;
   else
@@ -400,11 +400,15 @@
 
   if (fHiGainOutOfRangeLeft > 0)
-    *fLog << warn << GetDescriptor() << ": " << fHiGainOutOfRangeLeft*100/GetNumExecutions() << "% ranging out of high-gain window to the left!" << endl;
+    *fLog << warn << GetDescriptor() << ": " << Form("%4.2f",((Float_t)fHiGainOutOfRangeLeft*100)/GetNumExecutions())
+          << "% ranging out of high-gain window to the left!" << endl;
   if (fHiGainOutOfRangeRight > 0)
-    *fLog << warn << GetDescriptor() << ": " << fHiGainOutOfRangeRight*100/GetNumExecutions() << "% ranging out of high-gain window to the right!" << endl;
+    *fLog << warn << GetDescriptor() << ": " << Form("%4.2f",((Float_t)fHiGainOutOfRangeRight*100/GetNumExecutions()) 
+          << "% ranging out of high-gain window to the right!" << endl;
   if (fLoGainOutOfRangeLeft > 0)
-    *fLog << warn << GetDescriptor() << ": " << fLoGainOutOfRangeLeft*100/GetNumExecutions() << "% ranging out of low-gain window to the left!" << endl;
+    *fLog << warn << GetDescriptor() << ": " << Form("%4.2f",((Float_t)fLoGainOutOfRangeLeft*100/GetNumExecutions()) 
+          << "% ranging out of low-gain window to the left!" << endl;
   if (fHiGainOutOfRangeRight > 0)
-    *fLog << warn << GetDescriptor() << ": " << fHiGainOutOfRangeRight*100/GetNumExecutions() << "% ranging out of high-gain window to the right!" << endl;
+    *fLog << warn << GetDescriptor() << ": " << Form("%4.2f",((Float_t)fHiGainOutOfRangeRight*100/GetNumExecutions()) 
+	  << "% ranging out of high-gain window to the right!" << endl;
 
   
