Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 5515)
+++ trunk/MagicSoft/Mars/Changelog	(revision 5516)
@@ -44,4 +44,8 @@
    * mcalib/MCalibrationChargeCalc.[h,cc]
      - added variable containing the name of the requested MPedestalCam
+
+   * mpedestal/MPedestalCam.[h,cc]
+     - added in Copy-function call to MParContainer::Copy
+     - removed now obsolete ReCalc()-function
 
 
Index: trunk/MagicSoft/Mars/mpedestal/MPedestalCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedestalCam.cc	(revision 5515)
+++ trunk/MagicSoft/Mars/mpedestal/MPedestalCam.cc	(revision 5516)
@@ -101,8 +101,10 @@
 // Copy 'constructor'
 //
-void MPedestalCam::Copy(TObject &object) const
-{
-
-  MPedestalCam &cam = (MPedestalCam&)object;
+void MPedestalCam::Copy(TObject &obj) const
+{
+
+  MParContainer::Copy(obj);
+
+  MPedestalCam &cam = (MPedestalCam&)obj;
   
   const Int_t n = GetSize();
@@ -530,62 +532,4 @@
 }
 
-
-// --------------------------------------------------------------------------
-//
-// Calculates the avarage pedestal and pedestal rms for all sectors
-// and pixel sizes. The geometry container is used to get the necessary
-// geometry information (sector number, size index) If the bad pixel
-// container is given all pixels which have the flag 'kUnsuitableRun' are ignored
-// in the calculation of the sector and size average.
-//
-void MPedestalCam::ReCalc(const MGeomCam &geom, MBadPixelsCam *bad)
-{
-    const Int_t np = GetSize();
-    const Int_t ns = geom.GetNumSectors();
-    const Int_t na = geom.GetNumAreas();
-
-    TArrayI acnt(na);
-    TArrayI scnt(ns);
-    TArrayD asumx(na);
-    TArrayD ssumx(ns);
-    TArrayD asumr(na);
-    TArrayD ssumr(ns);
-
-    for (int i=0; i<np; i++)
-    {
-        if (bad && (*bad)[i].IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
-            continue; //was: .IsBad()
-
-        // Create sums for areas and sectors
-        const UInt_t aidx = geom[i].GetAidx();
-        const UInt_t sect = geom[i].GetSector();
-
-        const MPedestalPix &pix = (*this)[i];
-
-        const UInt_t  ne   = pix.GetNumEvents();
-        const Float_t mean = pix.GetPedestal();
-        const Float_t rms  = pix.GetPedestalRms();
-
-        asumx[aidx] += ne*mean;
-        asumr[aidx] += ne*rms;
-        acnt[aidx]  += ne;
-
-        ssumx[sect] += ne*mean;
-        ssumr[sect] += ne*rms;
-        scnt[sect]  += ne;
-    }
-
-    for (int i=0; i<ns; i++)
-        if (scnt[i]>0)
-            GetAverageSector(i).Set(ssumx[i]/scnt[i], ssumr[i]/scnt[i], 0, scnt[i]);
-        else
-            GetAverageSector(i).Clear();
-
-    for (int i=0; i<na; i++)
-        if (acnt[i]>0)
-            GetAverageArea(i).Set(asumx[i]/acnt[i], asumr[i]/acnt[i], 0, acnt[i]);
-        else
-            GetAverageArea(i).Clear();
-}
 
 Bool_t MPedestalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
Index: trunk/MagicSoft/Mars/mpedestal/MPedestalCam.h
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedestalCam.h	(revision 5515)
+++ trunk/MagicSoft/Mars/mpedestal/MPedestalCam.h	(revision 5516)
@@ -58,6 +58,4 @@
   void  InitAverageSectors             ( const UInt_t i      );
 
-  void ReCalc(const MGeomCam &geom, MBadPixelsCam *bad=NULL);
-
   void Print(Option_t *o="") const;
   
