Index: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 5039)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 5040)
@@ -61,4 +61,5 @@
 
 #include "MLog.h"
+#include "MLogManip.h"
 
 ClassImp(MCalibrationCam);
@@ -181,19 +182,19 @@
   MParContainer::Copy(calib);
   
-  calib.fPulserColor          = fPulserColor;
-  
-  const Int_t n3 = GetSize();
-  if (n3 != 0)
+  calib.fPulserColor = fPulserColor;
+  
+  const Int_t n = fPixels->GetSize();
+  if (n != 0)
     {
-      calib.InitSize(n3);
-      for (int i=0; i<n3; i++)
+      calib.InitSize(n);
+      for (int i=0; i<n; i++)
         (*this)[i].Copy(calib[i]);
     }
   
-  const Int_t n4 = GetAverageAreas();
-  if (n4 != 0)
+  const Int_t n2 = GetAverageAreas();
+  if (n2 != 0)
     {
-      calib.InitAverageAreas(n4);
-      for (int i=0; i<n4; i++)
+      calib.InitAverageAreas(n2);
+      for (int i=0; i<n2; i++)
         {
           GetAverageArea   (i).Copy(calib.GetAverageArea(i));
@@ -206,9 +207,9 @@
     }
   
-  const Int_t n5 = GetAverageSectors();
-  if (n5 != 0)
+  const Int_t n3 = GetAverageSectors();
+  if (n3 != 0)
     {
-      calib.InitAverageSectors(n5);
-      for (int i=0; i<n5; i++)
+      calib.InitAverageSectors(n3);
+      for (int i=0; i<n3; i++)
         {
           GetAverageSector   (i).Copy(calib.GetAverageSector(i));
@@ -225,5 +226,7 @@
 {
 
-  const UInt_t save = GetSize();
+  const UInt_t save = fPixels->GetEntries();
+
+  *fLog << err << save << endl;
   
   if (i==save)
@@ -443,5 +446,5 @@
 const Int_t MCalibrationCam::GetSize() const
 {
-  return fPixels->GetSize();
+  return fPixels->GetEntriesFast();
 }
 
