Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 8445)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 8446)
@@ -19,4 +19,24 @@
                                                  -*-*- END OF LINE -*-*-
 
+ 2007/04/25 Thomas Bretz
+
+   * mbadpixels/MBadPixelsCam.cc:
+     - removed obsolete code from Print() which tried to align the output
+
+   * mhcalib/MHCalibrationChargeCam.cc:
+     - increased the shown binning range further
+
+   * mhcalib/MHCalibrationPulseTimeCam.cc:
+     - unimportant changes
+
+   * mjobs/MJPedestal.cc:
+     - changed a comment
+
+   * mpedestal/MPedestalSubtractedEvt.h:
+     - fixed a bug of preset upper limits. The last slice is fNumSamples-1
+       not fNumSamples
+
+
+
  2007/04/24 Thomas Bretz
 
Index: /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 8445)
+++ /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 8446)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MBadPixelsCam.cc,v 1.49 2007-04-20 08:55:17 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MBadPixelsCam.cc,v 1.50 2007-04-25 14:39:41 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -394,5 +394,4 @@
     
   Int_t count = 0;
-  Int_t full  = 0;
 
   for (Int_t i=0; i<GetSize(); i++)
@@ -401,24 +400,12 @@
         {
           *fLog << i << " ";
-	  full++;
           count ++;
         }
-      
-      if (count == 0)
-	continue;
-      
-      if (!(full % 25))
-	{
-	  full = 0;
-	  *fLog << endl;
-	}
-    }
-  *fLog << endl;
+    }
   *fLog << count << " normal pixels" << endl;
   *fLog << endl;
 
   *fLog << "Pixels unsuited for the whole run:" << endl;
-  
-  full  = 0;
+
   count = 0;
   for (Int_t i=0; i<GetSize(); i++)
@@ -427,25 +414,13 @@
         {
           *fLog << i << " ";
-	  full++;
           count ++;
         }
-      
-      if (count == 0)
-        continue;
-      
-      if (!(full % 25))
-	{
-	  full = 0;
-	  *fLog << endl;
-	}
-    }
-
-  *fLog << endl;
+    }
+
   *fLog << count << " unsuited pixels per run :-(" << endl;
   *fLog << endl;
-  
+
   *fLog << "Pixels unsuited for this event:" << endl;
 
-  full  = 0;
   count = 0;
   for (Int_t i=0; i<GetSize(); i++)
@@ -454,27 +429,15 @@
         {
           *fLog << i << " ";
-	  full++;
           count ++;
         }
-      
-      if (count == 0)
-        continue;
-      
-      if (!(full % 25))
-	{
-	  full  = 0;
-	  *fLog << endl;
-	}
-    }
-
-  *fLog << endl;
+    }
+
   *fLog << count << " unsuited pixels per event :-(" << endl;
   *fLog << endl;
-  
-  full  = 0;
+
   count = 0;
-  
+
   *fLog << all << "Pixels unreliable for the whole run:" << endl;
-  
+
   for (Int_t i=0; i<GetSize(); i++)
     {
@@ -482,19 +445,8 @@
         {
           *fLog << i << " ";
-	  full++;
           count ++;
         }
-      
-      if (count == 0)
-        continue;
-      
-      if (!(full % 25))
-	{
-	  full  = 0;
-	  *fLog << endl;
-	}
-    }
-  
-  *fLog << endl;
+    }
+
   *fLog << count << " unreliable pixels :-(" << endl;
   *fLog << endl;
@@ -502,5 +454,5 @@
   *fLog << all << "Unsuited pixels statistics:" << endl;
   *fLog << endl;
-  
+
   PrintBadPixels(MBadPixelsPix::kPreviouslyExcluded,"Previously excluded");
   PrintBadPixels(MBadPixelsPix::kChargeIsPedestal,"Signal smaller 3 Pedestal RMS");
@@ -519,5 +471,5 @@
   *fLog << all << "Unreliable pixels statistics:" << endl;
   *fLog << endl;
-  
+
   PrintBadPixels(MBadPixelsPix::kChargeSigmaNotValid,"Signal Sigma smaller Pedestal RMS");
   PrintBadPixels(MBadPixelsPix::kHiGainNotFitted    ,"High Gain Signals could not be fitted");
@@ -554,5 +506,4 @@
   *fLog << "Pixels with " << text << ": " << endl;
   UInt_t count = 0;
-  UInt_t full  = 0;
 
   for (Int_t i=0; i<GetSize(); i++)
@@ -561,19 +512,8 @@
         {
           *fLog << i << " ";
-	  full++;
           count++;
         }
-      
-      if (count == 0)
-        continue;
-      
-      if (!(full % 25))
-	{
-	  full  = 0;
-	  *fLog << endl;
-	}
     }
   
-  *fLog << endl;
   *fLog << Form("%3i",count) << " pixels in total " << endl;
 }
Index: /trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc	(revision 8445)
+++ /trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc	(revision 8446)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.56 2007-04-18 15:33:56 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.57 2007-04-25 14:39:43 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -1274,5 +1274,5 @@
     xaxe->SetTitle(hist->GetXaxis()->GetTitle());
     yaxe->SetTitle(hist->GetYaxis()->GetTitle());
-    xaxe->SetRange(hist->GetMaximumBin()-30, hist->GetMaximumBin()+30);
+    xaxe->SetRange(hist->GetMaximumBin()-50, hist->GetMaximumBin()+50);
 
     gStyle->SetOptFit();
Index: /trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc	(revision 8445)
+++ /trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc	(revision 8446)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.37 2007-04-23 19:06:28 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MHCalibrationPulseTimeCam.cc,v 1.38 2007-04-25 14:39:43 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -390,5 +390,5 @@
 
         // Get position of maximum
-        const Int_t   pos = evt->GetMax(idx/*, first, last*/);
+        const Int_t   pos = evt->GetMax(idx);
         const Float_t max = evt->GetSamples(idx)[pos];
 
@@ -413,12 +413,12 @@
     for (UInt_t j=0; j<nareas; j++)
     {
-        const Int_t npix = fAverageAreaNum[j];
-
-        if (npix > fNumPixelsRequired)
+        if (fAverageAreaNum[j] > fNumPixelsRequired)
         {
+            sumarea[j] /= fAverageAreaNum[j];
+
             if (IsOscillations())
-                GetAverageHiGainArea(j).FillHistAndArray(sumarea[j]/npix);
+                GetAverageHiGainArea(j).FillHistAndArray(sumarea[j]);
             else
-                GetAverageHiGainArea(j).FillHist(sumarea[j]/npix);
+                GetAverageHiGainArea(j).FillHist(sumarea[j]);
 
         }
@@ -427,12 +427,12 @@
     for (UInt_t j=0; j<nsectors; j++)
     {
-        const Int_t npix = fAverageSectorNum[j];
-
-        if (npix > 0)
+        if (fAverageSectorNum[j] > 0)
         {
+            sumsector[j] /= fAverageSectorNum[j];
+
             if (IsOscillations())
-                GetAverageHiGainSector(j).FillHistAndArray(sumsector[j]/npix);
+                GetAverageHiGainSector(j).FillHistAndArray(sumsector[j]);
             else
-                GetAverageHiGainSector(j).FillHist(sumsector[j]/npix);
+                GetAverageHiGainSector(j).FillHist(sumsector[j]);
         }
     }
Index: /trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 8445)
+++ /trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 8446)
@@ -1070,5 +1070,5 @@
         hpedcam.SetRenorm(kTRUE);
 
-    // To have it in the parlist!
+    // To have it in the parlist for MEnv!
     MHCalibrationPulseTimeCam pulcam;
     plist.AddToList(&pulcam);
Index: /trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.h
===================================================================
--- /trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.h	(revision 8445)
+++ /trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.h	(revision 8446)
@@ -49,5 +49,5 @@
     Int_t GetMax(const Int_t pixidx, UInt_t &val) const
     {
-        return GetMax(pixidx, 0, fNumSamples, val);
+        return GetMax(pixidx, 0, fNumSamples-1, val);
     }
 
@@ -55,10 +55,10 @@
     {
         UInt_t val;
-        return GetMax(pixidx, 0, fNumSamples, val);
+        return GetMax(pixidx, 0, fNumSamples-1, val);
     }
     Int_t GetSaturation(const Int_t pixidx, Int_t limit) const
     {
         Int_t first=0;
-        Int_t last=fNumSamples;
+        Int_t last=fNumSamples-1;
         return GetSaturation(pixidx, limit, first, last);
     }
