Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 6925)
+++ trunk/MagicSoft/Mars/Changelog	(revision 6926)
@@ -33,4 +33,16 @@
    * mjobs/MJOptimize.[h,cc]:
      - implemented option to divide sample into test/train
+
+   * mcalib/MCalibCalcFromPast.cc, mcalib/MCalibColorSteer.cc,
+     mcalib/MCalibrationChargeCalc.cc, mhcalib/MHCalibrationCam.cc:
+     - small updates to log-output
+
+   * mhflux/MAlphaFitter.cc:
+     - output scale-factor
+
+   * mhist/MHCamera.cc:
+     - as a workaround for a severe problem in gStyle->SetPalette
+       when using the deep blue sea I have switched off this
+       Platte for the moment
 
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 6925)
+++ trunk/MagicSoft/Mars/NEWS	(revision 6926)
@@ -59,4 +59,7 @@
      you'll get the correct units (arcmin) but a different result
      than with old versions (wrong units))
+
+   - As a workaround made the pretty palette the default. The
+     Depp Blue Sea has a bug which slows down long calibration runs a lot.
 
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc	(revision 6925)
+++ trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc	(revision 6926)
@@ -218,5 +218,5 @@
 // - Sets the latest MCalibrationChargeCam as update class into MCalibrateData
 // - Initialize new MCalibration*Cams into the intensity cams.
-// 
+//
 Int_t MCalibCalcFromPast::Process()
 {
@@ -229,8 +229,9 @@
   // Finalize Possible calibration histogram classes...
   //
-  *fLog << inf << GetDescriptor() << " : Finalize calibration histograms..." << endl;
-  if (Finalize("MHCalibrationChargeCam"))      *fLog << "MHCalibrationChargeCam ready" << flush;
-  if (Finalize("MHCalibrationChargeBlindCam")) *fLog << "MHCalibrationChargeBlindCam ready" << flush;
-  if (Finalize("MHCalibrationRelTimeCam"))     *fLog << "MHCalibrationRelTimeCam ready" << flush;  
+  *fLog << inf << GetDescriptor() << ": Finalize calibration histograms: " << flush;
+
+  if (Finalize("MHCalibrationChargeCam"))      *fLog << "MHCalibrationChargeCam..." << flush;
+  if (Finalize("MHCalibrationChargeBlindCam")) *fLog << "MHCalibrationChargeBlindCam..." << flush;
+  if (Finalize("MHCalibrationRelTimeCam"))     *fLog << "MHCalibrationRelTimeCam..." << flush;
 
   //
@@ -238,5 +239,5 @@
   //
   *fLog << endl;
-  *fLog << inf << GetDescriptor() << " : Finalize calibration calculations..." << endl;
+  *fLog << inf << "Finalize calibration calculations..." << endl;
   if (fChargeCalc)
     fChargeCalc->Finalize();
@@ -247,5 +248,4 @@
 
   ReInitialize();
-
   return kTRUE;
 }
@@ -281,30 +281,31 @@
 Bool_t MCalibCalcFromPast::ReInitialize()
 {
+  fNumCam++;
+
+  *fLog << inf << "MCalibCalcFromPast::ReInitialize #" << fNumCam << " ";
+
+  if (fIntensBad)
+    {
+      fIntensBad->AddToList(Form("MBadPixelsCam%04d",fNumCam),*fGeom);
+      *fLog << "MBadPixelsCam...";
+    }
+
+  if (fIntensCharge)
+    {
+      fIntensCharge->AddToList(Form("MCalibrationChargeCam%04d",fNumCam),*fGeom);
+      *fLog << "MCalibrationChargeCam...";
+    }
+  if (fIntensQE)
+    {
+      fIntensQE->AddToList(Form("MCalibrationQECam%04d",fNumCam),*fGeom);
+      *fLog << "MCalibrationQECam...";
+    }
+  if (fIntensBlind)
+    {
+      fIntensBlind->AddToList(Form("MCalibrationBlindCam%04d",fNumCam),*fGeom);
+      *fLog << "MCalibrationBlindCam...";
+    }
 
   *fLog << endl;
-  
-  fNumCam++;
-
-  if (fIntensBad)
-    {
-      fIntensBad->AddToList(Form("MBadPixelsCam%04d",fNumCam),*fGeom);
-      *fLog << inf << "New MBadPixelsCam Nr. " << fNumCam << endl;
-    }
-
-  if (fIntensCharge)
-    {
-      fIntensCharge->AddToList(Form("MCalibrationChargeCam%04d",fNumCam),*fGeom);
-      *fLog << inf << "New MCalibrationChargeCam Nr.  " << fNumCam << endl;
-    }
-  if (fIntensQE)
-    {
-      fIntensQE->AddToList(Form("MCalibrationQECam%04d",fNumCam),*fGeom);
-      *fLog << inf << "New MCalibrationQECam Nr.  " << fNumCam << endl;
-    }
-  if (fIntensBlind)
-    {
-      fIntensBlind->AddToList(Form("MCalibrationBlindCam%04d",fNumCam),*fGeom);
-      *fLog << inf << "New MCalibrationBlindCam Nr. " << fNumCam << endl;
-    }
 
   return kTRUE;
@@ -314,6 +315,5 @@
 Int_t MCalibCalcFromPast::PostProcess()
 {
-  *fLog << inf << GetDescriptor() 
-        << ": Number of Calibration Cams: " << fNumCam << endl;
+  *fLog << "Number of Calibration Cams: " << fNumCam << endl;
   return kTRUE;
   
Index: trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc	(revision 6925)
+++ trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc	(revision 6926)
@@ -262,9 +262,9 @@
   //
   *fLog << inf << GetDescriptor() << " : Finalize calibration histograms..." << flush;
-  if (Finalize("MHCalibrationChargeCam"))      *fLog << "MHCalibrationChargeCam";
-  if (Finalize("MHCalibrationChargeBlindCam")) *fLog << "MHCalibrationChargeBlindCam";
-  if (Finalize("MHCalibrationRelTimeCam"))     *fLog << "MHCalibrationRelTimeCam";  
-  if (Finalize("MHCalibrationTestCam"))        *fLog << "MHCalibrationChargeCam";  
-  if (Finalize("MHCalibrationTestTimeCam"))    *fLog << "MHCalibrationChargeCam";  
+  if (Finalize("MHCalibrationChargeCam"))      *fLog << "MHCalibrationChargeCam...";
+  if (Finalize("MHCalibrationChargeBlindCam")) *fLog << "MHCalibrationChargeBlindCam...";
+  if (Finalize("MHCalibrationRelTimeCam"))     *fLog << "MHCalibrationRelTimeCam...";
+  if (Finalize("MHCalibrationTestCam"))        *fLog << "MHCalibrationChargeCam...";
+  if (Finalize("MHCalibrationTestTimeCam"))    *fLog << "MHCalibrationChargeCam...";
 
   //
@@ -294,14 +294,11 @@
 
   MHCalibrationCam *hist = (MHCalibrationCam*)fParList->FindObject(name);
-  if (hist)
-    {
-      hist->Finalize();
-      hist->ResetHists();
-      hist->SetColor( fCalibPattern->GetPulserColor());
-      return kTRUE;
-    }
-
-  return kFALSE;
-  
+  if (!hist)
+      return kFALSE;
+
+  hist->Finalize();
+  hist->ResetHists();
+  hist->SetColor( fCalibPattern->GetPulserColor());
+  return kTRUE;
 }
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 6925)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 6926)
@@ -448,5 +448,5 @@
   fIntensCam = (MCalibrationIntensityChargeCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityChargeCam"));
   if (fIntensCam)
-    *fLog << inf << "Found MCalibrationIntensityChargeCam ... " << endl;
+    *fLog << inf << "Found MCalibrationIntensityChargeCam... " << flush;
   else
     {
@@ -455,5 +455,5 @@
         {
           *fLog << err << "Cannot find MCalibrationChargeCam ... abort." << endl;
-          *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
+          *fLog << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
           return kFALSE;
         }
@@ -464,5 +464,5 @@
     {
       *fLog << err << "Cannot find MHCalibrationChargeCam ... abort." << endl;
-      *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
+      *fLog << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
       return kFALSE;
     }
@@ -470,5 +470,5 @@
   fIntensQE = (MCalibrationIntensityQECam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityQECam"));
   if (fIntensQE)
-    *fLog << inf << "Found MCalibrationIntensityQECam ... " << endl;
+    *fLog << inf << "Found MCalibrationIntensityQECam... " << flush;
   else
     {
@@ -477,5 +477,5 @@
         {
           *fLog << err << "Cannot find MCalibrationQECam ... abort." << endl;
-          *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationQECam before..." << endl;
+          *fLog << "Maybe you forget to call an MFillH for the MHCalibrationQECam before..." << endl;
           return kFALSE;
         }
@@ -484,21 +484,19 @@
   fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityBlindCam"));
   if (fIntensBlind)
-    *fLog << inf << "Found MCalibrationIntensityBlindCam ... " << endl;
+    *fLog << inf << "Found MCalibrationIntensityBlindCam... " << flush;
   else
     {
       fBlindCam = (MCalibrationBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationBlindCam"));
       if (!fBlindCam)
-        *fLog << warn << GetDescriptor() 
-              << ": No MCalibrationBlindCam found... no Blind Pixel method! " << endl;
+        *fLog << "No MCalibrationBlindCam found... no Blind Pixel method!" << endl;
     }
   
   fHBlindCam = (MHCalibrationChargeBlindCam*)pList->FindObject(AddSerialNumber("MHCalibrationChargeBlindCam"));  
   if (!fHBlindCam)
-    *fLog << warn << GetDescriptor() 
-          << ": No MHCalibrationChargeBlindCam found... no Blind Pixel method! " << endl;
+    *fLog << "No MHCalibrationChargeBlindCam found... no Blind Pixel method!" << endl;
 
   fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam"));
   if (fIntensBad)
-    *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl;
+    *fLog << inf << "Found MBadPixelsIntensityCam... " << flush;
   else
     {
@@ -516,6 +514,5 @@
   fPINDiode = (MCalibrationChargePINDiode*)pList->FindObject("MCalibrationChargePINDiode");
   if (!fPINDiode)
-    *fLog << warn << GetDescriptor() 
-          << ": No MCalibrationChargePINDiode found... no PIN Diode method! " << endl;
+    *fLog << "No MCalibrationChargePINDiode found... no PIN Diode method!" << endl;
   
   MCalibrationQECam     *qecam     = fIntensQE      
@@ -688,5 +685,4 @@
 Int_t MCalibrationChargeCalc::Finalize()
 {
-  
   fNumHiGainSamples  =  fSignal->GetNumUsedHiGainFADCSlices();
   fNumLoGainSamples  =  fSignal->GetNumUsedLoGainFADCSlices();
@@ -739,4 +735,5 @@
 
   *fLog << endl;  
+
   //
   // The Michele check ...
@@ -797,5 +794,6 @@
 
   *fLog << endl;
-  // 
+
+  //
   // Finalize Blind Pixel
   //
@@ -1128,5 +1126,4 @@
 Bool_t MCalibrationChargeCalc::FinalizeFFactorMethod()
 {
-
   MBadPixelsCam         *badcam    = fIntensBad 
     ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
@@ -1156,5 +1153,4 @@
   for (Int_t i=0; i<npixels; i++)
     {
-      
       MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i];
       MBadPixelsPix         &bad =                         (*badcam)[i];
@@ -1174,8 +1170,6 @@
       const Float_t nphe  = pix.GetPheFFactorMethod();
       const Int_t   aidx  = (*fGeom)[i].GetAidx();
-
       camphes.Fill(i,nphe);
       camphes.SetUsed(i);
-
       areaphes    [aidx] += nphe;
       areavars    [aidx] += nphe*nphe;
@@ -1752,6 +1746,6 @@
           *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the F-Factor " 
                 << "in the camera with area index: " << i << endl;
-          *fLog << warn << GetDescriptor() << ": Number of dof.: " << ndf << " is smaller than 2 " << endl;
-          *fLog << warn << GetDescriptor() << ": Will use the simple mean and rms " << endl;
+          *fLog << "Number of dof.: " << ndf << " is smaller than 2 " << endl;
+          *fLog << "Will use the simple mean and rms." << endl;
           delete hist;
           continue;
@@ -1764,7 +1758,7 @@
           *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the F-Factor " 
                 << "in the camera with area index: " << i << endl;
-          *fLog << warn << GetDescriptor() << ": Fit probability " << prob 
+          *fLog << "Fit probability " << prob
                 << " is smaller than 0.001 " << endl;
-          *fLog << warn << GetDescriptor() << ": Will use the simple mean and rms " << endl;
+          *fLog << "Will use the simple mean and rms." << endl;
           delete hist;
           continue;
Index: trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 6925)
+++ trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc	(revision 6926)
@@ -923,5 +923,5 @@
     {
       *fLog << err << GetDescriptor() 
-            << ": ERROR: Both (HiGain and LoGain) histogram arrays have not been initialized... abort." << endl;
+            << ": ERROR - Both (HiGain and LoGain) histogram arrays have not been initialized... abort." << endl;
       return kFALSE;
     }
Index: trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc	(revision 6925)
+++ trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc	(revision 6926)
@@ -354,4 +354,5 @@
         *fLog << " - Chi^2/ndf (Background) " << fChiSqBg << endl;
         *fLog << " - Signal integrated      " << fIntegralMax << "°" << endl;
+        *fLog << " - Scale Factor (Off)     " << fScaleFactor << endl;
     }
 }
Index: trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 6925)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 6926)
@@ -110,5 +110,7 @@
     SetPalette(1, 0);
 #else
-    SetInvDeepBlueSeaPalette();
+    SetPrettyPalette();
+    // WORAROUND - FIXME: Calling it many times becomes slower and slower
+    //SetInvDeepBlueSeaPalette();
 #endif
     gPad = save;
