Index: trunk/MagicSoft/Mars/mhbase/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH.cc	(revision 9186)
+++ trunk/MagicSoft/Mars/mhbase/MH.cc	(revision 9195)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.41 2008-12-02 11:22:15 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.42 2008-12-21 18:09:49 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -1616,5 +1616,14 @@
         CreateGradientColorTable(8, s, r, g, b, ncol);
         found=kTRUE;
-    }
+    }/*
+    if (paletteName.Contains("glows2"))
+    {
+        double s[10] = {0.00, 0.17, 0.35, 0.50, 0.65, 0.73, 0.77, 0.85, 0.92, 1.00};
+        double r[10] = {0.09, 0.18, 0.09, 0.00, 0.00, 0.20, 0.55, 0.85, 1.00, 1.00};
+        double g[10] = {0.81, 0.51, 0.27, 0.00, 0.00, 0.05, 0.10, 0.20, 0.73, 1.00};
+        double b[10] = {0.70, 0.40, 0.02, 0.00, 0.27, 0.40, 0.35, 0.16, 0.03, 1.00};
+        gStyle->CreateGradientColorTable(10, s, r, g, b, ncol);
+        found=kTRUE;
+    }*/
 
     if (paletteName.Contains("redish"))
@@ -1668,2 +1677,136 @@
         gLog << warn << "MH::SetPalette: Palette " << paletteName << " unknown... ignored." << endl;
 }
+
+// --------------------------------------------------------------------------
+//
+// Unfortunately in TH1::GetObjectInfo the buffer is just 64 characters
+// which is sometimes to small. This is just a copy of the code but the
+// buffer has been increased to 128 which should fairly be enough.
+//
+//  Necessary for root <= 5.22/00
+//
+char *MH::GetObjectInfoH(Int_t px, Int_t py, const TH1 &h)
+{
+   const TH1 *fH = &h;
+   const TAxis *fXaxis = h.GetXaxis();
+   const TAxis *fYaxis = h.GetYaxis();
+
+   //   Redefines TObject::GetObjectInfo.
+   //   Displays the histogram info (bin number, contents, integral up to bin
+   //   corresponding to cursor position px,py
+
+   if (!gPad) return (char*)"";
+
+   static char info[128];
+   Double_t x  = gPad->PadtoX(gPad->AbsPixeltoX(px));
+   Double_t y  = gPad->PadtoY(gPad->AbsPixeltoY(py));
+   Double_t x1 = gPad->PadtoX(gPad->AbsPixeltoX(px+1));
+   const char *drawOption = fH->GetDrawOption();
+   Double_t xmin, xmax, uxmin,uxmax;
+   Double_t ymin, ymax, uymin,uymax;
+   if (fH->GetDimension() == 2) {
+      if (gPad->GetView() || strncmp(drawOption,"cont",4) == 0
+                          || strncmp(drawOption,"CONT",4) == 0) {
+         uxmin=gPad->GetUxmin();
+         uxmax=gPad->GetUxmax();
+         xmin = fXaxis->GetBinLowEdge(fXaxis->GetFirst());
+         xmax = fXaxis->GetBinUpEdge(fXaxis->GetLast());
+         x = xmin +(xmax-xmin)*(x-uxmin)/(uxmax-uxmin);
+         uymin=gPad->GetUymin();
+         uymax=gPad->GetUymax();
+         ymin = fYaxis->GetBinLowEdge(fYaxis->GetFirst());
+         ymax = fYaxis->GetBinUpEdge(fYaxis->GetLast());
+         y = ymin +(ymax-ymin)*(y-uymin)/(uymax-uymin);
+      }
+   }
+   Int_t binx,biny,binmin,binx1;
+   if (gPad->IsVertical()) {
+      binx   = fXaxis->FindFixBin(x);
+      binmin = fXaxis->GetFirst();
+      binx1  = fXaxis->FindFixBin(x1);
+      // special case if more than 1 bin in x per pixel
+      if (binx1-binx>1 && fH->GetDimension() == 1) {
+         Double_t binval=fH->GetBinContent(binx);
+         Int_t binnear=binx;
+         for (Int_t ibin=binx+1; ibin<binx1; ibin++) {
+            Double_t binvaltmp = fH->GetBinContent(ibin);
+            if (TMath::Abs(y-binvaltmp) < TMath::Abs(y-binval)) {
+               binval=binvaltmp;
+               binnear=ibin;
+            }
+         }
+         binx = binnear;
+      }
+   } else {
+      x1 = gPad->PadtoY(gPad->AbsPixeltoY(py+1));
+      binx   = fXaxis->FindFixBin(y);
+      binmin = fXaxis->GetFirst();
+      binx1  = fXaxis->FindFixBin(x1);
+      // special case if more than 1 bin in x per pixel
+      if (binx1-binx>1 && fH->GetDimension() == 1) {
+         Double_t binval=fH->GetBinContent(binx);
+         Int_t binnear=binx;
+         for (Int_t ibin=binx+1; ibin<binx1; ibin++) {
+            Double_t binvaltmp = fH->GetBinContent(ibin);
+            if (TMath::Abs(x-binvaltmp) < TMath::Abs(x-binval)) {
+               binval=binvaltmp;
+               binnear=ibin;
+            }
+         }
+         binx = binnear;
+      }
+   }
+   if (fH->GetDimension() == 1) {
+      Double_t integ = 0;
+      for (Int_t bin=binmin;bin<=binx;bin++) {integ += fH->GetBinContent(bin);}
+      sprintf(info,"(x=%g, y=%g, binx=%d, binc=%g, Sum=%g)",x,y,binx,fH->GetBinContent(binx),integ);
+   } else {
+      biny = fYaxis->FindFixBin(y);
+      sprintf(info,"(x=%g, y=%g, binx=%d, biny=%d, binc=%g)",x,y,binx,biny,fH->GetCellContent(binx,biny));
+   }
+   return info;
+}
+
+// --------------------------------------------------------------------------
+//
+// Unfortunately in TProfile::GetObjectInfo the buffer is just 64 characters
+// which is sometimes to small. This is just a copy of the code but the
+// buffer has been increased to 128 which should fairly be enough.
+//
+//  Necessary for root <= 5.22/00
+//
+char *MH::GetObjectInfoP(Int_t px, Int_t py, const TProfile &p)
+{
+    if (!gPad) return (char*)"";
+    static char info[128];
+    Double_t x  = gPad->PadtoX(gPad->AbsPixeltoX(px));
+    Double_t y  = gPad->PadtoY(gPad->AbsPixeltoY(py));
+    Int_t binx   = p.GetXaxis()->FindFixBin(x);
+    sprintf(info,"(x=%g, y=%g, binx=%d, binc=%g, bine=%g, binn=%d)", x, y, binx, p.GetBinContent(binx), p.GetBinError(binx), (Int_t)p.GetBinEntries(binx));
+    return info;
+}
+
+// --------------------------------------------------------------------------
+//
+// Unfortunately TH1::GetObjectInfo and TProfile::GetObjectInfo can
+// result in buffer ovwerflows therefor we have to re-implement these
+// function by our own.
+//
+//  Necessary for root <= 5.22/00
+//
+char *MH::GetObjectInfo(Int_t px, Int_t py, const TObject &o)
+{
+    if (!o.InheritsFrom(TH1::Class()))
+        return o.GetObjectInfo(px, py);
+
+    if (o.InheritsFrom(TProfile::Class()))
+        return GetObjectInfoP(px, py, static_cast<const TProfile&>(o));
+
+    if (o.InheritsFrom("MHCamera"))
+        return o.GetObjectInfo(px, py);
+
+    if (o.InheritsFrom(TH1::Class()))
+        return GetObjectInfoH(px, py, static_cast<const TH1&>(o));
+
+    return "MH::GetObjectInfo: unknown class.";
+}
Index: trunk/MagicSoft/Mars/mhbase/MH3.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 9186)
+++ trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 9195)
@@ -146,5 +146,6 @@
 #include "MH3.h"
 
-#include <ctype.h>   // tolower
+#include <ctype.h>    // tolower
+#include <stdlib.h>   // atoi (Ubuntu 8.10)
 #include <fstream>
 
Index: trunk/MagicSoft/Mars/mhbase/MHn.h
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MHn.h	(revision 9186)
+++ trunk/MagicSoft/Mars/mhbase/MHn.h	(revision 9195)
@@ -21,6 +21,6 @@
     void InitHist();
 
-    Bool_t InitName(Int_t n,  const char *n);
-    Bool_t InitTitle(Int_t n, const char *t);
+    Bool_t InitName(Int_t n,  const char *name);
+    Bool_t InitTitle(Int_t n, const char *title);
     Bool_t SetDrawOption(Int_t n, const char *opt);
 
