Index: trunk/MagicSoft/Mars/mranforest/MRFEnergyEst.cc
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MRFEnergyEst.cc	(revision 6540)
+++ trunk/MagicSoft/Mars/mranforest/MRFEnergyEst.cc	(revision 6797)
@@ -61,4 +61,5 @@
 #include "TStyle.h"
 #include "TCanvas.h"
+#include "TMath.h"
 #include "TVector.h"
 
@@ -134,5 +135,5 @@
     }
 
-    if(energy_rule.CompareTo("MMcEvt.fEnergy"))
+    if(!energy_rule.Contains("fEnergy"))
     {
         *fLog << err << dbginf << "Can not accept "<<energy_rule<<" as true energy ... aborting." << endl;
@@ -275,6 +276,6 @@
     for(Int_t j=0;j<nbins;j++)
     {
-        e_low = min(atof((fEForests[j])->GetTitle()),e_low);
-        e_up  = max(atof((fEForests[j])->GetTitle()),e_up);
+        e_low = TMath::Min(atof((fEForests[j])->GetTitle()),e_low);
+        e_up  = TMath::Max(atof((fEForests[j])->GetTitle()),e_up);
     }
 
