Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7823)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7824)
@@ -25,4 +25,10 @@
    * mhist/MHCamera.[h,cc]:
      - replaced SavePrimitive(ofstream&) by SavePrimitive(ostream&)
+     - if necessary let SavePrimitive(ofstream&) call 
+       SavePrimitive(ostream&)
+
+   * mgui/MHexagon.[h,cc]:
+     - special solution for SavePrimitive because it calls a function
+       from the base class which also needs ofstream or ostream
 
 
Index: trunk/MagicSoft/Mars/mgui/MHexagon.cc
===================================================================
--- trunk/MagicSoft/Mars/mgui/MHexagon.cc	(revision 7823)
+++ trunk/MagicSoft/Mars/mgui/MHexagon.cc	(revision 7824)
@@ -334,4 +334,5 @@
 void MHexagon::SavePrimitive(ostream &out, Option_t *)
 {
+#if ROOT_VERSION_CODE >= ROOT_VERSION(5,12,00)
     if (gROOT->ClassSaved(Class()))
        out << "   ";
@@ -345,8 +346,23 @@
 
     out << "   hexagon->Draw();" << endl;
+#endif
 }
 
 void MHexagon::SavePrimitive(ofstream &out, Option_t *)
 {
+#if ROOT_VERSION_CODE < ROOT_VERSION(5,12,00)
+    if (gROOT->ClassSaved(Class()))
+       out << "   ";
+    else
+       out << "   MHexagon *";
+
+    out << "hexagon = new MHexagon(" << fX << "," << fY << "," << fD << ");" << endl;
+
+    SaveFillAttributes(out, "hexagon");
+    SaveLineAttributes(out, "hexagon");
+
+    out << "   hexagon->Draw();" << endl;
+#else
     MHexagon::SavePrimitive(static_cast<ostream&>(out), "");
-}
+#endif
+}
