Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 4146)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 4147)
@@ -34,4 +34,8 @@
      - small modification in the Print()
 
+
+   * mpedestals/MPedCalcPedRun.cc
+     - put a condition if number of pixels in area index or in sector 
+       is zero, don't calculate av. pedestal and av. pedRMS of this part.
 
  2004/05/22: Markus Gaug
Index: /trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc
===================================================================
--- /trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc	(revision 4146)
+++ /trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc	(revision 4147)
@@ -307,5 +307,5 @@
       return kFALSE;
     }
-    
+
   fGeom   =  (MGeomCam*)pList->FindObject("MGeomCam");
   if (!fGeom)
@@ -346,4 +346,5 @@
 {
   
+    
   Int_t lastdesired   = (Int_t)fLoGainLast;
   Int_t lastavailable = (Int_t)fRunHeader->GetNumSamplesLoGain()-1;
@@ -586,4 +587,8 @@
       
       const Int_t   napix = fAreaValid.At(aidx);
+
+      if (napix == 0)
+        continue;
+
       const Float_t sum   = fAreaSumx.At(aidx);
       const Float_t sum2  = fAreaSumx2.At(aidx);
@@ -613,4 +618,8 @@
       
       const Int_t   nspix = fSectorValid.At(sector);
+
+      if (nspix == 0)
+        continue;
+      
       const Float_t sum   = fSectorSumx.At(sector);
       const Float_t sum2  = fSectorSumx2.At(sector);
