Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc	(revision 4579)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.cc	(revision 4586)
@@ -85,5 +85,5 @@
 //
 MBadPixelsCalc::MBadPixelsCalc(const char *name, const char *title)
-    : fPedestalLevel(3)
+    : fPedestalLevel(3), fNamePedPhotContainer("MPedPhotCam")
 {
     fName  = name  ? name  : gsDefName.Data();
@@ -102,5 +102,5 @@
     if (fPedestalLevel>0)
     {
-        fPedPhotCam = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam"));
+      fPedPhotCam = (MPedPhotCam*)pList->FindObject(fNamePedPhotContainer,  AddSerialNumber("MPedPhotCam"));
         if (!fPedPhotCam)
         {
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.h	(revision 4579)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCalc.h	(revision 4586)
@@ -21,5 +21,6 @@
 
     Float_t fPedestalLevel;
-
+    TString fNamePedPhotContainer; // name of the 'MPedPhotCam' container
+   
     //    void CheckPedestalRMS() const;
     Bool_t CheckPedestalRms() const;
@@ -32,4 +33,5 @@
 
     void SetPedestalLevel(Float_t f) { fPedestalLevel=f; }
+    void SetNamePedPhotContainer(const char *name)    { fNamePedPhotContainer = name; }
 
     ClassDef(MBadPixelsCalc, 1) // Task to find bad pixels (star, broken pixels, etc)
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc	(revision 4579)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc	(revision 4586)
@@ -87,5 +87,5 @@
 //
 MBadPixelsTreat::MBadPixelsTreat(const char *name, const char *title)
-    : fFlags(0), fNumMinNeighbors(3)
+  : fFlags(0), fNumMinNeighbors(3), fNamePedPhotContainer("MPedPhotCam")
 {
     fName  = name  ? name  : gsDefName.Data();
@@ -121,5 +121,5 @@
     }
 
-    fPedPhot = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam"));
+    fPedPhot = (MPedPhotCam*)pList->FindObject(fNamePedPhotContainer, AddSerialNumber("MPedPhotCam"));
     if (!fPedPhot)
     {
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h	(revision 4579)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h	(revision 4586)
@@ -21,4 +21,5 @@
     Byte_t fFlags;       // flag for the method which is used
     Byte_t fNumMinNeighbors;
+    TString fNamePedPhotContainer; // name of the 'MPedPhotCam' container
 
     enum
@@ -64,4 +65,5 @@
     }
     void SetNumMinNeighbors(Byte_t num) { fNumMinNeighbors=num; }
+    void SetNamePedPhotContainer(const char *name)    { fNamePedPhotContainer = name; }
 
 
