Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 5546)
+++ trunk/MagicSoft/Mars/Changelog	(revision 5547)
@@ -21,12 +21,20 @@
                                                  -*-*- END OF LINE -*-*-
 
+ 2004/12/01: Markus Gaug and Thomas Schweizer
+ 
+   * mpedestal/MPedCalcFromLoGain.cc
+     - introduce a check which does not allow the last slice of the 
+       check window to be smaller than the last slice of the 
+       extraction window.
+
+
  2004/12/01: Markus Gaug
 
-   * MExtractTimeAndChargeSpline.[h,cc]:
+   * msignal/MExtractTimeAndChargeSpline.[h,cc]:
      - introduced a random iterator for the "pedestal" calculation of 
        the amplitude spline.
 
 
-   * MExtractTimeAndChargeDigitalFilter.cc:
+   * msignal/MExtractTimeAndChargeDigitalFilter.cc:
      - fixed bug in the loop over the weights which can cause a call to 
        an array index out of range. Since MArrays are used, this call 
@@ -38,5 +46,5 @@
  2004/11/30: Thomas Bretz
  
-   * MExtractTimeAndChargeDigitalFilter.cc:
+   * msignal/MExtractTimeAndChargeDigitalFilter.cc:
      - InitArrays: added missing return statement
 
Index: trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc	(revision 5546)
+++ trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc	(revision 5547)
@@ -267,9 +267,18 @@
    if (fCheckWinLast > lastavailable) //changed to override check
      {
-       *fLog << warn << GetDescriptor();
-       *fLog << " - WARNING: Last Check Window slice out of range...adjusting to last available slice ";
-       *fLog << lastavailable << endl;
+       *fLog << warn << GetDescriptor()
+             << " - WARNING: Last Check Window slice out of range...adjusting to last available slice "
+             << lastavailable << endl;
        
        fCheckWinLast = lastavailable;
+     }
+
+   if (fCheckWinLast < fExtractWinLast) 
+     {
+       *fLog << warn << GetDescriptor()
+             << " - WARNING: Last Check Window slice lower than extraction window "
+             << " - push it up to last number of low-gain samples: ";
+       fCheckWinLast = fExtractWinLast;
+       *fLog << fCheckWinLast << endl;
      }
 
