Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 9252)
+++ trunk/MagicSoft/Mars/Changelog	(revision 9253)
@@ -18,4 +18,13 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2009/01/24 Thomas Bretz
+
+   * mbase/MMath.cc:
+     - added two explicit conversion to make it compile on my Ubuntu
+     - Replaced some Form by MString::Format
+     - included MString
+
+
 
  2009/01/23 Daniela Dorner
Index: trunk/MagicSoft/Mars/mbase/MMath.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MMath.cc	(revision 9252)
+++ trunk/MagicSoft/Mars/mbase/MMath.cc	(revision 9253)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.45 2009-01-21 14:22:39 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.46 2009-01-24 10:57:46 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -56,4 +56,6 @@
 #endif
 
+#include "MString.h"
+
 //NamespaceImp(MMath);
 
@@ -243,10 +245,10 @@
     Double_t arr[n];
     for (int i=0; i<n; i++)
-        arr[i] = TMath::Abs(a[i]-med);
+        arr[i] = (Double_t)TMath::Abs(Double_t(a[i])-med);
 
     //return TMath::Median(n, arr)/0.67449896936; //MMath::GaussProb(x)=0.5
 
     // Define where to divide (floor because the highest possible is n-1)
-    const Size div = TMath::FloorNint(n*prob);
+    const Size div = TMath::FloorNint(Double_t(n)*prob);
 
     // Calculate result
@@ -336,5 +338,5 @@
 {
     Element *cpy = new Element[n];
-    Int_t   *pos = new Int_t[n];
+    Size    *pos = new Size[n];
 
     memcpy(cpy, a, n*sizeof(Element));
@@ -342,5 +344,5 @@
     TMath::Sort(n, a, pos, down);
 
-    Int_t *idx = pos;
+    Size *idx = pos;
 
     for (Element *ptr=a; ptr<a+n; ptr++)
@@ -867,14 +869,14 @@
     // Check if error starts with 1 or 2. In this case use one
     // more valid digit
-    TString error = Form("%.0e", e);
+    TString error = MString::Format("%.0e", e);
     if (error[0]=='1' || error[0]=='2')
     {
         i++;
-        error = Form("%.1e", e);
-    }
-
-    const char *fmt = Form("%%.%de", i);
-
-    v = atof(Form(fmt, v));
+        error = MString::Format("%.1e", e);
+    }
+
+    const char *fmt = MString::Format("%%.%de", i);
+
+    v = MString::Format(fmt, v).Atof();
     e = error.Atof();
 }
