Index: trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc	(revision 2119)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc	(revision 2173)
@@ -49,4 +49,6 @@
 
 ClassImp(MMcCollectionAreaCalc);
+
+using namespace std;
 
 MMcCollectionAreaCalc::MMcCollectionAreaCalc(const char *input,
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.cc	(revision 2119)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.cc	(revision 2173)
@@ -62,4 +62,7 @@
 #include "MLogManip.h"
 
+ClassImp(MMcEnergyEst);
+
+using namespace std;
 
 //------------------------------------------------------------------------
@@ -67,5 +70,5 @@
 // fcn calculates the function to be minimized (using TMinuit::Migrad)
 //
-void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
+static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
 {
   MEvtLoop *evtloop = (MEvtLoop*)gMinuit->GetObjectFit();
@@ -82,6 +85,4 @@
   f = eval->GetChisq();
 }
-
-ClassImp(MMcEnergyEst);
 
 // --------------------------------------------------------------------------
@@ -323,5 +324,5 @@
 // Print current values of parameters
 //
-void MMcEnergyEst::Print(Option_t *o)
+void MMcEnergyEst::Print(Option_t *o) const
 {
   for (Int_t i = 0; i < fA.GetSize(); i++)
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.h
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.h	(revision 2119)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.h	(revision 2173)
@@ -47,5 +47,5 @@
 
   void FindParams();
-  void Print(Option_t *o="");
+  void Print(Option_t *o="") const;
 
   ClassDef(MMcEnergyEst, 1) // Class for optimization of Energy estimator
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc	(revision 2119)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc	(revision 2173)
@@ -52,5 +52,7 @@
 ClassImp(MMcThresholdCalc);
 
-const Float_t MMcThresholdCalc::fSqrt2 = sqrt(2);
+using namespace std;
+
+const Float_t MMcThresholdCalc::fSqrt2 = sqrt(2.);
 
 // --------------------------------------------------------------------------
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcTimeGenerate.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcTimeGenerate.cc	(revision 2119)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcTimeGenerate.cc	(revision 2173)
@@ -86,5 +86,5 @@
     const UInt_t t = fTime->GetTimeLo();
 
-    fTime->SetTime(t+dt*10000, 0); // [0.1ms]
+    fTime->SetTime((int)(t+dt*10000), 0); // [0.1ms]
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc	(revision 2119)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc	(revision 2173)
@@ -29,9 +29,12 @@
 #include "MMcTriggerRateCalc.h"
 
+#include <math.h>
+
+#include <TCanvas.h>
+
 #include "MLog.h"
 #include "MLogManip.h"
 
 #include "MParList.h"
-#include "MHMcRate.h"
 
 #include "MMcEvt.hxx"
@@ -42,9 +45,9 @@
 
 #include "MH.h"
-#include <TCanvas.h>
-#include <math.h>
-
+#include "MHMcRate.h"
 
 ClassImp(MMcTriggerRateCalc);
+
+using namespace std;
 
 void MMcTriggerRateCalc::Init(int dim, float *trigbg, float simbg,
@@ -364,5 +367,5 @@
 // Draw rate as a funtion of discriminator threshold.
 //
-void MMcTriggerRateCalc::Draw()
+void MMcTriggerRateCalc::Draw(Option_t *)
 {
     /*
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h	(revision 2119)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h	(revision 2173)
@@ -67,5 +67,5 @@
     TH1F* GetHist(Int_t i) {return fHist[i];}
 
-    void Draw();
+    void Draw(const Option_t *o="");
 
     ClassDef(MMcTriggerRateCalc, 0)	// Task to compute the trigger rate
