Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2830)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2831)
@@ -11,4 +11,5 @@
 
    * mcalib/MHCalibrationBlindPixel.[h,cc] 
+   * mcalib/MHCalibrationConfig.h 
    * mcalib/MCalibrationBlindPix.h, 
      - incorporate Fit functions
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc	(revision 2830)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc	(revision 2831)
@@ -70,8 +70,6 @@
 //                                                                          
 //////////////////////////////////////////////////////////////////////////////
-
 #include "MCalibrationCalc.h"
 #include "MCalibrationConfig.h"
-#include "MCalibrationFits.h"
 
 #include "MCalibrationCam.h"
@@ -149,17 +147,17 @@
     if (!fRawEvt)
     {
-        *fLog << dbginf << "MRawEvtData not found... aborting." << endl;
-        return kFALSE;
+      *fLog << err << dbginf << "MRawEvtData not found... aborting." << endl;
+      return kFALSE;
     }
 
     const MRawRunHeader *runheader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
     if (!runheader)
-        *fLog << warn << dbginf << "Warning - cannot check file type, MRawRunHeader not found." << endl;
+      *fLog << warn << dbginf << "Warning - cannot check file type, MRawRunHeader not found." << endl;
     else
-        if (runheader->GetRunType() == kRTMonteCarlo)
+      if (runheader->GetRunType() == kRTMonteCarlo)
         {
-            return kTRUE;
+          return kTRUE;
         }
-
+    
     fCalibrations = (MCalibrationCam*)pList->FindCreateObj("MCalibrationCam");
     if (!fCalibrations)
@@ -218,6 +216,6 @@
     if (!fRunHeader)
     {
-        *fLog << dbginf << "MRawRunHeader not found... aborting." << endl;
-        return kFALSE;
+      *fLog << err << dbginf << ": MRawRunHeader not found... aborting." << endl;
+      return kFALSE;
     }
 
@@ -226,6 +224,6 @@
     if (!cam)
     {
-        *fLog << err << GetDescriptor() << ": No MGeomCam found... aborting." << endl;
-        return kFALSE;
+      *fLog << err << GetDescriptor() << ": No MGeomCam found... aborting." << endl;
+      return kFALSE;
     }
 
@@ -340,9 +338,9 @@
 
 	    if (!blindpixel.FillCharge(sumhi)) 
-	      *fLog << err << 
+	      *fLog << warn << 
 		"Overflow or Underflow occurred filling Blind Pixel sum = " << sumhi << endl;
 
 	    if (!blindpixel.FillTime((int)mtime)) 
-	      *fLog << err << 
+	      *fLog << warn << 
 		"Overflow or Underflow occurred filling Blind Pixel time = " << mtime << endl;
 	    
@@ -411,5 +409,4 @@
 {
 
-
   *fLog << inf << endl;
 
@@ -427,5 +424,5 @@
 
 
-  *fLog << GetDescriptor() << " Cut Histogram Edges" << endl;
+  *fLog << GetDescriptor() << ": Cut Histogram Edges" << endl;
 
   //
@@ -439,5 +436,5 @@
   MCalibrationBlindPix &blindpixel = *(fCalibrations->GetBlindPixel());
 
-  *fLog << GetDescriptor() << " Fitting the Blind Pixel" << endl;
+  *fLog << GetDescriptor() << ": Fitting the Blind Pixel" << endl;
 
   // 
@@ -448,10 +445,14 @@
 
       if (!blindpixel.FitCharge())
-        *fLog << err << dbginf << "Could not fit the blind pixel " << endl;
+        {
+          *fLog << err << dbginf << "Could not fit the blind pixel! " << endl;
+          blindpixel.DrawClone();
+          return kFALSE;
+        }
 
       blindpixel.DrawClone();
     }
   
-  *fLog << GetDescriptor() << " Fitting the Normal Pixels" << endl;
+  *fLog << GetDescriptor() << ": Fitting the Normal Pixels" << endl;
 
   //
@@ -488,6 +489,10 @@
 
   if (!fCalibrations->CalcNumPhotInsidePlexiglass())
-    *fLog << err << dbginf << "Could not calculate the number of photons from the blind pixel " << endl;
-
+    {
+      *fLog << err << GetDescriptor() 
+            << ": Could not calculate the number of photons from the blind pixel " << endl;
+      return kFALSE;
+    }
+  
   fCalibrations->SetReadyToSave();
   
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationConfig.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationConfig.h	(revision 2830)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationConfig.h	(revision 2831)
@@ -11,5 +11,5 @@
 
 
-// Global rejection criteria for the acceptance of a fit: Prob=0.01 == 99% Probability
+// Global rejection criteria for the acceptance of a fit: Prob=0.001 == 99.7% Probability
 const Float_t gkProbLimit = 0.001;
 
@@ -23,6 +23,3 @@
 const Float_t gkSq2Pi = 2.506628274631;
 
-// typedef to the fitting functions for the blind pixel
-typedef Double_t (*BlindPixelFitFunc)(Double_t *, Double_t *);
-
 #endif /* MARS_MHCalibrationBlindPixelConfig */
Index: trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc	(revision 2830)
+++ trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc	(revision 2831)
@@ -31,8 +31,6 @@
 //                                                                          //
 //////////////////////////////////////////////////////////////////////////////
-
 #include "MHCalibrationPixel.h"
 #include "MHCalibrationConfig.h"
-#include "MCalibrationFits.h"
 
 #include <TStyle.h>
