Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2179)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2180)
@@ -71,4 +71,14 @@
    * mraw/Makefile:
      - added -I../mgui - PRELIMINARY
+
+   * mhist/MH.cc:
+     - fixed Draw(TH1&,TH1&) for newer root versions
+
+   * mhist/MHHadronness.cc:
+     - fixed call to fGraph->SetMaximum(1) for newer root versions
+
+   * mmain/MStatusDisplay.cc:
+     - fixed for gcc 3.* and newer root versions
+     
 
 
Index: trunk/MagicSoft/Mars/manalysis/MCurrents.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCurrents.h	(revision 2179)
+++ trunk/MagicSoft/Mars/manalysis/MCurrents.h	(revision 2180)
@@ -10,5 +10,4 @@
 #endif
 
-#include <iostream.h>
 class MCurrents : public MCamEvent
 {
Index: trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc	(revision 2179)
+++ trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc	(revision 2180)
@@ -182,5 +182,5 @@
 }
 
-Bool_t MPedestalCam::GetPixelContent(Float_t &val, Int_t idx, Float_t ratio=1, Int_t type=0) const
+Bool_t MPedestalCam::GetPixelContent(Float_t &val, Int_t idx, Float_t ratio, Int_t type) const
 {
     val = (*this)[idx].GetMean()*ratio;
Index: trunk/MagicSoft/Mars/mbase/MDirIter.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MDirIter.cc	(revision 2179)
+++ trunk/MagicSoft/Mars/mbase/MDirIter.cc	(revision 2180)
@@ -285,5 +285,5 @@
 // matching entries are printed.
 //
-void MDirIter::Print(const Option_t *o)
+void MDirIter::Print(const Option_t *o) const
 {
     TString s(o);
Index: trunk/MagicSoft/Mars/mbase/MDirIter.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MDirIter.h	(revision 2179)
+++ trunk/MagicSoft/Mars/mbase/MDirIter.h	(revision 2180)
@@ -29,5 +29,5 @@
         fList.SetOwner();
     }
-    MDirIter(MDirIter &dir) : fNext(&fList), fDirPtr(NULL)
+    MDirIter(const MDirIter &dir) : fNext(&fList), fDirPtr(NULL)
     {
         fList.SetOwner();
@@ -60,5 +60,5 @@
     void SetFilter(const char *f="") { fFilter = f; }
 
-    void Print(const Option_t *o="");
+    void Print(const Option_t *o="") const;
 
     ClassDef(MDirIter, 1) // Iterator for files in several directories (with filters)
Index: trunk/MagicSoft/Mars/mhist/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2179)
+++ trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2180)
@@ -733,9 +733,17 @@
     // Rename first statistics box
     //
-    TPaveStats &s1 = *(TPaveStats*)gPad->FindObject("stats");
-    const Double_t x1 = s1.GetX1NDC()-0.01;
-    s1.SetName((TString)"Stat"+hist1.GetTitle());
-    s1.SetX1NDC(x1-(s1.GetX2NDC()-s1.GetX1NDC()));
-    s1.SetX2NDC(x1);
+    // Where to get the TPaveStats depends on the root version
+    TPaveStats *s1 = (TPaveStats*)gPad->FindObject("stats");
+    if (!s1)
+        s1 = (TPaveStats*)hist1.GetListOfFunctions()->FindObject("stats");
+    else
+        s1->SetName((TString)"Stat"+hist1.GetTitle());
+
+    if (s1)
+    {
+        const Double_t x1 = s1->GetX1NDC()-0.01;
+        s1->SetX1NDC(x1-(s1->GetX2NDC()-s1->GetX1NDC()));
+        s1->SetX2NDC(x1);
+    }
 
     //
@@ -748,17 +756,24 @@
     // Draw Legend
     //
-    TPaveStats &s2 = *(TPaveStats*)gPad->FindObject("stats");
-    TLegend &l = *new TLegend(s2.GetX1NDC(),
-                              s2.GetY1NDC()-0.015-(s2.GetY2NDC()-s2.GetY1NDC())/2,
-                              s2.GetX2NDC(),
-                              s2.GetY1NDC()-0.01
-                             );
-    l.AddEntry(&hist1, hist1.GetTitle());
-    l.AddEntry(&hist2, hist2.GetTitle());
-    l.SetTextSize(s2.GetTextSize());
-    l.SetTextFont(s2.GetTextFont());
-    l.SetBorderSize(s2.GetBorderSize());
-    l.SetBit(kCanDelete);
-    l.Draw();
+    // Where to get the TPaveStats depends on the root version
+    TPaveStats *s2 = (TPaveStats*)gPad->FindObject("stats");
+    if (!s2)
+        s2 = (TPaveStats*)hist2.GetListOfFunctions()->FindObject("stats");
+
+    if (s2)
+    {
+        TLegend &l = *new TLegend(s2->GetX1NDC(),
+                                  s2->GetY1NDC()-0.015-(s2->GetY2NDC()-s2->GetY1NDC())/2,
+                                  s2->GetX2NDC(),
+                                  s2->GetY1NDC()-0.01
+                                 );
+        l.AddEntry(&hist1, hist1.GetTitle());
+        l.AddEntry(&hist2, hist2.GetTitle());
+        l.SetTextSize(s2->GetTextSize());
+        l.SetTextFont(s2->GetTextFont());
+        l.SetBorderSize(s2->GetBorderSize());
+        l.SetBit(kCanDelete);
+        l.Draw();
+    }
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHHadronness.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 2179)
+++ trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 2180)
@@ -93,5 +93,4 @@
     fGraph = new TGraph;
     fGraph->SetTitle("Acceptance Gammas vs. Hadrons");
-    fGraph->SetMaximum(1);
     fGraph->SetMarkerStyle(kFullDotSmall);
 
@@ -474,4 +473,5 @@
         h->SetXTitle("Acceptance Hadrons");
         h->SetYTitle("Acceptance Gammas");
+        fGraph->SetMaximum(1);
         fGraph->Draw("P");
         gPad->Modified();
Index: trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc	(revision 2179)
+++ trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc	(revision 2180)
@@ -675,11 +675,11 @@
 
     // layout and map new tab
-#if ROOT_VERSION_CODE < ROOT_VERSION(3,03,00)
+//#if ROOT_VERSION_CODE < ROOT_VERSION(3,03,00)
     MapSubwindows();
     Layout();
-#else
-    Layout();
-    MapSubwindows();
-#endif
+//#else
+//    Layout();
+//    MapSubwindows();
+//#endif
 
     // display new tab in the main frame
@@ -1435,12 +1435,11 @@
     const TString newstr("%%DocumentPaperSizes: a4\n%%Orientation: Landscape");
 
-    // gcc 3.2:
-    /*
-    fstream f(name, ios::in|ios::out|ios::nocreate);
+    /* FIXME: Does gcc 2.95 need this flag, too? |ios::nocreate */
+    fstream f(name, ios::in|ios::out);
 
     TString str;
     f >> str;
 
-    streampos p = f.tellg()+1;
+    const streampos p = f.tellg();
 
     char *c1 = new char[newstr.Length()];
@@ -1450,4 +1449,5 @@
 
     f.seekp(p);
+    f.seekp(1, ios::cur);
 
     f << newstr;
@@ -1455,7 +1455,7 @@
     while (1)
     {
-        streampos p1 = f.tellg();
+        const streampos p1 = f.tellg();
         f.read(c2, newstr.Length());
-        streampos p2 = f.tellg();
+        const streampos p2 = f.tellg();
         f.seekp(p1);
         if (f)
@@ -1474,5 +1474,4 @@
     delete c2;
     delete c1;
-    */
 }
 
Index: trunk/MagicSoft/Mars/mraw/MRawEvtData.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtData.h	(revision 2179)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtData.h	(revision 2180)
@@ -15,6 +15,4 @@
 class MArrayS;
 class MArrayB;
-
-#include <iostream.h>
 
 class MRawEvtData : public MCamEvent
