Index: /trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 5835)
+++ /trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 5836)
@@ -910,5 +910,9 @@
     fParList->GetNames(list);
 
+#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
+    n += const_cast<MEvtLoop*>(this)->TObject::Write(name, option, bufsize);
+#else
     n += TObject::Write(name, option, bufsize);
+#endif
 
     if (n==0)
Index: /trunk/MagicSoft/Mars/mbase/MMath.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MMath.cc	(revision 5835)
+++ /trunk/MagicSoft/Mars/mbase/MMath.cc	(revision 5836)
@@ -30,6 +30,4 @@
 #include "MMath.h"
 
-using namespace TMath;
-
 // --------------------------------------------------------------------------
 //
@@ -45,5 +43,5 @@
     const Double_t f = s+k*k*b;
 
-    return f==0 ? 0 : (s-b)/Sqrt(f);
+    return f==0 ? 0 : (s-b)/TMath::Sqrt(f);
 }
 
@@ -84,8 +82,8 @@
         return -1;
 
-    const Double_t l = s*Log(s/sum*(alpha+1)/alpha);
-    const Double_t m = b*Log(b/sum*(alpha+1)      );
+    const Double_t l = s*TMath::Log(s/sum*(alpha+1)/alpha);
+    const Double_t m = b*TMath::Log(b/sum*(alpha+1)      );
 
-    return l+m<0 ? -1 : Sqrt((l+m)*2);
+    return l+m<0 ? -1 : TMath::Sqrt((l+m)*2);
 }
 
@@ -102,5 +100,5 @@
         return 0;
 
-    return Sign(sig, s-alpha*b);
+    return TMath::Sign(sig, s-alpha*b);
 }
 
@@ -111,6 +109,6 @@
 Double_t MMath::GaussProb(Double_t x, Double_t sigma, Double_t mean)
 {
-    static const Double_t sqrt2 = Sqrt(2.);
-    return Erf((x-mean)/(sigma*sqrt2));
+    static const Double_t sqrt2 = TMath::Sqrt(2.);
+    return TMath::Erf((x-mean)/(sigma*sqrt2));
 }
 
@@ -124,5 +122,4 @@
 // If the determinant==0 an empty TVector3 is returned.
 //
-#include <iostream>
 TVector3 MMath::GetParab(const TVector3 &x, const TVector3 &y)
 {
