Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 5838)
+++ trunk/MagicSoft/Mars/Changelog	(revision 5839)
@@ -27,4 +27,6 @@
        me.
 
+   * mpedestal/MPedCalcFromLoGain.cc
+     - fixed one warning output which was not a real warning.
 
 
@@ -67,5 +69,4 @@
    * msignal/MExtractTimeFastSpline.cc:
      - fixed delete --> delete[]
-
 
 
Index: trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc	(revision 5838)
+++ trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc	(revision 5839)
@@ -231,45 +231,55 @@
 Bool_t MPedCalcFromLoGain::ReInit(MParList *pList)
 {
-    const UShort_t hisamples = fRunHeader->GetNumSamplesHiGain();
-    const UShort_t losamples = fRunHeader->GetNumSamplesLoGain();
-  
-    fSlices.Set(hisamples+losamples);
-  
-    UShort_t lastavailable   = hisamples+losamples-1;
-  
-    if (fExtractor)
-        lastavailable = losamples-1;
-  
-    // If the size is not yet set, set the size
-    if (fSumx.GetSize()==0)
-    {
-        const Int_t npixels  = fPedestalsOut->GetSize();
-        fNumEventsUsed.Set(npixels);
-        fTotalCounter.Set(npixels);
-    }
-  
-    if (fExtractWinLast > lastavailable) //changed to override check
-    {
-        const UShort_t diff = fExtractWinLast - lastavailable;
-        *fLog << warn << GetDescriptor();
-        *fLog << " - WARNING: Selected Extract Window ranges out of range...adjusting to last available slice ";
-        *fLog << lastavailable << endl;
-  
-        fExtractWinLast -= diff;
-        fExtractWinSize -= diff;
-    }
-  
-    lastavailable = hisamples + losamples -1;
-  
-    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;
-  
-        fCheckWinLast = lastavailable;
-    }
-  
-    return MExtractPedestal::ReInit(pList);
+
+  const UShort_t hisamples = fRunHeader->GetNumSamplesHiGain();
+  const UShort_t losamples = fRunHeader->GetNumSamplesLoGain();
+  
+  fSlices.Set(hisamples+losamples);
+  
+  UShort_t lastavailable   = hisamples+losamples-1;
+
+  if (fExtractor)
+    fExtractWinLast = fExtractWinFirst + fExtractor->GetWindowSizeHiGain() - 1;
+  
+  // If the size is not yet set, set the size
+  if (fSumx.GetSize()==0)
+    {
+      const Int_t npixels  = fPedestalsOut->GetSize();
+      fNumEventsUsed.Set(npixels);
+      fTotalCounter.Set(npixels);
+    }
+  
+  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;
+      
+      fCheckWinLast = lastavailable;
+    }
+  
+  if (fExtractWinLast > lastavailable) 
+    {
+      if (fExtractor)
+        {
+          *fLog << err << GetDescriptor();
+          *fLog << " - ERROR: Selected Last Extraction Window: " 
+                << fExtractWinFirst + fExtractor->GetWindowSizeHiGain()-1 
+                << "ranges out of range: " << lastavailable-1 << endl;
+          return kFALSE;
+        }
+      else
+        {
+          const UShort_t diff = fExtractWinLast - lastavailable;
+          *fLog << warn << GetDescriptor();
+          *fLog << " - WARNING: Selected Extract Window ranges out of range...adjusting to last available slice ";
+          *fLog << lastavailable << endl;
+          
+          fExtractWinLast -= diff;
+          fExtractWinSize -= diff;
+        }
+    }
+  
+  return MExtractPedestal::ReInit(pList);
 }
 
