Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 6279)
+++ trunk/MagicSoft/Mars/Changelog	(revision 6280)
@@ -42,4 +42,9 @@
      - fixed a bug which caused the resource task to be ignored
        if the default task was '<dummy>'
+
+   * mhbase/MH3.cc:
+     - fixed a bug in Paint (use GetListOfPrimitives->FindObject
+       instead of FindObject) which caused the histogram to
+       be put a lot of times into the pad.
 
 
Index: trunk/MagicSoft/Mars/mhbase/MH3.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 6279)
+++ trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 6280)
@@ -505,33 +505,4 @@
 void MH3::Paint(Option_t *o)
 {
-    /*
-     *fLog << all << fHist << " " << gPad->GetName() << " ----> Paint " << o << endl;
-     TListIter Next(gPad->GetListOfPrimitives()); TObject *obj;
-     while ((obj=Next())) *fLog << obj << " " << obj->GetName() << " " << obj->ClassName() << " " << Next.GetOption() << " " << (int)obj->TestBit(kCanDelete) << endl;
-     */
-    /*
-    TString str(o);
-
-    if (str.Contains("log", TString::kIgnoreCase))
-    {
-        if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx();
-        if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy();
-        if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz();
-    }
-
-    if (str.Contains("upd", TString::kIgnoreCase))
-    {
-
-        // Set pretty color palette
-        // gStyle->SetPalette(1, 0);
-
-        TProfile* h0;
-        if ((h0 = (TProfile*)gPad->FindObject(fNameProfX)))
-            ((TH2*)fHist)->ProfileX(fNameProfX, -1, 9999, "s");
-        if ((h0 = (TProfile*)gPad->FindObject(fNameProfY)))
-            ((TH2*)fHist)->ProfileY(fNameProfY, -1, 9999, "s");
-            }
-            */
-
     fHist->SetFillStyle(4000);
 
@@ -550,6 +521,8 @@
     str.ReplaceAll("profy", "");
 
+    // WARNING: Don't use FindObject directly always use GetListOfPrimitives!!
+
     // FIXME: We may have to remove all our own options from str!
-    if (!only && !gPad->FindObject(fHist))
+    if (!only && !gPad->GetListOfPrimitives()->FindObject(fHist))
         fHist->Draw(str);
 
@@ -557,5 +530,5 @@
     {
         TProfile *p = ((TH2*)fHist)->ProfileX("ProfX", -1, 9999, "s");
-        if (!gPad->FindObject(p))
+        if (!gPad->GetListOfPrimitives()->FindObject(p))
         {
             p->UseCurrentStyle();
@@ -571,5 +544,5 @@
     {
         TProfile *p = ((TH2*)fHist)->ProfileY("ProfY", -1, 9999, "s");
-        if (!gPad->FindObject(p))
+        if (!gPad->GetListOfPrimitives()->FindObject(p))
         {
             p->UseCurrentStyle();
Index: trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc	(revision 6279)
+++ trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc	(revision 6280)
@@ -220,6 +220,5 @@
   fTrigPattern = (MTriggerPattern*)pList->FindObject("MTriggerPattern");
   if (!fTrigPattern)
-    *fLog << warn << GetDescriptor() 
-          << ": MTriggerPattern not found... Cannot use interlaced pedestal events." << endl;
+    *fLog << warn << "MTriggerPattern not found... Cannot use interlaced pedestal events." << endl;
 
   return MExtractPedestal::PreProcess(pList);
