Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc	(revision 3562)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc	(revision 3601)
@@ -113,15 +113,13 @@
     fLoGainArray->SetOwner();
 
-    fAverageHiGainInnerPix = new MHCalibrationChargeHiGainPix("AverageHiGainInnerPix","Average HiGain FADC sums of inner pixels");
-    fAverageLoGainInnerPix = new MHCalibrationChargeLoGainPix("AverageLoGainInnerPix","Average LoGain FADC sums of inner pixels");
-    fAverageHiGainOuterPix = new MHCalibrationChargeHiGainPix("AverageHiGainOuterPix","Average HiGain FADC sums of outer pixels");
-    fAverageLoGainOuterPix = new MHCalibrationChargeLoGainPix("AverageLoGainOuterPix","Average LoGain FADC sums of outer pixels");
-
-/*
-    fAverageHiGainInnerPix->GetHGausHist()->SetName("HCalibrationChargeAverageInnerHiGainPix");
-    fAverageHiGainOuterPix->GetHGausHist()->SetName("HCalibrationChargeAverageOuterHiGainPix");
-    fAverageLoGainInnerPix->GetHGausHist()->SetName("HCalibrationChargeAverageInnerLoGainPix");
-    fAverageLoGainOuterPix->GetHGausHist()->SetName("HCalibrationChargeAverageOuterLoGainPix");
-*/
+    fAverageHiGainInnerPix = new MHCalibrationChargeHiGainPix("AverageHiGainInnerPix",
+							      "Average HiGain FADC sums of inner pixels");
+    fAverageLoGainInnerPix = new MHCalibrationChargeLoGainPix("AverageLoGainInnerPix",
+							      "Average LoGain FADC sums of inner pixels");
+    fAverageHiGainOuterPix = new MHCalibrationChargeHiGainPix("AverageHiGainOuterPix",
+							      "Average HiGain FADC sums of outer pixels");
+    fAverageLoGainOuterPix = new MHCalibrationChargeLoGainPix("AverageLoGainOuterPix",
+							      "Average LoGain FADC sums of outer pixels");
+
     fAverageHiGainInnerPix->GetHGausHist()->SetTitle("Summed FADC slices average Inner pixels HiGain");
     fAverageLoGainInnerPix->GetHGausHist()->SetTitle("Summed FADC slices average Inner pixels LoGain");
@@ -348,6 +346,7 @@
           if ((*fBadPixels)[i].IsBad())
 	  {
-	      fNumExcluded++;
-	      (*this)[i].SetExcluded();
+	    *fLog << warn << "Excluded pixel: " << i << " from calibration " << endl;
+	    fNumExcluded++;
+	    (*this)[i].SetExcluded();
 	  }
 	  (*this)[i].Init();
@@ -576,4 +575,5 @@
     if (hist.IsEmpty())
       {
+	*fLog << warn << "Empty Hi Gain histogram in pixel: " << pix.GetPixId() << endl;
         bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun);        
 	return;
@@ -583,5 +583,4 @@
     {
 	pix.SetHiGainSaturation();
-        bad.SetHiGainSaturation();
 	return;
     }
@@ -597,6 +596,7 @@
         {
           hist.BypassFit();
-          bad.SetHiGainNotFitted();
-          bad.SetUnsuitable(MBadPixelsPix::kUnreliableRun);
+	  *fLog << warn << "Hi Gain could not be fitted in pixel: " << pix.GetPixId() << endl;
+          bad.SetUncalibrated( MBadPixelsPix::kHiGainNotFitted );
+          bad.SetUnsuitable(   MBadPixelsPix::kUnreliableRun   );
         }
 
@@ -627,6 +627,7 @@
     if (!hist.IsFourierSpectrumOK())
       {
-        bad.SetHiGainOscillating();
-        bad.SetUnsuitable(MBadPixelsPix::kUnreliableRun);
+	*fLog << warn << "Oscillating Hi Gain in pixel: " << pix.GetPixId() << endl;
+	bad.SetUncalibrated( MBadPixelsPix::kHiGainOscillating );
+        bad.SetUnsuitable(   MBadPixelsPix::kUnreliableRun     );
       }
 }
@@ -648,6 +649,6 @@
     {
 	pix.SetLoGainSaturation();
-        bad.SetLoGainSaturation();
-        bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
+	bad.SetUncalibrated( MBadPixelsPix::kLoGainSaturation ); 
+        bad.SetUnsuitable(    MBadPixelsPix::kUnsuitableRun    );
 	return;
     }
@@ -663,5 +664,5 @@
         {
           hist.BypassFit();
-          bad.SetLoGainNotFitted();
+	  bad.SetUncalibrated( MBadPixelsPix::kLoGainNotFitted );
           if (pix.IsHiGainSaturation())
             bad.SetUnsuitable(MBadPixelsPix::kUnreliableRun);
@@ -697,5 +698,5 @@
     if (!hist.IsFourierSpectrumOK())
       {
-        bad.SetLoGainOscillating();
+        bad.SetUncalibrated( MBadPixelsPix::kLoGainOscillating );
         if (pix.IsHiGainSaturation())
           bad.SetUnsuitable(MBadPixelsPix::kUnreliableRun);
