Index: trunk/MagicSoft/Mars/mbadpixels/MHBadPixels.cc
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MHBadPixels.cc	(revision 4874)
+++ trunk/MagicSoft/Mars/mbadpixels/MHBadPixels.cc	(revision 4887)
@@ -35,5 +35,4 @@
 #include "MBadPixelsCam.h"
 #include "MGeomCam.h"
-#include "MPedPhotCam.h"
 #include "MParList.h"
 #include "MBinning.h"
@@ -51,4 +50,5 @@
 //
 MHBadPixels::MHBadPixels(const char *name, const char *title)
+    : fNamePedPhotCam("MPedPhotCam")
 {
     fName  = name  ? name  : "MHBadPixels";
@@ -67,5 +67,4 @@
     fBadN.SetYTitle("number of bad pixels");
 
-    fNamePedPhotCam = "MPedPhotCamFromData";
 }
 
@@ -79,9 +78,7 @@
     if (!fCam)    
     {
-        *fLog << err << "MHBadPixels::SetupFill; MGeomCam not found... aborting." << endl;
+        *fLog << err << "MGeomCam not found... aborting." << endl;
         return kFALSE;
     }
-    *fLog << "MHBadPixels::SetupFill; fCam = " << fCam << endl;
-
     fPointPos = (MPointingPos*)plist->FindObject("MPointingPos");
     if (!fPointPos)
@@ -91,14 +88,4 @@
     }
 
-    
-    fPedPhot = (MPedPhotCam*)plist->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam");
-    if (!fPedPhot)
-    {
-        *fLog << err << AddSerialNumber(fNamePedPhotCam) 
-              << "[MPedPhotCam] not found... aborting." << endl;
-        return kFALSE;
-    }
-    fPedPhot->InitSize(fCam->GetNumPixels());
-
     //----------------------------------------------------
     // Get Theta Binning
@@ -106,12 +93,10 @@
     if (!binstheta)
     {
-        *fLog << err << "Object 'BinningTheta' [MBinning] not found... aborting" << endl;
+        *fLog << err << "BinningTheta [MBinning] not found... aborting" << endl;
         return kFALSE;
     }
 
     // Get binning for pixel number
-    const UInt_t npix1 = fPedPhot->GetSize()+1;
-
-    *fLog << "MHBadPixels::SetupFill; npix1 = " << npix1 << endl;
+    const UInt_t npix1 = fCam->GetNumPixels()+1;
 
     MBinning binspix("BinningPixel");
@@ -121,8 +106,4 @@
     SetBinning(&fBadId, binstheta, &binspix);
     SetBinning(&fBadN,  binstheta, &binspix);
-
-    //----------------------------------------------------
-    *fLog << inf << "Name of MPedPhotCam container : " << fNamePedPhotCam
-          << endl;
 
     return kTRUE;
@@ -141,19 +122,16 @@
     Double_t theta = fPointPos->GetZd();
 
-    const MBadPixelsCam *fBadPixels = (MBadPixelsCam*)par;
+    const MBadPixelsCam *badpixels = (MBadPixelsCam*)par;
 
-    const UInt_t entries = fPedPhot->GetSize(); 
+    const UInt_t entries = badpixels->GetSize();
+
     UInt_t nb = 0;
     for (UInt_t i=0; i<entries; i++)
     {
-      //*fLog << "MHBadPixels::Fill; i = " << i << endl;
-
-      if ( (*fBadPixels)[i].IsUnsuitable() )
-      {
-	//*fLog << "MHBadPixels::Fill; (UnSuitable) " << endl;
-
-          fBadId.Fill(theta, i, w);
-          nb++;
-      }   
+        if ( (*badpixels)[i].IsUnsuitable() )
+        {
+            fBadId.Fill(theta, i, w);
+            nb++;
+        }
     }
     fBadN.Fill(theta, nb, w);
@@ -204,14 +182,2 @@
     pad->Update();
 }
-//==========================================================================
-
-
-
-
-
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mbadpixels/MHBadPixels.h
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MHBadPixels.h	(revision 4874)
+++ trunk/MagicSoft/Mars/mbadpixels/MHBadPixels.h	(revision 4887)
@@ -18,5 +18,4 @@
 private:
     MGeomCam      *fCam;      //!
-    MPedPhotCam   *fPedPhot;  //!
     MPointingPos  *fPointPos; //!
 
@@ -37,7 +36,4 @@
     const TH2D *GetBadN() const { return &fBadN; }
 
-    TH2 *GetBadIdByName(const TString name) { return &fBadId; }
-    TH2 *GetBadNByName(const TString name) { return &fBadN; }
-
     void Draw(Option_t* option = "");
     Bool_t SetupFill(const MParList *plist);
