Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 5871)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 5872)
@@ -59,4 +59,5 @@
 
    * mjobs/MJPedestal.cc
+   * mjobs/MJCalibrateSignal.cc
      - fixed default extraction ranges.
 
Index: /trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 5871)
+++ /trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 5872)
@@ -72,4 +72,5 @@
 #include "MPedCalcFromLoGain.h"
 #include "MExtractor.h"
+#include "MExtractTimeAndCharge.h"
 #include "MFCosmics.h"
 #include "MTaskEnv.h"
@@ -365,7 +366,8 @@
             pedlo2.SetExtractor((MExtractTimeAndCharge*)extractor1);
             pedlo3.SetExtractor((MExtractTimeAndCharge*)extractor1);
-            pedlo1.SetExtractWindow(15, 0/*obsolete*/);
-            pedlo2.SetExtractWindow(15, 0/*obsolete*/);
-            pedlo3.SetExtractWindow(15, 0/*obsolete*/);
+            const Int_t win = ((MExtractTimeAndCharge*)extractor1)->GetWindowSizeHiGain();
+            pedlo1.SetExtractWindow(15, win);
+            pedlo2.SetExtractWindow(15, win/*obsolete*/);
+            pedlo3.SetExtractWindow(15, win/*obsolete*/);
         }
         else
Index: /trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 5871)
+++ /trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 5872)
@@ -58,4 +58,5 @@
 // Other basic classes
 #include "MExtractor.h"
+#include "MExtractTimeAndCharge.h"
 
 // parameter containers
@@ -901,5 +902,5 @@
     case kUsePedRun:
         // In case  other than 'fundamental' second argument is obsolete
-        pedcalc.SetExtractWindow(0,14);  // kUsePedRun
+        // pedcalc.SetExtractWindow(0,14);  // kUsePedRun (take default from class)
         taskenv.SetDefault(&pedcalc);
         tlist.AddToList(&taskenv);
@@ -908,5 +909,5 @@
     case kUseData:
         // In case  other than 'fundamental' second argument is obsolete
-        pedlogain.SetExtractWindow(15,14); // kUseData
+        // pedlogain.SetExtractWindow(15,14); // kUseData (take default from class)
         taskenv.SetDefault(&pedlogain);
         tlist.AddToList(&taskenv);
@@ -932,11 +933,13 @@
     if (fExtractor)
     {
-      const Float_t f = 0.5+fExtractor->GetHiGainFirst();
-      const Float_t n = 0.5+fExtractor->GetNumHiGainSamples();
-      pedcalc.SetExtractWindow((Int_t)f, (Int_t)n);
-      pedlogain.SetExtractWindow((Int_t)(15+f), (Int_t)n);
-            
+
       if (!fExtractor->InheritsFrom("MExtractTimeAndCharge"))
         {
+
+          const Float_t f = 0.5+fExtractor->GetHiGainFirst();
+          const Int_t win = ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeHiGain();
+          pedcalc.SetExtractWindow((Int_t)f, win);
+          pedlogain.SetExtractWindow((Int_t)(15+f), win);
+
           if (fExtractionType!=kFundamental)
             {
@@ -947,4 +950,12 @@
             }
         }
+      else
+        {
+          const Float_t f = 0.5+fExtractor->GetHiGainFirst();
+          const Float_t n = 0.5+fExtractor->GetNumHiGainSamples();
+          pedcalc.SetExtractWindow((Int_t)f, (Int_t)n);
+          pedlogain.SetExtractWindow((Int_t)(15+f), (Int_t)n);
+        }
+      
       
       if (fExtractionType!=kFundamental)
@@ -957,5 +968,12 @@
         }
     }
-
+    else
+      {
+        *fLog << warn << GetDescriptor() 
+              << ": WARNING: No extractor has been handed over! " << endl;
+        *fLog << warn << GetDescriptor()
+              << ": WARNING: Taking default window for pedestal extraction. The calculated pedestal RMS will probably not match with future pedestal RMSs from different extraction windows." << endl;
+      }
+    
     /*
     switch (fExtractType)
