Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7116)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7117)
@@ -63,4 +63,9 @@
    * merpp.cc:
      - new options: --auto-time-start --auto-time-stop
+
+   * mbadpixels/MBadPixelsTreat.cc:
+     - removed the checks in the algorithm whether the current pixel
+       is NULL. MSignalCam doesn't support zero supression anymore.
+       GetPixById has been replaced by the []-operator
 
 
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc	(revision 7116)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc	(revision 7117)
@@ -228,25 +228,14 @@
     for (UShort_t i=0; i<entries; i++)
     {
-        MSignalPix *pix = fEvt->GetPixById(i);
-
         //
         // Check whether pixel with idx i is blind
         //
-        if (pix && !IsPixelBad(i))
+        if (!IsPixelBad(i))
             continue;
 
         //
-        // Get a pointer to this pixel. If it is not yet existing
-        // create a new entry for this pixel in MSignalCam
-        //
-        if (!pix)
-        {
-            pix = fEvt->AddPixel(i, 0, 0);
-            (*fBadPixels)[i].SetUnsuitable(MBadPixelsPix::kUnsuitableEvt);
-        }
-
-        //
         // Get the corresponding geometry and pedestal
         //
+        MSignalPix     &pix  = (*fEvt)[i];
         const MGeomPix &gpix = (*fGeomCam)[i];
 
@@ -256,6 +245,6 @@
         Int_t num = nucp ? 0 : 1;
 
-        nphot[i]  = nucp ? 0 : pix->GetNumPhotons();
-        perr[i]   = nucp ? 0 : Pow2(pix->GetErrorPhot());
+        nphot[i]  = nucp ? 0 : pix.GetNumPhotons();
+        perr[i]   = nucp ? 0 : Pow2(pix.GetErrorPhot());
 
         //
@@ -282,11 +271,4 @@
 
             //
-            // Check whether the neighbor has a signal stored
-            //
-            const MSignalPix *evtpix = fEvt->GetPixById(nidx);
-            if (!evtpix)
-                continue;
-
-            //
             // Get the geometry for the neighbor
             //
@@ -296,6 +278,8 @@
 	    //The error is calculated as the quadratic sum of the errors
 	    //
-            nphot[i] += nratio*evtpix->GetNumPhotons();
-            perr[i]  += nratio* Pow2(evtpix->GetErrorPhot());
+            const MSignalPix &evtpix = (*fEvt)[nidx];
+
+            nphot[i] += nratio*evtpix.GetNumPhotons();
+            perr[i]  += nratio*Pow2(evtpix.GetErrorPhot());
 
             num++;
@@ -307,5 +291,5 @@
         if (num<fNumMinNeighbors)
         {
-            pix->SetPixelUnmapped();
+            pix.SetPixelUnmapped();
             continue;
         }
@@ -318,5 +302,5 @@
         perr[i]   = TMath::Sqrt(perr[i]/(num*ratio));
  
-        pix->Set(nphot[i], perr[i]);
+        pix.Set(nphot[i], perr[i]);
     }
 }
