Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 9551)
+++ trunk/MagicSoft/Mars/Changelog	(revision 9552)
@@ -18,4 +18,27 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2010/02/23 Thomas Bretz
+
+   * mbase/MAGIC.cc:
+     - projections are supposed to work again in root 5.26 
+       (not tested yet)
+
+   * mbase/MGMap.cc, mbase/MObjLookup.cc:
+     - key and val are Long64 in newer root versions
+
+   * mdata/MDataPhrase.cc:
+     - need inclusion of TFormulaPrimitive in root 5.26
+
+   * mhflux/MMcSpectrumWeight.cc:
+     - root 5.26 has a different calling convention for TH1::Intgeral
+
+   * mjobs/MJob.cc:
+     - added a suggested parenthesis
+
+   * mjtrain/MJTrainDisp.cc:
+     - cast the MH3 histogram correctly to a TH2
+
+
 
  2010/02/22 Daniela Dorner
Index: trunk/MagicSoft/Mars/mbase/MAGIC.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MAGIC.cc	(revision 9551)
+++ trunk/MagicSoft/Mars/mbase/MAGIC.cc	(revision 9552)
@@ -40,5 +40,5 @@
 bool MARS::CheckRootVer()
 {
-    if (strcmp(gROOT->GetVersion(), "5.22/00")>0)
+    if (strcmp(gROOT->GetVersion(), "5.22/00")>0 && strcmp(gROOT->GetVersion(), "5.26/00")<0)
     {
         cout << "WARNING - Especially root 5.24/00 has a severe bug in projection 2D histograms" << endl;
Index: trunk/MagicSoft/Mars/mbase/MGMap.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGMap.cc	(revision 9551)
+++ trunk/MagicSoft/Mars/mbase/MGMap.cc	(revision 9552)
@@ -158,5 +158,10 @@
 void MGMap::Delete(Option_t *)
 {
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,26,00)
     Long_t key, val;
+#else
+    Long64_t key, val;
+#endif
+
     TExMapIter map(this);
     while (map.Next(key, val))
@@ -424,5 +429,10 @@
 void MGMap::Paint(Option_t *)
 {
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,26,00)
     Long_t key, val;
+#else
+    Long64_t key, val;
+#endif
+
     TExMapIter map(this);
     while (map.Next(key, val))
@@ -441,5 +451,10 @@
     scale /= TMath::Hypot((float)w, (float)h)/2;
 
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,26,00)
     Long_t key, val;
+#else
+    Long64_t key, val;
+#endif
+
     TExMapIter map(this);
     while (map.Next(key, val))
@@ -458,5 +473,10 @@
 TObject *MGMap::PickObject(Int_t px, Int_t py, TString &str) const
 {
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,26,00)
     Long_t key, val;
+#else
+    Long64_t key, val;
+#endif
+
     TExMapIter map(this);
     while (map.Next(key, val))
@@ -500,5 +520,10 @@
     Int_t min = INT_MAX;
 
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,26,00)
     Long_t key, val;
+#else
+    Long64_t key, val;
+#endif
+
     TExMapIter map(this);
     while (map.Next(key, val))
Index: trunk/MagicSoft/Mars/mbase/MObjLookup.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MObjLookup.cc	(revision 9551)
+++ trunk/MagicSoft/Mars/mbase/MObjLookup.cc	(revision 9552)
@@ -44,6 +44,9 @@
     TExMapIter iter(&fMap);
 
-    Long_t key;
-    Long_t value;
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,26,00)
+    Long_t key, value;
+#else
+    Long64_t key, value;
+#endif
 
     while (iter.Next(key, value))
Index: trunk/MagicSoft/Mars/mdata/MDataPhrase.cc
===================================================================
--- trunk/MagicSoft/Mars/mdata/MDataPhrase.cc	(revision 9551)
+++ trunk/MagicSoft/Mars/mdata/MDataPhrase.cc	(revision 9552)
@@ -115,4 +115,7 @@
 #include <TPRegexp.h>
 #include <TFormula.h>
+#if ROOT_VERSION_CODE >= ROOT_VERSION(5,26,00)
+#include <TFormulaPrimitive.h>
+#endif
 
 #include "MLog.h"
Index: trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc	(revision 9551)
+++ trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc	(revision 9552)
@@ -489,5 +489,9 @@
         // Ratio between the number of events in the zenith angle
         // bin corresponding to x and the new spectrum.
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,26,00)
         const Double_t f = h.Integral(x, x, -1, 9999)/norm;
+#else
+        const Double_t f = h.Integral(x, x)/norm;
+#endif
 
         // Fill histogram with the "new spectrum" between
Index: trunk/MagicSoft/Mars/mjobs/MJob.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJob.cc	(revision 9551)
+++ trunk/MagicSoft/Mars/mjobs/MJob.cc	(revision 9552)
@@ -414,5 +414,5 @@
         }
 
-        if (flags&2==0)
+        if ((flags&2)==0)
         {
             *fLog << err << "ERROR - " << dirname << " is not a directory." << endl;
Index: trunk/MagicSoft/Mars/mjtrain/MJTrainDisp.cc
===================================================================
--- trunk/MagicSoft/Mars/mjtrain/MJTrainDisp.cc	(revision 9551)
+++ trunk/MagicSoft/Mars/mjtrain/MJTrainDisp.cc	(revision 9552)
@@ -60,4 +60,5 @@
 #include "MJTrainDisp.h"
 
+#include <TH2.h>
 #include <TLine.h>
 #include <TCanvas.h>
@@ -113,5 +114,5 @@
     MH::SetPalette("pretty");
 
-    TH1 &hist = *(TH1*)mh3.GetHist().Clone();
+    TH2 &hist = *static_cast<TH2*>(mh3.GetHist().Clone());
     hist.SetBit(TH1::kNoStats);
     hist.SetDirectory(0);
