Index: trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc	(revision 2297)
+++ trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc	(revision 2298)
@@ -78,4 +78,6 @@
 #include "MCerPhotPix.h"
 #include "MCerPhotEvt.h"
+#include "MPedestalPix.h"
+#include "MPedestalCam.h"
 #include "MBlindPixels.h"
 
@@ -122,4 +124,10 @@
         return kFALSE;
     }
+    fPed = (MPedestalCam*)pList->FindObject("MPedestalCam");
+    if (!fEvt)
+    {
+        *fLog << err << dbginf << "MPedestalCam not found... aborting." << endl;
+        return kFALSE;
+    }
 
     fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam");
@@ -165,4 +173,5 @@
     Double_t *nphot = new Double_t[entries];
     Double_t *perr  = new Double_t[entries];
+    Double_t *ped   = new Double_t[entries];
 
     //
@@ -185,8 +194,10 @@
 
         nphot[i] = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetNumPhotons() : 0;
-        perr[i]  = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetErrorPhot()  : 0;
+        perr[i]  = TESTBIT(fFlags, kUseCentralPixel) ? (*fPed)[idx].GetPedestalRms() : 0;
+        ped[i]   = TESTBIT(fFlags, kUseCentralPixel) ? (*fPed)[idx].GetPedestal() : 0;
 
         nphot[i] *= fGeomCam->GetPixRatio(idx);
-        // FIXME: perr[i] ???
+        // FIXME? perr
+        // FIXME? ped
 
         const Int_t n = gpix.GetNumNeighbors();
@@ -199,15 +210,19 @@
 
             const MCerPhotPix *evtpix = fEvt->GetPixById(nidx);
-            if (evtpix)
-            {
-                nphot[i] += evtpix->GetNumPhotons()*fGeomCam->GetPixRatio(nidx);
-                perr[i]  += evtpix->GetErrorPhot();
-                // FIXME: perr[i] ???
-                num++;
-            }
+            if (!evtpix)
+                continue;
+
+            nphot[i] += evtpix->GetNumPhotons()*fGeomCam->GetPixRatio(nidx);
+            perr[i]  += (*fPed)[nidx].GetPedestalRms();
+            ped[i]   += (*fPed)[nidx].GetPedestal();
+            // FIXME? perr
+            // FIXME? ped
+
+            num++;
         }
 
         nphot[i] /= num*fGeomCam->GetPixRatio(idx);
         perr[i]  /= num/*FIXME:???*/;
+        ped[i]   /= num/*FIXME:???*/;
     }
 
@@ -218,9 +233,13 @@
 
             if (fPixels->IsBlind(pix.GetPixId()))
-                pix.Set(nphot[i], perr[i]);
+            {
+                pix.Set(nphot[i], -1);
+                (*fPed)[pix.GetPixId()].Set(ped[i], perr[i]);
+            }
         }
 
     delete nphot;
     delete perr;
+    delete ped;
 }
 
Index: trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h	(revision 2297)
+++ trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h	(revision 2298)
@@ -11,6 +11,8 @@
 
 class MGeomCam;
+class MPedestal;
 class MCerPhotEvt;
 class MBlindPixels;
+class MPedestalCam;
 
 class MBlindPixelCalc : public MTask
@@ -20,4 +22,5 @@
     MBlindPixels *fPixels;  //!
     MGeomCam     *fGeomCam; //!
+    MPedestalCam *fPed;     //!
 
     TArrayS fPixelsIdx;  // Pixel Indices for blind pixels, which are entered by the user.
Index: trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 2297)
+++ trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 2298)
@@ -410,5 +410,5 @@
     Int_t numcnts = 0;
 
-    Bool_t rc = kTRUE;
+    Int_t rc = kTRUE;
     if (maxcnt<0)
         // process first and increment if sucessfull
Index: trunk/MagicSoft/Mars/mfileio/MRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MRead.cc	(revision 2297)
+++ trunk/MagicSoft/Mars/mfileio/MRead.cc	(revision 2298)
@@ -52,4 +52,23 @@
 }
 
+Int_t MRead::AddFiles(MDirIter &files)
+{
+    files.Reset();
+
+    Int_t rc = 0;
+
+    TString str;
+    while (!(str=files.Next()).IsNull())
+    {
+        const Int_t num = AddFile(str);
+        if (num<0)
+            *fLog << warn << "Warning: AddFile(\"" << str << "\") returned " << num << "... skipped." << endl;
+        else
+            rc += num;
+    }
+
+    return rc;
+}
+
 // --------------------------------------------------------------------------
 //
@@ -100,16 +119,2 @@
     return i!=0;
 }
-
-Int_t MRead::AddFiles(MDirIter &next)
-{
-    Int_t rc=0;
-    TString n;
-    while (!(n=next()).IsNull())
-    {
-        const Int_t num = AddFile(n);
-        if (num>0)
-            rc += num;
-    }
-    return rc;
-}
-
Index: trunk/MagicSoft/Mars/mfileio/MRead.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MRead.h	(revision 2297)
+++ trunk/MagicSoft/Mars/mfileio/MRead.h	(revision 2298)
@@ -24,5 +24,5 @@
 
     virtual Int_t AddFile(const char *fname, Int_t entries=-1) { return -1; }
-    Int_t AddFiles(MDirIter &next);
+    Int_t AddFiles(MDirIter &dir);
 
     Bool_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
Index: trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2297)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2298)
@@ -1077,2 +1077,7 @@
     fNotify->ForEach(MCamEvent, DrawPixelContent)(idx);
 }
+
+UInt_t MHCamera::GetNumPixels() const
+{
+    return fGeomCam->GetNumPixels();
+}
Index: trunk/MagicSoft/Mars/mhist/MHCamera.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 2297)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.h	(revision 2298)
@@ -144,6 +144,8 @@
     void  AddNotify(const MCamEvent &event) { fNotify->Add((TObject*)(&event)); }
 
-    Stat_t GetMean(Int_t axis) const;
-    Stat_t GetRMS(Int_t axis) const;
+    Stat_t GetMean(Int_t axis=-1) const;
+    Stat_t GetRMS(Int_t axis=-1) const;
+
+    UInt_t GetNumPixels() const;
 
     //void SetStatusBar(TGStatusBar *bar) { fStatusBar = bar; }
Index: trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc	(revision 2297)
+++ trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc	(revision 2298)
@@ -142,4 +142,25 @@
 }
 
+void MHTriggerLvl0::PrintOutlayers(Float_t s) const
+{
+    const Double_t mean = fSum->GetMean();
+    const Double_t rms  = fSum->GetRMS();
+
+    *fLog << all << underline << GetDescriptor() << ": Mean=" << mean << ", Rms=" << rms << endl;
+
+    for (unsigned int i=0; i<fSum->GetNumPixels(); i++)
+    {
+        if (!fSum->IsUsed(i))
+            continue;
+
+        if ((*fSum)[i+1]>mean+s*rms)
+            *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " > " << s << "*rms" << endl;
+        // if ((*fSum)[i+1]==0)
+        //     *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " == 0" << endl;
+        // if ((*fSum)[i+1]<fSum->GetMean()-s*fSum->GetRMS())
+        //     *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " < " << s << "*rms" << endl;
+    }
+}
+
 TH1 *MHTriggerLvl0::GetHistByName(const TString name)
 {
@@ -152,4 +173,15 @@
     pad->SetBorderMode(0);
 
+    pad->Divide(1,2);
+
+    pad->cd(1);
+    gPad->SetBorderMode(0);
+    gPad->Divide(1,1);
+    gPad->cd(1);
+    gPad->SetBorderMode(0);
     fSum->Draw();
+
+    pad->cd(2);
+    gPad->SetBorderMode(0);
+    fSum->Draw("EPhist");
 }
Index: trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h	(revision 2297)
+++ trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h	(revision 2298)
@@ -36,4 +36,6 @@
     void Draw(Option_t * ="");
 
+    void PrintOutlayers(Float_t s) const;
+
     ClassDef(MHTriggerLvl0, 1) // Histogram to count how often a pixel is above threshold
 };
