Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 5506)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 5511)
@@ -861,23 +861,19 @@
       t7->SetTextColor(gStyle->GetColorPalette(Int_t(6./max*numcol + 1.)));
       t7->SetTextAlign(12);
-      TText *t8 = pave->AddText(Form("Deviating global F-Factor:                           %3i pixels",
+      TText *t9 = pave->AddText(Form("Deviating Number of Photons:                    %3i pixels",
                                        CountBadPixels(&disp24,7)));
-      t8->SetTextColor(gStyle->GetColorPalette(Int_t(7./max*numcol + 1.)));
-      t8->SetTextAlign(12);
-      TText *t9 = pave->AddText(Form("Deviating Number of Photons:                    %3i pixels",
-                                       CountBadPixels(&disp24,8)));
-      t9->SetTextColor(gStyle->GetColorPalette(Int_t(8./max*numcol + 1.)));
+      t9->SetTextColor(gStyle->GetColorPalette(Int_t(7./max*numcol + 1.)));
       t9->SetTextAlign(12);
       TText *t10= pave->AddText(Form("High-Gain Histogram Overflow:                  %3i pixels",
-                                       CountBadPixels(&disp24,9 )));
-      t10->SetTextColor(gStyle->GetColorPalette(Int_t(9./max*numcol + 1.)));
+                                       CountBadPixels(&disp24,8 )));
+      t10->SetTextColor(gStyle->GetColorPalette(Int_t(8./max*numcol + 1.)));
       t10->SetTextAlign(12);
       TText *t11= pave->AddText(Form("Low-Gain Histogram Overflow:                   %3i pixels",
-                                       CountBadPixels(&disp24,10)));
-      t11->SetTextColor(gStyle->GetColorPalette(Int_t(10./max*numcol + 1.)));
+                                       CountBadPixels(&disp24,9 )));
+      t11->SetTextColor(gStyle->GetColorPalette(Int_t(9./max*numcol + 1.)));
       t11->SetTextAlign(12);
       TText *t12= pave->AddText(Form("Previously Excluded:                                    %3i pixels",
-                                       CountBadPixels(&disp24,11)));
-      t12->SetTextColor(gStyle->GetColorPalette(Int_t(11./max*numcol + 1.)));
+                                       CountBadPixels(&disp24,10)));
+      t12->SetTextColor(gStyle->GetColorPalette(Int_t(10./max*numcol + 1.)));
       t12->SetTextAlign(12);
       pave->Draw();
@@ -943,4 +939,8 @@
       tt6->SetTextColor(gStyle->GetColorPalette(Int_t(7./max2*numcol + 1.)));
       tt6->SetTextAlign(12);
+      TText *tt8 = pave2->AddText(Form("Deviating global F-Factor:                        %3i pixels",
+                                       CountBadPixels(&disp25,8)));
+      tt8->SetTextColor(gStyle->GetColorPalette(Int_t(8./max2*numcol + 1.)));
+      tt8->SetTextAlign(12);
       pave2->Draw();
 
@@ -1677,6 +1677,14 @@
     filltme.SetDrawOption(drawoption.Data());
   */
+    //
+    // Set default extractors in case, none has been set...
+    //
+    if (!fExtractor)
+      fExtractor = &extract2;
+    if (!fTimeExtractor)
+      fTimeExtractor = &timespline;
+
     MTaskEnv taskenv("ExtractSignal");
-    taskenv.SetDefault(fExtractor ? fExtractor : &extract2);
+    taskenv.SetDefault(fExtractor);
 
     tlist.AddToList(&merge);
@@ -1684,15 +1692,5 @@
 
     MPedCalcPedRun           pedcalc;
-    pedcalc.SetWindowSize(fExtractor 
-                          ? (Int_t)TMath::Nint(fExtractor->GetNumHiGainSamples())
-                          : (Int_t)TMath::Nint(extract2.GetNumHiGainSamples())
-                          );
-    pedcalc.SetRange(fExtractor 
-                     ? fExtractor->GetHiGainFirst()
-                     : extract2.GetHiGainFirst(), 
-                     fExtractor 
-                     ? fExtractor->GetHiGainLast()
-                     : extract2.GetHiGainLast()
-                     );
+    pedcalc.SetExtractWindow(fExtractor->GetHiGainFirst(),TMath::Nint(fExtractor->GetNumHiGainSamples()));
 
     if (IsIntensity())
@@ -1709,5 +1707,5 @@
     if (!IsTimeAndCharge())
       {
-        taskenv2.SetDefault(fTimeExtractor ? fTimeExtractor : &timespline);
+        taskenv2.SetDefault(fTimeExtractor);
     
         if (IsRelTimes())
