Index: trunk/MagicSoft/Mars/callisto.cc
===================================================================
--- trunk/MagicSoft/Mars/callisto.cc	(revision 6228)
+++ trunk/MagicSoft/Mars/callisto.cc	(revision 6229)
@@ -391,5 +391,5 @@
             if (!job4.ProcessFile(job1.GetPedestalCam()))
               {
-                gLog << err << "Calculation of calibration failed." << endl << endl;
+                gLog << err << "Calibration of calibration failed." << endl << endl;
                 return -1;
               }
Index: trunk/MagicSoft/Mars/mjobs/MJCalibTest.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibTest.cc	(revision 6228)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibTest.cc	(revision 6229)
@@ -352,6 +352,6 @@
   if (fSequence.IsValid())
     {
-      const Int_t n0 = fSequence.SetupDatRuns(iter, fPathData, "D", IsUseRawData());
-      const Int_t n1 = fSequence.GetNumDatRuns();
+      const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData, "C", IsUseRawData());
+      const Int_t n1 = fSequence.GetNumCalRuns();
       if (n0==0)
         {
Index: trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilterPeakSearch.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilterPeakSearch.cc	(revision 6228)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilterPeakSearch.cc	(revision 6229)
@@ -271,11 +271,11 @@
   MRawEvtPixelIter pixel(fRawEvt);
 
-  Int_t   sat;
-  Byte_t  satpos;
+  Int_t   sat        = 0;
+  Byte_t  satpos     = 0;
   ULong_t gsatpos    = 0;
 
   Int_t   maxsumhi   = -1000000;
   Int_t   numsat     = 0;
-  Byte_t startslice;
+  Byte_t  startslice = 0;
 
   Byte_t hiGainFirstsave = fHiGainFirst;
@@ -319,12 +319,15 @@
     fHiGainFirst = higainfirst - fOffsetLeftFromPeak;
   else
-    fHiGainOutOfRangeLeft++;
-
+    {
+      //      *fLog << err << (Int_t)higainfirst << "   " << (int)fHiGainFirst << "  " << (int)fOffsetLeftFromPeak << endl;      
+      fHiGainOutOfRangeLeft++;
+    }
+  
   //
   // Shift the last slice to the right:
   //
   const Byte_t rlim = higainfirst + fOffsetRightFromPeak + fWindowSizeHiGain;
-  if (rlim <= hiGainLastsave+fHiLoLast)
-    if (rlim > hiGainLastsave)
+  if (rlim <= fHiGainLast+fHiLoLast)
+    if (rlim > fHiGainLast)
       fHiLoLast   = rlim - fHiGainLast;
     else
@@ -334,7 +337,9 @@
       }
   else 
-    fHiGainOutOfRangeRight++;
-      
-
+    {
+      fHiGainOutOfRangeRight++;
+      //      *fLog << err << (Int_t)higainfirst << endl;
+    }
+  
   const Byte_t llim = fHiGainFirst + (Int_t)fOffsetLoGain;
   if ( llim >= fLoGainFirst ) 
@@ -544,7 +549,7 @@
 
     MExtractTimeAndChargeDigitalFilter::Print(o);
-    *fLog << " Offset from Peak left:   " << fOffsetLeftFromPeak   << endl;
-    *fLog << " Offset from Peak right:  " << fOffsetRightFromPeak  << endl;
-    *fLog << " Peak search window size: " << fPeakSearchWindowSize << endl;
+    *fLog << " Offset from Peak left:   " << (int)fOffsetLeftFromPeak   << endl;
+    *fLog << " Offset from Peak right:  " << (int)fOffsetRightFromPeak  << endl;
+    *fLog << " Peak search window size: " << (int)fPeakSearchWindowSize << endl;
     *fLog << " High Gain Failure limit: " << fHiGainFailureLimit << endl;
     *fLog << " Low Gain Failure limit:  " << fLoGainFailureLimit << endl;
