diff --git a/asimage/inc/TASImage.h b/asimage/inc/TASImage.h
index 3f36237cdb23502721e26dc5f77d6bea29c1fa7f..29137b19e3918cd67a3407405c63e5b065d708b7 100644
--- a/asimage/inc/TASImage.h
+++ b/asimage/inc/TASImage.h
@@ -1,4 +1,4 @@
-// @(#)root/asimage:$Name:  $:$Id: TASImage.h,v 1.19 2006/01/09 09:03:35 rdm Exp $
+// @(#)root/asimage:$Name:  $:$Id: TASImage.h,v 1.20 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers, Reiner Rohlfs 28/11/2001
 
 /*************************************************************************
@@ -209,7 +209,7 @@ public:
    Bool_t     SetImageBuffer(char **buffer, EImageFileTypes type = TImage::kPng);
    void       PaintImage(Drawable_t wid, Int_t x, Int_t y);
    void       SetPaletteEnabled(Bool_t on = kTRUE);  // *TOGGLE*
-   void       SavePrimitive(ofstream &out, Option_t *option);
+   void       SavePrimitive(ostream &out, Option_t *option = "");
 
    static const ASVisual *GetVisual();
    static UInt_t AlphaBlend(UInt_t bot, UInt_t top);
diff --git a/asimage/src/TASImage.cxx b/asimage/src/TASImage.cxx
index b21f17dc25cd4065d3c61c6baf70b8b812c6ae29..3c7115ea4dea00947a7b67b84dee328b338c0a02 100644
--- a/asimage/src/TASImage.cxx
+++ b/asimage/src/TASImage.cxx
@@ -5751,7 +5751,7 @@ void TASImage::SetPaletteEnabled(Bool_t on)
 }
 
 //_______________________________________________________________________
-void TASImage::SavePrimitive(ofstream &out, Option_t *)
+void TASImage::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
     // Save a primitive as a C++ statement(s) on output stream "out"
 
diff --git a/base/inc/TAttAxis.h b/base/inc/TAttAxis.h
index 0bd91411ee6d01904cd0a3dd34e123ae1691d59b..9b8ac320251e9f78c6b75ead40e88def41413eea 100644
--- a/base/inc/TAttAxis.h
+++ b/base/inc/TAttAxis.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttAxis.h,v 1.8 2004/04/22 16:28:28 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TAttAxis.h,v 1.9 2005/11/16 20:02:34 pcanal Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -59,7 +59,7 @@ public:
    virtual Color_t  GetTitleColor()  const {return fTitleColor;}
    virtual Style_t  GetTitleFont()   const {return fTitleFont;}
    virtual void     ResetAttAxis(Option_t *option="");
-   virtual void     SaveAttributes(ofstream &out, const char *name, const char *subname);
+   virtual void     SaveAttributes(ostream &out, const char *name, const char *subname);
    virtual void     SetNdivisions(Int_t n=510, Bool_t optim=kTRUE);  // *MENU*
    virtual void     SetAxisColor(Color_t color=1);        // *MENU*
    virtual void     SetLabelColor(Color_t color=1);       // *MENU*
diff --git a/base/inc/TAttFill.h b/base/inc/TAttFill.h
index 484915b49eb589736f97ef6856633a08e3ab6551..e4b98c9bb149da094dfea50ed80cf6b3063771c0 100644
--- a/base/inc/TAttFill.h
+++ b/base/inc/TAttFill.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttFill.h,v 1.3 2002/05/03 10:48:53 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TAttFill.h,v 1.4 2003/08/06 20:25:04 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -42,7 +42,7 @@ public:
    virtual Bool_t   IsTransparent() const;
    virtual void     Modify();
    virtual void     ResetAttFill(Option_t *option="");
-   virtual void     SaveFillAttributes(ofstream &out, const char *name, Int_t coldef=1, Int_t stydef=1001);
+   virtual void     SaveFillAttributes(ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001);
    virtual void     SetFillAttributes(); // *MENU*
    virtual void     SetFillColor(Color_t fcolor) { fFillColor = fcolor; }
    virtual void     SetFillStyle(Style_t fstyle) { fFillStyle = fstyle; }
diff --git a/base/inc/TAttLine.h b/base/inc/TAttLine.h
index e2bdafb815955ef8fa048fdeeec8d5d69b26a39f..cb3ee9619164cc001338aa3cfcbf1e4b10b89eb1 100644
--- a/base/inc/TAttLine.h
+++ b/base/inc/TAttLine.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttLine.h,v 1.5 2003/08/06 20:25:04 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TAttLine.h,v 1.6 2005/11/16 20:02:34 pcanal Exp $
 // Author: Rene Brun   28/11/94
 
 /*************************************************************************
@@ -45,7 +45,7 @@ public:
    virtual Width_t  GetLineWidth() const {return fLineWidth;}
    virtual void     Modify();
    virtual void     ResetAttLine(Option_t *option="");
-   virtual void     SaveLineAttributes(ofstream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1);
+   virtual void     SaveLineAttributes(ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1);
    virtual void     SetLineAttributes(); // *MENU*
    virtual void     SetLineColor(Color_t lcolor) { fLineColor = lcolor;}
    virtual void     SetLineStyle(Style_t lstyle) { fLineStyle = lstyle;}
diff --git a/base/inc/TAttMarker.h b/base/inc/TAttMarker.h
index af6d388bca461d736cc2a9d350a7d9d583b4747b..18c861adb272204ba2b05e9849de467795fdde38 100644
--- a/base/inc/TAttMarker.h
+++ b/base/inc/TAttMarker.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttMarker.h,v 1.3 2002/05/03 10:48:53 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TAttMarker.h,v 1.4 2005/11/16 20:02:34 pcanal Exp $
 // Author: Rene Brun   12/05/95
 
 /*************************************************************************
@@ -46,7 +46,7 @@ public:
    virtual Size_t   GetMarkerSize()  const {return fMarkerSize;}
    virtual void     Modify();
    virtual void     ResetAttMarker(Option_t *toption="");
-   virtual void     SaveMarkerAttributes(ofstream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1);
+   virtual void     SaveMarkerAttributes(ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1);
    virtual void     SetMarkerAttributes();  // *MENU*
    virtual void     SetMarkerColor(Color_t tcolor=1) { fMarkerColor = tcolor;}
    virtual void     SetMarkerStyle(Style_t mstyle=1) { fMarkerStyle = mstyle;}
diff --git a/base/inc/TAttText.h b/base/inc/TAttText.h
index 64bef81bd803f83b99e2fde0ee48c4a9045419ec..0e7eaf4a429e9758cc21754035e59274ae29b887 100644
--- a/base/inc/TAttText.h
+++ b/base/inc/TAttText.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttText.h,v 1.4 2002/05/03 10:48:53 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TAttText.h,v 1.5 2003/08/06 20:25:04 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -50,7 +50,7 @@ public:
    virtual Float_t  GetTextSize()  const {return fTextSize;}
    virtual void     Modify();
    virtual void     ResetAttText(Option_t *toption="");
-   virtual void     SaveTextAttributes(ofstream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1);
+   virtual void     SaveTextAttributes(ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1);
    virtual void     SetTextAttributes();  // *MENU*
    virtual void     SetTextAlign(Short_t align=11) { fTextAlign = align;}
    virtual void     SetTextAngle(Float_t tangle=0) { fTextAngle = tangle;}  // *MENU*
diff --git a/base/inc/TColor.h b/base/inc/TColor.h
index fd2d01768fedd5f3e55c048e597446b0e7feaade..6682b919ecea54945a48b5797dc46a6d36b9e573 100644
--- a/base/inc/TColor.h
+++ b/base/inc/TColor.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TColor.h,v 1.11 2004/12/10 15:54:15 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TColor.h,v 1.12 2006/03/28 16:43:04 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -100,7 +100,7 @@ public:
    static void    Pixel2RGB(ULong_t pixel, Int_t &r, Int_t &g, Int_t &b);
    static void    Pixel2RGB(ULong_t pixel, Float_t &r, Float_t &g, Float_t &b);
    static const char *PixelAsHexString(ULong_t pixel);
-   static void    SaveColor(ofstream &out, Int_t ci);
+   static void    SaveColor(ostream &out, Int_t ci);
    static Bool_t  IsGrayscale();
    static void    SetGrayscale(Bool_t set = kTRUE);
 
diff --git a/base/inc/TExec.h b/base/inc/TExec.h
index d78717799ce51ac46b6669f1bc56c1adb6bfccd7..3a1864216143b432c877fc1096de444a6051459e 100644
--- a/base/inc/TExec.h
+++ b/base/inc/TExec.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TExec.h,v 1.2 2001/11/23 18:01:18 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TExec.h,v 1.3 2005/11/16 20:02:34 pcanal Exp $
 // Author: Rene Brun   29/12/99
 
 /*************************************************************************
@@ -37,7 +37,7 @@ public:
    virtual ~TExec();
    virtual void     Exec(const char *command="");
    virtual void     Paint(Option_t *option="");
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetAction(const char *action) {SetTitle(action);}
    
    ClassDef(TExec,1);  //To execute a CINT command
diff --git a/base/inc/TMacro.h b/base/inc/TMacro.h
index 4f7aeb55bda8cd2698f4dd5d19e1bd7b34d41a42..c5a44d01c55faf2c1c5d780754da24a597dc1210 100644
--- a/base/inc/TMacro.h
+++ b/base/inc/TMacro.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TMacro.h,v 1.4 2006/06/09 11:58:22 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TMacro.h,v 1.5 2006/06/26 09:29:12 brun Exp $
 // Author: Rene Brun   16/08/2005
 
 /*************************************************************************
@@ -56,7 +56,7 @@ public:
    virtual void         Print(Option_t *option="") const;  //*MENU*
    virtual Int_t        ReadFile(const char *filename);
    virtual void         SaveSource(const char *filename);  //*MENU*
-   virtual void         SavePrimitive(ofstream &out, Option_t *option);
+   virtual void         SavePrimitive(ostream &out, Option_t *option = "");
    virtual void         SetParams(const char *params=0); //*MENU*
 
    ClassDef(TMacro,1)  // Class supporting a collection of lines with C++ code.
diff --git a/base/inc/TObject.h b/base/inc/TObject.h
index 6ea6acce195e42778b259a0bcadf04be4fd67716..d6c3844c24fdb0e79ac8dfbd2dffc377d68cb47b 100644
--- a/base/inc/TObject.h
+++ b/base/inc/TObject.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TObject.h,v 1.26 2004/07/30 01:12:27 rdm Exp $
+// @(#)root/base:$Name:  $:$Id: TObject.h,v 1.27 2005/05/13 15:55:56 rdm Exp $
 // Author: Rene Brun   26/12/94
 
 /*************************************************************************
@@ -143,7 +143,7 @@ public:
    virtual void        Print(Option_t *option="") const;
    virtual Int_t       Read(const char *name);
    virtual void        RecursiveRemove(TObject *obj);
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
    virtual void        SetDrawOption(Option_t *option="");  // *MENU*
    virtual void        SetUniqueID(UInt_t uid);
    virtual void        UseCurrentStyle();
diff --git a/base/inc/TStyle.h b/base/inc/TStyle.h
index 876878ffe28c2135167388686c88fde59291c46b..adf23b73bbdbdfbef8af849d71e2bee65cf36a46 100644
--- a/base/inc/TStyle.h
+++ b/base/inc/TStyle.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TStyle.h,v 1.30 2005/11/16 20:02:34 pcanal Exp $
+// @(#)root/base:$Name:  $:$Id: TStyle.h,v 1.31 2006/01/31 10:22:26 couet Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -399,7 +399,7 @@ public:
    void             ToggleToolBar() { fShowToolBar = fShowToolBar ? 0 : 1; }
    void             SetIsReading(Bool_t reading=kTRUE);
    void             SetPalette(Int_t ncolors=0, Int_t *colors=0);
-   void             SavePrimitive(ofstream &out, Option_t *);
+   void             SavePrimitive(ostream &out, Option_t * = "");
    void             SaveSource(const char *filename, Option_t *option=0);
 
    ClassDef(TStyle, 13);  //A collection of all graphics attributes
diff --git a/base/src/TAttAxis.cxx b/base/src/TAttAxis.cxx
index 4c43fcf9df094a5be67de1b7926d795236cbc68c..c97b072d9518f39ea9350f8255814e9d3c0461cb 100644
--- a/base/src/TAttAxis.cxx
+++ b/base/src/TAttAxis.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttAxis.cxx,v 1.11 2006/01/06 12:56:28 couet Exp $
+// @(#)root/base:$Name:  $:$Id: TAttAxis.cxx,v 1.12 2006/03/20 21:43:41 pcanal Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -93,7 +93,7 @@ void TAttAxis::ResetAttAxis(Option_t *option)
 
 
 //______________________________________________________________________________
-void TAttAxis::SaveAttributes(ofstream &out, const char *name, const char *subname)
+void TAttAxis::SaveAttributes(ostream &out, const char *name, const char *subname)
 {
     // Save axis attributes as C++ statement(s) on output stream out
 
diff --git a/base/src/TAttFill.cxx b/base/src/TAttFill.cxx
index fc7e9f7b7d2e4eebc5a26fbe17f4cbb519304d74..602964f0d1583f5f28531e841de8c83e0c611848 100644
--- a/base/src/TAttFill.cxx
+++ b/base/src/TAttFill.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttFill.cxx,v 1.11 2005/11/16 20:04:11 pcanal Exp $
+// @(#)root/base:$Name:  $:$Id: TAttFill.cxx,v 1.12 2006/04/06 09:38:58 couet Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -151,7 +151,7 @@ void TAttFill::ResetAttFill(Option_t *)
 }
 
 //______________________________________________________________________________
-void TAttFill::SaveFillAttributes(ofstream &out, const char *name, Int_t coldef, Int_t stydef)
+void TAttFill::SaveFillAttributes(ostream &out, const char *name, Int_t coldef, Int_t stydef)
 {
     // Save fill attributes as C++ statement(s) on output stream out
 
diff --git a/base/src/TAttLine.cxx b/base/src/TAttLine.cxx
index 68f8f9ef17f9e05f8cfb119aee0fc29736f850f8..785ee5dea6252613a54ffc396744b9ab1f957213 100644
--- a/base/src/TAttLine.cxx
+++ b/base/src/TAttLine.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttLine.cxx,v 1.11 2005/08/29 08:24:08 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TAttLine.cxx,v 1.12 2006/04/06 13:35:07 couet Exp $
 // Author: Rene Brun   28/11/94
 
 /*************************************************************************
@@ -185,7 +185,7 @@ void TAttLine::ResetAttLine(Option_t *)
 }
 
 //______________________________________________________________________________
-void TAttLine::SaveLineAttributes(ofstream &out, const char *name, Int_t coldef, Int_t stydef, Int_t widdef)
+void TAttLine::SaveLineAttributes(ostream &out, const char *name, Int_t coldef, Int_t stydef, Int_t widdef)
 {
     // Save line attributes as C++ statement(s) on output stream out
 
diff --git a/base/src/TAttMarker.cxx b/base/src/TAttMarker.cxx
index 2db51b7118d5560e1a78bbf951985032742d3fa1..a1ff06d5ebb25c7d681b3f675b7c8903f4275f11 100644
--- a/base/src/TAttMarker.cxx
+++ b/base/src/TAttMarker.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttMarker.cxx,v 1.8 2004/02/18 20:13:42 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TAttMarker.cxx,v 1.9 2004/09/13 16:39:12 brun Exp $
 // Author: Rene Brun   12/05/95
 
 /*************************************************************************
@@ -148,7 +148,7 @@ void TAttMarker::ResetAttMarker(Option_t *)
 }
 
 //______________________________________________________________________________
-void TAttMarker::SaveMarkerAttributes(ofstream &out, const char *name, Int_t coldef, Int_t stydef, Int_t sizdef)
+void TAttMarker::SaveMarkerAttributes(ostream &out, const char *name, Int_t coldef, Int_t stydef, Int_t sizdef)
 {
     // Save line attributes as C++ statement(s) on output stream out
 
diff --git a/base/src/TAttText.cxx b/base/src/TAttText.cxx
index 27554ed50a054f948341a042a6d6370549840290..0d1fa7bb28e10162be1d27fdd48269a146d67327 100644
--- a/base/src/TAttText.cxx
+++ b/base/src/TAttText.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TAttText.cxx,v 1.17 2004/09/13 16:39:12 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TAttText.cxx,v 1.18 2005/11/16 20:04:11 pcanal Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -285,7 +285,7 @@ void TAttText::ResetAttText(Option_t *)
 }
 
 //______________________________________________________________________________
-void TAttText::SaveTextAttributes(ofstream &out, const char *name, Int_t alidef, Float_t angdef, Int_t coldef, Int_t fondef, Float_t sizdef)
+void TAttText::SaveTextAttributes(ostream &out, const char *name, Int_t alidef, Float_t angdef, Int_t coldef, Int_t fondef, Float_t sizdef)
 {
     // Save text attributes as C++ statement(s) on output stream out
 
diff --git a/base/src/TColor.cxx b/base/src/TColor.cxx
index 2741b8b64c8e189c7f8baa6290ad2f0097b33bde..8a0c62e97988e9bc95cd15f430c64019eaf38e0d 100644
--- a/base/src/TColor.cxx
+++ b/base/src/TColor.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TColor.cxx,v 1.22 2005/11/16 20:04:11 pcanal Exp $
+// @(#)root/base:$Name:  $:$Id: TColor.cxx,v 1.23 2006/03/28 16:43:04 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -585,7 +585,7 @@ const char *TColor::PixelAsHexString(ULong_t pixel)
 }
 
 //______________________________________________________________________________
-void TColor::SaveColor(ofstream &out, Int_t ci)
+void TColor::SaveColor(ostream &out, Int_t ci)
 {
     // Save a color with index > 228 as a C++ statement(s) on output stream out.
    
diff --git a/base/src/TExec.cxx b/base/src/TExec.cxx
index c40b2ae0d7b9a80c24b53764fd68155dc9535910..f99f53fbe96de81b621318e21605420c60955399 100644
--- a/base/src/TExec.cxx
+++ b/base/src/TExec.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TExec.cxx,v 1.6 2002/05/18 08:43:29 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TExec.cxx,v 1.7 2005/11/16 20:04:11 pcanal Exp $
 // Author: Rene Brun   29/12/99
 
 /*************************************************************************
@@ -155,7 +155,7 @@ void TExec::Paint(Option_t *)
 }
 
 //______________________________________________________________________________
-void TExec::SavePrimitive(ofstream &out, Option_t *)
+void TExec::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/base/src/TMacro.cxx b/base/src/TMacro.cxx
index 950821a69285b2e654464e119ea27c03e29ce3a6..6f511e73a8f61373a28b29a83b32d3d0745b4fe7 100644
--- a/base/src/TMacro.cxx
+++ b/base/src/TMacro.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TMacro.cxx,v 1.7 2006/06/09 11:58:22 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TMacro.cxx,v 1.8 2006/06/26 09:29:13 brun Exp $
 // Author: Rene Brun   16/08/2005
 
 /*************************************************************************
@@ -336,7 +336,7 @@ void TMacro::SaveSource(const char *filename)
 }
 
 //______________________________________________________________________________
-void TMacro::SavePrimitive(ofstream &out, Option_t *option)
+void TMacro::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save macro source on stream out.
 
diff --git a/base/src/TObject.cxx b/base/src/TObject.cxx
index 384efeb1c6598a83453b2dc05200fd4c8fbac361..7b3d7d9944f66d32b076ca56991edfd50d7c2138 100644
--- a/base/src/TObject.cxx
+++ b/base/src/TObject.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TObject.cxx,v 1.75 2006/04/20 16:54:41 pcanal Exp $
+// @(#)root/base:$Name:  $:$Id: TObject.cxx,v 1.76 2006/05/18 07:34:25 brun Exp $
 // Author: Rene Brun   26/12/94
 
 /*************************************************************************
@@ -642,7 +642,7 @@ void TObject::RecursiveRemove(TObject *)
 }
 
 //______________________________________________________________________________
-void TObject::SavePrimitive(ofstream &out, Option_t *)
+void TObject::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
 
diff --git a/base/src/TStyle.cxx b/base/src/TStyle.cxx
index a8ff262025b48957388676cc7b78e18475296e54..7fe2ee9f87e7779328727e2fe0dd0c3d4f995fd5 100644
--- a/base/src/TStyle.cxx
+++ b/base/src/TStyle.cxx
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TStyle.cxx,v 1.65 2006/05/18 07:34:25 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TStyle.cxx,v 1.66 2006/05/19 07:03:36 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -1570,7 +1570,7 @@ void TStyle::SaveSource(const char *filename, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TStyle::SavePrimitive(ofstream &out, Option_t *)
+void TStyle::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 // Save a main frame widget as a C++ statement(s) on output stream out.
 
diff --git a/build/unix/makedist.sh b/build/unix/makedist.sh
index 719df609123d8510ec2e6bd11096c1dac0f9cf72..11f212761361217fe74cdbb025bd063387b11760 100755
--- a/build/unix/makedist.sh
+++ b/build/unix/makedist.sh
@@ -30,17 +30,25 @@ if [ "x${COMPILER}" != "x" ]; then
 fi
 
 TARFILE=root_v${ROOTVERS}.${TYPE}${COMPILER}${DEBUG}
-# figure out what tar to use
+# figure out which tar to use
 if [ "x$MSI" = "x1" ]; then
-   TAR=build/package/msi/makemsi.sh
    TARFILE=../${TARFILE}.msi
+   TARCMD="build/package/msi/makemsi.sh ${TARFILE} -T ${TARFILE}.filelist"
 else
    TARFILE=${TARFILE}.tar
-   if [ "x`which gtar 2>/dev/null | awk '{if ($1~/gtar/) print $1;}'`" != "x" ]; then
-      TAR="gtar zcvf"
+   ISGNUTAR="`tar --version 2>&1 | grep GNU`"
+   if [ "x${ISGNUTAR}" != "x" ]; then
+      TAR=tar
+   else
+      if [ "x`which gtar 2>/dev/null | awk '{if ($1~/gtar/) print $1;}'`" != "x" ]; then
+	 TAR=gtar
+      fi
+   fi
+   if [ "x${TAR}" != "x" ]; then
       TARFILE=${TARFILE}".gz"
+      TARCMD="${TAR} zcvf ${TARFILE} -T ${TARFILE}.filelist"
    else
-      TAR="tar cvf"
+      TARCMD="tar cvf ${TARFILE} `cat ${TARFILE}.filelist`"
       DOGZIP="y"
    fi
 fi
@@ -54,7 +62,7 @@ fi
 
 ${pwd}/build/unix/distfilelist.sh $dir > ${TARFILE}.filelist
 rm -f ${TARFILE}
-$TAR ${TARFILE} -T ${TARFILE}.filelist || exit 1
+$TARCMD || exit 1
 rm ${TARFILE}.filelist 
 
 if [ "x$DOGZIP" = "xy" ]; then
diff --git a/g3d/inc/TAxis3D.h b/g3d/inc/TAxis3D.h
index a24c4d47e6561447a27b996178776d171ad676b5..073af30274dcfd275161a3f7ac8fc7fd6f7f04f5 100644
--- a/g3d/inc/TAxis3D.h
+++ b/g3d/inc/TAxis3D.h
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: TAxis3D.h,v 1.9 2005/08/30 09:11:39 brun Exp $
+// @(#)root/g3d:$Name:  $:$Id: TAxis3D.h,v 1.10 2005/11/24 17:28:06 couet Exp $
 // Author: Valery Fine(fine@mail.cern.ch)   07/01/2000
 
 /*************************************************************************
@@ -10,7 +10,7 @@
  *************************************************************************/
 #ifndef ROOT_TAxis3D
 #define ROOT_TAxis3D
-// $Id: TAxis3D.h,v 1.9 2005/08/30 09:11:39 brun Exp $
+// $Id: TAxis3D.h,v 1.10 2005/11/24 17:28:06 couet Exp $
 // ***********************************************************************
 // * C++ class library to paint axis "arround" TView object
 // * Copyright(c) 1997~1999  [BNL] Brookhaven National Laboratory, STAR, All rights reserved
@@ -105,7 +105,7 @@ public:
    virtual void     Paint(Option_t *option="");
    void             PaintAxis(TGaxis *axis, Float_t ang);
    static Double_t *PixeltoXYZ(Double_t px, Double_t py, Double_t *point3D, TView *view =0);
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
 
    virtual void     SetAxisColor(Color_t color=1, Option_t *axis="*"); // *MENU*
    virtual void     SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="*");
diff --git a/g3d/inc/THelix.h b/g3d/inc/THelix.h
index efd01a836728e9879c4a791400da2565c3c87258..518197067d841ce9364e6e8934c7f2761bae2cea 100644
--- a/g3d/inc/THelix.h
+++ b/g3d/inc/THelix.h
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: THelix.h,v 1.7 2005/11/24 17:28:06 couet Exp $
+// @(#)root/g3d:$Name:  $:$Id: THelix.h,v 1.8 2006/05/23 04:47:36 brun Exp $
 // Author: Ping Yeh   19/12/97
 
 /*************************************************************************
@@ -73,7 +73,7 @@ public:
    virtual void    Draw(Option_t *option="");
    Option_t       *GetOption() const {return fOption.Data();}
    virtual void    Print(Option_t *option="") const;
-   virtual void    SavePrimitive(ofstream &out, Option_t *option);
+   virtual void    SavePrimitive(ostream &out, Option_t *option = "");
    virtual void    SetOption(Option_t *option="") {fOption = option;}
    virtual void    SetAxis(Double_t * axis);       //Define new axis
    virtual void    SetAxis(Double_t x, Double_t y, Double_t z);
diff --git a/g3d/inc/TMarker3DBox.h b/g3d/inc/TMarker3DBox.h
index 52f5d8ff2e1e55955bf2f9928a8d1de09216a027..ec434cc1a2c1169f7141688aef2778c44c6381f8 100644
--- a/g3d/inc/TMarker3DBox.h
+++ b/g3d/inc/TMarker3DBox.h
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: TMarker3DBox.h,v 1.8 2005/12/12 15:28:32 brun Exp $
+// @(#)root/g3d:$Name:  $:$Id: TMarker3DBox.h,v 1.9 2006/05/23 04:47:36 brun Exp $
 // Author: "Valery fine"   31/10/97
 
 /*************************************************************************
@@ -77,7 +77,7 @@ public:
 
    virtual void    Paint(Option_t *option);
    static  void    PaintH3(TH1 *h, Option_t *option);
-   virtual void    SavePrimitive(ofstream &out, Option_t *option);
+   virtual void    SavePrimitive(ostream &out, Option_t *option = "");
    virtual void    SetPoints(Double_t *buff) const;
    virtual void    SetDirection(Float_t theta, Float_t phi);
    virtual void    SetPosition(Float_t x, Float_t y, Float_t z);
diff --git a/g3d/inc/TPolyLine3D.h b/g3d/inc/TPolyLine3D.h
index 5e24f13e423128b92c55f6bdafc5362eeb860cfa..a9a819df3ba2b0fe60f04414bb5c1c31d3c433e0 100644
--- a/g3d/inc/TPolyLine3D.h
+++ b/g3d/inc/TPolyLine3D.h
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: TPolyLine3D.h,v 1.8 2005/11/24 17:28:06 couet Exp $
+// @(#)root/g3d:$Name:  $:$Id: TPolyLine3D.h,v 1.9 2006/05/23 04:47:36 brun Exp $
 // Author: Nenad Buncic   17/08/95
 
 /*************************************************************************
@@ -71,7 +71,7 @@ public:
    virtual Int_t     Merge(TCollection *list);
    virtual void      Paint(Option_t *option="");
    virtual void      Print(Option_t *option="") const;
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual Int_t     SetNextPoint(Double_t x, Double_t y, Double_t z); // *MENU*
    virtual void      SetOption(Option_t *option="") {fOption = option;}
    virtual void      SetPoint(Int_t point, Double_t x, Double_t y, Double_t z); // *MENU*
diff --git a/g3d/inc/TPolyMarker3D.h b/g3d/inc/TPolyMarker3D.h
index ffa051ddb8b31698c7be41f0373f56b7b478b1d0..d4e226a5ea0cdc10dd5b40c0284d3f94366fe69f 100644
--- a/g3d/inc/TPolyMarker3D.h
+++ b/g3d/inc/TPolyMarker3D.h
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: TPolyMarker3D.h,v 1.12 2005/05/20 13:27:16 brun Exp $
+// @(#)root/g3d:$Name:  $:$Id: TPolyMarker3D.h,v 1.13 2006/05/23 04:47:36 brun Exp $
 // Author: Nenad Buncic   21/08/95
 
 /*************************************************************************
@@ -69,7 +69,7 @@ public:
    virtual Int_t     Merge(TCollection *list);
    virtual void      Paint(Option_t *option="");
    virtual void      Print(Option_t *option="") const;
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      SetName(const char *name); // *MENU*
    void              SetPoint(Int_t n, Double_t x, Double_t y, Double_t z); // *MENU*
    virtual void      SetPolyMarker(Int_t n, Float_t *p, Marker_t marker, Option_t *option="");
diff --git a/g3d/src/TAxis3D.cxx b/g3d/src/TAxis3D.cxx
index 97d1b19de96b248a8a0b4b2f8c59222b09139012..ec48e65ec80dd8e6d18e04669fca0e1b2f7cdc59 100644
--- a/g3d/src/TAxis3D.cxx
+++ b/g3d/src/TAxis3D.cxx
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: TAxis3D.cxx,v 1.17 2005/09/08 14:22:16 brun Exp $
+// @(#)root/g3d:$Name:  $:$Id: TAxis3D.cxx,v 1.18 2005/11/24 17:28:07 couet Exp $
 // Author: Valery Fine(fine@mail.cern.ch)   07/01/2000
 
 // ***********************************************************************
@@ -486,7 +486,7 @@ Double_t *TAxis3D::PixeltoXYZ(Double_t px, Double_t py, Double_t *point3D, TView
 
 
 //______________________________________________________________________________
-void TAxis3D::SavePrimitive(ofstream &out, Option_t *)
+void TAxis3D::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/g3d/src/THelix.cxx b/g3d/src/THelix.cxx
index 1944041d6c1beeeaf6e6acdb1eb916601c5008ef..d670374849b62e23a2e3d9e8d6d244c2487c4070 100644
--- a/g3d/src/THelix.cxx
+++ b/g3d/src/THelix.cxx
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: THelix.cxx,v 1.14 2006/05/23 04:47:36 brun Exp $
+// @(#)root/g3d:$Name:  $:$Id: THelix.cxx,v 1.15 2006/05/24 15:31:40 brun Exp $
 // Author: Ping Yeh   19/12/97
 
 /*************************************************************************
@@ -289,7 +289,7 @@ void THelix::Print(Option_t *option) const
 
 
 //______________________________________________________________________________
-void THelix::SavePrimitive(ofstream &out, Option_t *)
+void THelix::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out.
 
diff --git a/g3d/src/TMarker3DBox.cxx b/g3d/src/TMarker3DBox.cxx
index 8449eeb39a69cb380ff2c231e9de9830a358d5ca..ea7f4d3e74b29960fefc8c2ecd9e159822bb086a 100644
--- a/g3d/src/TMarker3DBox.cxx
+++ b/g3d/src/TMarker3DBox.cxx
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: TMarker3DBox.cxx,v 1.17 2006/05/23 04:47:36 brun Exp $
+// @(#)root/g3d:$Name:  $:$Id: TMarker3DBox.cxx,v 1.18 2006/05/24 15:31:40 brun Exp $
 // Author: Rene Brun , Olivier Couet 31/10/97
 
 
@@ -352,7 +352,7 @@ void TMarker3DBox::PaintH3(TH1 *h, Option_t *option)
 
 
 //______________________________________________________________________________
-void TMarker3DBox::SavePrimitive(ofstream &out, Option_t *)
+void TMarker3DBox::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/g3d/src/TPolyLine3D.cxx b/g3d/src/TPolyLine3D.cxx
index e2e1607a571977e2919b1879827149d1e5cf1252..c6dc417222a1d5919b91336c14c76ce61bfeeef5 100644
--- a/g3d/src/TPolyLine3D.cxx
+++ b/g3d/src/TPolyLine3D.cxx
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: TPolyLine3D.cxx,v 1.26 2006/05/23 04:47:36 brun Exp $
+// @(#)root/g3d:$Name:  $:$Id: TPolyLine3D.cxx,v 1.27 2006/05/24 15:31:40 brun Exp $
 // Author: Nenad Buncic   17/08/95
 
 /*************************************************************************
@@ -593,7 +593,7 @@ void TPolyLine3D::Print(Option_t *option) const
 
 
 //______________________________________________________________________________
-void TPolyLine3D::SavePrimitive(ofstream &out, Option_t *)
+void TPolyLine3D::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream.
 
diff --git a/g3d/src/TPolyMarker3D.cxx b/g3d/src/TPolyMarker3D.cxx
index 47f2bc4f0ea4765e1933eebb48c3b213ec23f442..4cbcaaf3169e58b92ee23d73a72ff8dae0fd669d 100644
--- a/g3d/src/TPolyMarker3D.cxx
+++ b/g3d/src/TPolyMarker3D.cxx
@@ -1,4 +1,4 @@
-// @(#)root/g3d:$Name:  $:$Id: TPolyMarker3D.cxx,v 1.28 2006/05/23 04:47:36 brun Exp $
+// @(#)root/g3d:$Name:  $:$Id: TPolyMarker3D.cxx,v 1.29 2006/05/24 15:31:40 brun Exp $
 // Author: Nenad Buncic   21/08/95
 
 /*************************************************************************
@@ -489,7 +489,7 @@ void TPolyMarker3D::Print(Option_t *option) const
 }
 
 //______________________________________________________________________________
-void TPolyMarker3D::SavePrimitive(ofstream &out, Option_t *)
+void TPolyMarker3D::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream.
 
diff --git a/ged/inc/TGedMarkerSelect.h b/ged/inc/TGedMarkerSelect.h
index 7905be630c2c783f38538c394be66ac445239398..1056c695bea890291196b51a244056b6dd5d90d3 100644
--- a/ged/inc/TGedMarkerSelect.h
+++ b/ged/inc/TGedMarkerSelect.h
@@ -1,4 +1,4 @@
-// @(#)root/ged:$Name:  $:$Id: TGedMarkerSelect.h,v 1.5 2004/06/16 08:58:34 rdm Exp $
+// @(#)root/ged:$Name:  $:$Id: TGedMarkerSelect.h,v 1.6 2005/11/11 15:38:30 brun Exp $
 // Author: Marek Biskup, Ilka Antcheva   24/07/03
 
 /*************************************************************************
@@ -72,7 +72,7 @@ public:
    Style_t        GetMarkerStyle() const { return fMarkerStyle; }
    void           SetMarkerStyle(Style_t pattern);
    virtual void   MarkerSelected(Style_t marker = 0) { Emit("MarkerSelected(Style_t)", marker ? marker : GetMarkerStyle()); }  // *SIGNAL*
-   virtual void   SavePrimitive(ofstream &out, Option_t *);
+   virtual void   SavePrimitive(ostream &out, Option_t * = "");
    virtual TGDimension GetDefaultSize() const { return TGDimension(38, 21); }
 
    ClassDef(TGedMarkerSelect,0)  // Marker selection button
diff --git a/ged/inc/TGedPatternSelect.h b/ged/inc/TGedPatternSelect.h
index 58df9b35f4f4b28dc20553d202c9a0cae0b99b19..ded1499fc21f905dd7cd0a45f28ce6fbef7f5291 100644
--- a/ged/inc/TGedPatternSelect.h
+++ b/ged/inc/TGedPatternSelect.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGedPatternSelect.h,v 1.5 2004/06/16 08:58:34 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGedPatternSelect.h,v 1.6 2006/06/14 13:57:28 antcheva Exp $
 // Author: Marek Biskup, Ilka Antcheva   24/07/03
 
 /*************************************************************************
@@ -165,7 +165,7 @@ public:
    virtual void   PatternSelected(Style_t pattern = 0) 
                   { Emit("PatternSelected(Style_t)", pattern ? pattern : GetPattern()); }  // *SIGNAL*
    virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
-   virtual void   SavePrimitive(ofstream &out, Option_t *);
+   virtual void   SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGedPatternSelect,0)  //pattern selection check-button
 };
diff --git a/ged/inc/TGedToolBox.h b/ged/inc/TGedToolBox.h
index 34dc92d833f276eb3af1b0d3c633752a65d9d5f1..75273a16b9b49a207c9a3da374fdd83ab5682c70 100644
--- a/ged/inc/TGedToolBox.h
+++ b/ged/inc/TGedToolBox.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGedToolBox.h,v 1.1 2004/02/18 20:13:42 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGedToolBox.h,v 1.2 2004/02/22 11:50:29 brun Exp $
 // Author: Marek Biskup, Ilka Antcheva   21/07/2003
 
 /*************************************************************************
@@ -37,7 +37,7 @@ public:
                Pixel_t back = GetDefaultFrameBackground());
    Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t);
 
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
         
    ClassDef(TGedToolBox,0)  //a bar with picture buttons
 };
diff --git a/ged/src/TGedMarkerSelect.cxx b/ged/src/TGedMarkerSelect.cxx
index 99f46a17ed39396b07c8a22d855904e2755473f5..c0eed09945e292c453f7040b9e5c3e4956b64eca 100644
--- a/ged/src/TGedMarkerSelect.cxx
+++ b/ged/src/TGedMarkerSelect.cxx
@@ -1,4 +1,4 @@
-// @(#)root/ged:$Name:  $:$Id: TGedMarkerSelect.cxx,v 1.11 2005/11/11 15:38:30 brun Exp $
+// @(#)root/ged:$Name:  $:$Id: TGedMarkerSelect.cxx,v 1.12 2006/03/21 10:41:36 antcheva Exp $
 // Author: Marek Biskup, Ilka Antcheva   22/07/03
 
 /*************************************************************************
@@ -215,7 +215,7 @@ void TGedMarkerSelect::SetMarkerStyle(Style_t markerStyle)
 }
 
 //______________________________________________________________________________
-void TGedMarkerSelect::SavePrimitive(ofstream &out, Option_t *)
+void TGedMarkerSelect::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save the pattern select widget as a C++ statement(s) on output stream out
 
diff --git a/ged/src/TGedPatternSelect.cxx b/ged/src/TGedPatternSelect.cxx
index aa7fcc81badb3b8b3f5bf295da77203140354188..64d53ab590ff2d9c5c35155369244e3b0471583e 100644
--- a/ged/src/TGedPatternSelect.cxx
+++ b/ged/src/TGedPatternSelect.cxx
@@ -1,4 +1,4 @@
-// @(#)root/ged:$Name:  $:$Id: TGedPatternSelect.cxx,v 1.12 2005/11/11 15:38:30 brun Exp $
+// @(#)root/ged:$Name:  $:$Id: TGedPatternSelect.cxx,v 1.13 2006/06/14 13:57:28 antcheva Exp $
 // Author: Marek Biskup, Ilka Antcheva   22/07/03
 
 /*************************************************************************
@@ -641,7 +641,7 @@ void TGedPatternSelect::SetPattern(Style_t pattern, Bool_t emit)
 }
 
 //______________________________________________________________________________
-void TGedPatternSelect::SavePrimitive(ofstream &out, Option_t *)
+void TGedPatternSelect::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save the pattern select widget as a C++ statement(s) on output stream out
 
diff --git a/ged/src/TGedToolBox.cxx b/ged/src/TGedToolBox.cxx
index 8959c057a2785f7a3b6c537599ef200ef19ef043..f78585652e6e2aa9618e385eebd6de27599d4268 100644
--- a/ged/src/TGedToolBox.cxx
+++ b/ged/src/TGedToolBox.cxx
@@ -1,4 +1,4 @@
-// @(#)root/ged:$Name:  $:$Id: TGedToolBox.cxx,v 1.6 2005/09/05 10:01:46 brun Exp $
+// @(#)root/ged:$Name:  $:$Id: TGedToolBox.cxx,v 1.7 2006/05/26 15:13:01 rdm Exp $
 // Author: Marek Biskup, Ilka Antcheva 17/07/2003
 
 /*************************************************************************
@@ -183,7 +183,7 @@ Bool_t TGedToolBox::ProcessMessage(Long_t msg, Long_t parm1, Long_t)
 }
 
 //______________________________________________________________________________
-void TGedToolBox::SavePrimitive(ofstream &out, Option_t *option)
+void TGedToolBox::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save the tool box widget as a C++ statement(s) on output stream out
 
diff --git a/geom/inc/TGeoArb8.h b/geom/inc/TGeoArb8.h
index d74baff283fd897fe0c4ae43b7f75469b77e1a44..ba57c4e34fe36cba47b31d153398c543e444fe2c 100644
--- a/geom/inc/TGeoArb8.h
+++ b/geom/inc/TGeoArb8.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoArb8.h,v 1.20 2006/02/03 09:08:32 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoArb8.h,v 1.21 2006/05/23 04:47:36 brun Exp $
 // Author: Andrei Gheata   24/10/01
 
 /*************************************************************************
@@ -94,7 +94,7 @@ public:
    Bool_t                IsTwisted() const {return (fTwist==0)?kFALSE:kTRUE;}
    Double_t              SafetyToFace(Double_t *point, Int_t iseg, Bool_t in) const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetPlaneVertices(Double_t zpl, Double_t *vertices) const;
    virtual void          SetVertex(Int_t vnum, Double_t x, Double_t y);
    virtual void          SetDimensions(Double_t *param);
@@ -167,7 +167,7 @@ public:
    virtual TGeoShape    *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
    virtual Int_t         GetNmeshVertices() const {return 8;}
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoTrap, 1)         // G3 TRAP shape
 };
@@ -210,7 +210,7 @@ public:
    virtual TGeoShape    *GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const;
    virtual Int_t         GetNmeshVertices() const {return 8;}
    Double_t              GetTwistAngle() const {return fTwistAngle;}
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
  
    ClassDef(TGeoGtra, 1)         // G3 GTRA shape
 };
diff --git a/geom/inc/TGeoBBox.h b/geom/inc/TGeoBBox.h
index d96e0d2bf29fac1f9dce15f5e552f2d58f627221..53c90e11b4539fc923bf468a00eb4e84dff56757 100644
--- a/geom/inc/TGeoBBox.h
+++ b/geom/inc/TGeoBBox.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoBBox.h,v 1.20 2005/11/18 16:07:58 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoBBox.h,v 1.21 2006/04/06 09:37:13 brun Exp $
 // Author: Andrei Gheata   24/10/01
    
 /*************************************************************************
@@ -75,7 +75,7 @@ public:
    virtual Bool_t        IsNullBox() const {return ((fDX==0)&&(fDY==0)&&(fDZ==0))?kTRUE:kFALSE;}
    virtual TBuffer3D    *MakeBuffer3D() const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetBoxDimensions(Double_t dx, Double_t dy, Double_t dz, Double_t *origin=0);
    virtual void          SetDimensions(Double_t *param);
    void                  SetBoxPoints(Double_t *points) const;
diff --git a/geom/inc/TGeoBoolNode.h b/geom/inc/TGeoBoolNode.h
index 4d7edbbaf5f37d60c4d76e7f25a9d11c5d15bbb1..b0b32f1be3e7ae255d12c534c77f5abff88b967d 100644
--- a/geom/inc/TGeoBoolNode.h
+++ b/geom/inc/TGeoBoolNode.h
@@ -1,4 +1,4 @@
-// @(#):$Name:  $:$Id: TGeoBoolNode.h,v 1.12 2005/05/13 16:20:37 brun Exp $
+// @(#):$Name:  $:$Id: TGeoBoolNode.h,v 1.13 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   30/05/02
 
 /*************************************************************************
@@ -72,7 +72,7 @@ public:
    virtual void      Paint(Option_t *option);
    void              RegisterMatrices();
    virtual Double_t  Safety(Double_t *point, Bool_t in=kTRUE) const = 0;
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      SetPoints(Double_t *points) const = 0;
    virtual void      SetPoints(Float_t *points)  const = 0;
    void              SetSelected(Int_t sel) {fSelected = sel;}
@@ -109,7 +109,7 @@ public:
    virtual EGeoBoolType GetBooleanOperator() const {return kGeoUnion;}
    virtual Int_t     GetNpoints() const;
    virtual Double_t  Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      SetPoints(Double_t *points) const;
    virtual void      SetPoints(Float_t *points)  const;
    virtual void      Sizeof3D() const;
@@ -149,7 +149,7 @@ public:
    virtual EGeoBoolType GetBooleanOperator() const {return kGeoIntersection;}
    virtual Int_t     GetNpoints() const;
    virtual Double_t  Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      SetPoints(Double_t *points) const;
    virtual void      SetPoints(Float_t *points)  const;
    virtual void      Sizeof3D() const;
@@ -190,7 +190,7 @@ public:
    virtual EGeoBoolType GetBooleanOperator() const {return kGeoSubtraction;}
    virtual Int_t     GetNpoints() const;
    virtual Double_t  Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      SetPoints(Double_t *points) const;
    virtual void      SetPoints(Float_t *points)  const;
    virtual void      Sizeof3D() const;
diff --git a/geom/inc/TGeoCompositeShape.h b/geom/inc/TGeoCompositeShape.h
index fe12248a88796500c8663c5ab576ff5e5bd6f5f9..6b5dc7cbfd6e3d7ba3ec3db4a4c71e6b1c7cc119 100644
--- a/geom/inc/TGeoCompositeShape.h
+++ b/geom/inc/TGeoCompositeShape.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoCompositeShape.h,v 1.22 2005/11/18 16:07:58 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoCompositeShape.h,v 1.23 2006/05/23 04:47:36 brun Exp $
 // Author: Andrei Gheata   31/01/02
 
 /*************************************************************************
@@ -67,7 +67,7 @@ public:
    void                  MakeNode(const char *expression);
    virtual Bool_t        PaintComposite(Option_t *option = "") const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    virtual void          SetDimensions(Double_t * /*param*/) {;}
    virtual void          SetPoints(Double_t *points) const;
    virtual void          SetPoints(Float_t *points) const;
diff --git a/geom/inc/TGeoCone.h b/geom/inc/TGeoCone.h
index 2ea189c7b75d6b2fe910cb4c90012016dce75bec..1fd27a759129d5e8aa136e5839f3ed666ebc7806 100644
--- a/geom/inc/TGeoCone.h
+++ b/geom/inc/TGeoCone.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoCone.h,v 1.24 2005/11/17 13:17:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoCone.h,v 1.25 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   31/01/02
 
 /*************************************************************************
@@ -88,7 +88,7 @@ public:
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
    static  Double_t      SafetyS(Double_t *point, Bool_t in, Double_t dz, Double_t rmin1, Double_t rmax1,
                                  Double_t rmin2, Double_t rmax2, Int_t skipz=0);
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetConeDimensions(Double_t dz, Double_t rmin1, Double_t rmax1,
                                        Double_t rmin2, Double_t rmax2);
    virtual void          SetDimensions(Double_t *param);
@@ -162,7 +162,7 @@ public:
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
    static  Double_t      SafetyS(Double_t *point, Bool_t in, Double_t dz, Double_t rmin1, Double_t rmax1,
                                  Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2, Int_t skipz=0);
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetConsDimensions(Double_t dz, Double_t rmin1, Double_t rmax1,
                                        Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2);
    virtual void          SetDimensions(Double_t *param);
diff --git a/geom/inc/TGeoEltu.h b/geom/inc/TGeoEltu.h
index 391c6a92ecb3f04b3b46864ca2413f1d622541d2..aada89568afa8c4d8bf9c267aa99cd9d51f0cb1b 100644
--- a/geom/inc/TGeoEltu.h
+++ b/geom/inc/TGeoEltu.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoEltu.h,v 1.14 2005/11/17 13:17:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoEltu.h,v 1.15 2005/11/18 16:07:58 brun Exp $
 // Author: Mihaela Gheata   05/06/02
 
 /*************************************************************************
@@ -55,7 +55,7 @@ public:
    virtual void          InspectShape() const;
    virtual Bool_t        IsCylType() const {return kTRUE;}
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetEltuDimensions(Double_t a, Double_t b, Double_t dz);
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
diff --git a/geom/inc/TGeoHalfSpace.h b/geom/inc/TGeoHalfSpace.h
index e1a25fb4c65af14629a54c47e25584799491098b..1db1b3ba9518aa83c44c183a58b6c6a771487b17 100644
--- a/geom/inc/TGeoHalfSpace.h
+++ b/geom/inc/TGeoHalfSpace.h
@@ -1,4 +1,4 @@
-// @(#) :$Name:  $:$Id: TGeoHalfSpace.h,v 1.6 2005/11/17 13:17:54 brun Exp $
+// @(#) :$Name:  $:$Id: TGeoHalfSpace.h,v 1.7 2005/11/18 16:07:58 brun Exp $
 // Author: Mihaela Gheata   03/08/04
 
 /*************************************************************************
@@ -59,7 +59,7 @@ public:
    virtual Bool_t        IsCylType() const {return kFALSE;}
    //virtual void          Paint(Option_t * /*option*/) {;}
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t * /*points*/) const {;}
    virtual void          SetPoints(Float_t * /*points*/) const {;}
diff --git a/geom/inc/TGeoHype.h b/geom/inc/TGeoHype.h
index 626ba280dc994fc64ea824af40dbcdb53e490948..fe8f88825fd9f4c9a0ac041273d29cc5d9e75b23 100644
--- a/geom/inc/TGeoHype.h
+++ b/geom/inc/TGeoHype.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoHype.h,v 1.5 2005/11/17 13:17:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoHype.h,v 1.6 2005/11/18 16:07:58 brun Exp $
 // Author: Mihaela Gheata   20/11/04
 
 /*************************************************************************
@@ -100,7 +100,7 @@ public:
    //virtual void          Paint(Option_t *option);
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
    Double_t              SafetyToHype(Double_t *point, Bool_t inner, Bool_t in) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetHypeDimensions(Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz);
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
diff --git a/geom/inc/TGeoMaterial.h b/geom/inc/TGeoMaterial.h
index d38e9c59874efdf74579f7ec5ec74d486762aa5c..973c1b584d72447d7f724dca5c9198995f9a0263 100644
--- a/geom/inc/TGeoMaterial.h
+++ b/geom/inc/TGeoMaterial.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoMaterial.h,v 1.20 2006/05/23 04:47:37 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoMaterial.h,v 1.21 2006/06/11 12:56:48 brun Exp $
 // Author: Andrei Gheata   25/10/01
 
 /*************************************************************************
@@ -94,7 +94,7 @@ public:
    Bool_t                   IsUsed() const {return TObject::TestBit(kMatUsed);}
    virtual Bool_t           IsMixture() const {return kFALSE;}
    virtual void             Print(const Option_t *option="") const;
-   virtual void             SavePrimitive(ofstream &out, Option_t *option);
+   virtual void             SavePrimitive(ostream &out, Option_t *option = "");
    void                     SetIndex(Int_t index) {fIndex=index;}
    virtual void             SetCerenkovProperties(TObject* cerenkov) {fCerenkov = cerenkov;}
    void                     SetRadLen(Double_t radlen, Double_t intlen=0.);
@@ -156,7 +156,7 @@ public:
    virtual Bool_t           IsEq(const TGeoMaterial *other) const;
    virtual Bool_t           IsMixture() const {return kTRUE;}
    virtual void             Print(const Option_t *option="") const;
-   virtual void             SavePrimitive(ofstream &out, Option_t *option);
+   virtual void             SavePrimitive(ostream &out, Option_t *option = "");
    void                     SetA(Double_t a) {fA = a;}
    void                     SetZ(Double_t z) {fZ = z;}
 
diff --git a/geom/inc/TGeoMatrix.h b/geom/inc/TGeoMatrix.h
index 99179292ae5782a419e49c3ecf8fc84b37502f88..282410ea67bce7f3fd7c159f7f62e72517e1e981 100644
--- a/geom/inc/TGeoMatrix.h
+++ b/geom/inc/TGeoMatrix.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoMatrix.h,v 1.24 2006/02/23 13:23:07 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoMatrix.h,v 1.25 2006/04/25 09:38:27 brun Exp $
 // Author: Andrei Gheata   25/10/01
 
 /*************************************************************************
@@ -136,7 +136,7 @@ public :
    virtual void         RotateX(Double_t angle);
    virtual void         RotateY(Double_t angle);
    virtual void         RotateZ(Double_t angle);
-   virtual void         SavePrimitive(ofstream &out, Option_t *option);
+   virtual void         SavePrimitive(ostream &out, Option_t *option = "");
    void                 Subtract(const TGeoTranslation *other);
    void                 SetTranslation(Double_t dx, Double_t dy, Double_t dz);
    void                 SetTranslation(const TGeoMatrix &other);
@@ -196,7 +196,7 @@ public :
    virtual void         RotateX(Double_t angle);
    virtual void         RotateY(Double_t angle);
    virtual void         RotateZ(Double_t angle);
-   virtual void         SavePrimitive(ofstream &out, Option_t *option);
+   virtual void         SavePrimitive(ostream &out, Option_t *option = "");
    void                 SetAngles(Double_t phi, Double_t theta, Double_t psi);
    void                 SetAngles(Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2,
                                   Double_t theta3, Double_t phi3);
@@ -275,7 +275,7 @@ public :
    virtual void         RotateX(Double_t angle);
    virtual void         RotateY(Double_t angle);
    virtual void         RotateZ(Double_t angle);
-   virtual void         SavePrimitive(ofstream &out, Option_t *option);
+   virtual void         SavePrimitive(ostream &out, Option_t *option = "");
    void                 SetTranslation(const TGeoTranslation &tr);
    void                 SetTranslation(Double_t dx, Double_t dy, Double_t dz);
    void                 SetTranslation(Double_t *vect);
@@ -348,7 +348,7 @@ public :
    virtual const Double_t    *GetTranslation() const {return &kNullVector[0];}
    virtual const Double_t    *GetRotationMatrix() const {return &kIdentityMatrix[0];}
    virtual const Double_t    *GetScale()       const {return &kUnitScale[0];}
-   virtual void         SavePrimitive(ofstream &, Option_t *) {;}
+   virtual void         SavePrimitive(ostream &, Option_t * = "") {;}
 
    ClassDef(TGeoIdentity, 1)                 // identity transformation class
 };
@@ -390,7 +390,7 @@ public :
    virtual void         RotateX(Double_t angle);
    virtual void         RotateY(Double_t angle);
    virtual void         RotateZ(Double_t angle);
-   virtual void         SavePrimitive(ofstream &out, Option_t *option);
+   virtual void         SavePrimitive(ostream &out, Option_t *option = "");
    void                 SetTranslation(const Double_t *vect) {SetBit(kGeoTranslation); memcpy(&fTranslation[0], vect, 3*sizeof(Double_t));}
    void                 SetRotation(const Double_t *matrix) {SetBit(kGeoRotation); memcpy(&fRotationMatrix[0], matrix, 9*sizeof(Double_t));}
    void                 SetScale(const Double_t *scale) {SetBit(kGeoScale); memcpy(&fScale[0], scale, 3*sizeof(Double_t));}
diff --git a/geom/inc/TGeoMedium.h b/geom/inc/TGeoMedium.h
index 18a9f3c4944d7019671342d55ef90ae24a996f6f..62657b3ff402d925be182a774672f6a587d2721e 100644
--- a/geom/inc/TGeoMedium.h
+++ b/geom/inc/TGeoMedium.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoMedium.h,v 1.9 2006/05/23 04:47:37 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoMedium.h,v 1.10 2006/06/02 07:21:20 brun Exp $
 // Author: Rene Brun   26/12/02
 
 /*************************************************************************
@@ -51,7 +51,7 @@ public:
    void                     SetParam(Int_t i, Double_t val)   {fParams[i] = val;}
    char                    *GetPointerName() const;
    TGeoMaterial            *GetMaterial() const {return fMaterial;}
-   virtual void             SavePrimitive(ofstream &out, Option_t *option);
+   virtual void             SavePrimitive(ostream &out, Option_t *option = "");
    void                     SetId(Int_t id)     {fId = id;}
    void                     SetMaterial(TGeoMaterial *mat) {fMaterial = mat;}
    virtual void             SetCerenkovProperties(TObject* cerenkov) {fMaterial->SetCerenkovProperties(cerenkov);}   
diff --git a/geom/inc/TGeoNode.h b/geom/inc/TGeoNode.h
index 733ba2c59422c5c9932584b5ce512f54d23b0456..710fb70a2a257063e42410cee130ebe62a6425ce 100644
--- a/geom/inc/TGeoNode.h
+++ b/geom/inc/TGeoNode.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoNode.h,v 1.24 2006/05/23 04:47:37 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoNode.h,v 1.25 2006/06/02 16:00:43 brun Exp $
 // Author: Andrei Gheata   24/10/01
 
 /*************************************************************************
@@ -115,7 +115,7 @@ public:
 
    virtual TGeoNode *MakeCopyNode() const {return 0;}
    Double_t          Safety(Double_t *point, Bool_t in=kTRUE) const;
-   void              SaveAttributes(ofstream &out);
+   void              SaveAttributes(ostream &out);
    void              SetCurrentPoint(Double_t x, Double_t y, Double_t z) {fVolume->SetCurrentPoint(x,y,z);}// *MENU*
    void              SetVolume(const TGeoVolume *volume) {fVolume = (TGeoVolume*)volume;}
    void              SetNumber(Int_t number)             {fNumber=number;}
diff --git a/geom/inc/TGeoPara.h b/geom/inc/TGeoPara.h
index 5d5054d5d78ebd3d769b7c0265c1b289daee6f76..5b9044d5fec7fb44b1d2be971cc0583f996e78e2 100644
--- a/geom/inc/TGeoPara.h
+++ b/geom/inc/TGeoPara.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoPara.h,v 1.14 2005/11/17 13:17:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoPara.h,v 1.15 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   31/01/02
 
 /*************************************************************************
@@ -78,7 +78,7 @@ public:
    virtual void          InspectShape() const;
    virtual Bool_t        IsCylType() const {return kFALSE;}
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
    virtual void          SetPoints(Float_t *points) const;
diff --git a/geom/inc/TGeoParaboloid.h b/geom/inc/TGeoParaboloid.h
index 8a7a8c062bc7e2ced54554a2e51d5edb4373130d..d8b30df1e2658603d5f9123e89236a9ae660e647 100644
--- a/geom/inc/TGeoParaboloid.h
+++ b/geom/inc/TGeoParaboloid.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoParaboloid.h,v 1.7 2005/11/17 13:17:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoParaboloid.h,v 1.8 2005/11/18 16:07:58 brun Exp $
 // Author: Mihaela Gheata   20/06/04
 
 /*************************************************************************
@@ -74,7 +74,7 @@ public:
    virtual Bool_t        IsCylType() const {return kTRUE;}
    virtual TBuffer3D    *MakeBuffer3D() const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetParaboloidDimensions(Double_t rlo, Double_t rhi, Double_t dz);
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
diff --git a/geom/inc/TGeoPatternFinder.h b/geom/inc/TGeoPatternFinder.h
index 4b8838a3518d4bd7c00273e81b1d8a09dff96e90..10b1a4a423892e58e71f4ebc3599149327e1170a 100644
--- a/geom/inc/TGeoPatternFinder.h
+++ b/geom/inc/TGeoPatternFinder.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoPatternFinder.h,v 1.13 2006/05/23 04:47:37 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoPatternFinder.h,v 1.14 2006/06/13 12:11:45 brun Exp $
 // Author: Andrei Gheata   30/10/01
 
 /*************************************************************************
@@ -95,7 +95,7 @@ public:
    virtual TGeoNode   *FindNode(Double_t *point);
    virtual Double_t    FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext);
    virtual Int_t       GetDivAxis()      {return 1;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternX, 1)              // X division pattern
 };
@@ -120,7 +120,7 @@ public:
    virtual TGeoNode   *FindNode(Double_t *point); 
    virtual Double_t    FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext);
    virtual Int_t       GetDivAxis()      {return 2;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternY, 1)              // Y division pattern
 };
@@ -145,7 +145,7 @@ public:
    virtual TGeoNode   *FindNode(Double_t *point); 
    virtual Double_t    FindNextBoundary(Double_t *point, Double_t *dir, Int_t &indnext);
    virtual Int_t       GetDivAxis()      {return 3;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternZ, 1)              // Z division pattern
 };
@@ -171,7 +171,7 @@ public:
                            ((TGeoTranslation*)fMatrix)->SetDx(fStart+idiv*fStep+0.5*fStep);}
    virtual TGeoNode   *FindNode(Double_t *point);
    virtual Int_t       GetDivAxis()      {return 1;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternParaX, 1)              // Para X division pattern
 };
@@ -199,7 +199,7 @@ public:
    virtual void        cd(Int_t idiv);
    virtual TGeoNode   *FindNode(Double_t *point);
    virtual Int_t       GetDivAxis()      {return 2;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternParaY, 1)              // Para Y division pattern
 };
@@ -228,7 +228,7 @@ public:
    virtual void        cd(Int_t idiv);
    virtual TGeoNode   *FindNode(Double_t *point);
    virtual Int_t       GetDivAxis()      {return 3;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternParaZ, 1)              // Para Z division pattern
 };
@@ -259,7 +259,7 @@ public:
    virtual void        cd(Int_t idiv);
    virtual TGeoNode   *FindNode(Double_t *point);
    virtual Int_t       GetDivAxis()      {return 3;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternTrapZ, 1)              // Trap od Gtra Z division pattern
 };
@@ -284,7 +284,7 @@ public:
    virtual void        cd(Int_t idiv) {fCurrent=idiv;}
    virtual TGeoNode   *FindNode(Double_t *point); 
    virtual Int_t       GetDivAxis()      {return 1;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternCylR, 1)              // Cylindrical R division pattern
 };
@@ -319,7 +319,7 @@ public:
    virtual void        cd(Int_t idiv);
    virtual TGeoNode   *FindNode(Double_t *point); 
    virtual Int_t       GetDivAxis()      {return 2;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternCylPhi, 1)              // Cylindrical phi division pattern
 };
@@ -343,7 +343,7 @@ public:
    virtual void        cd(Int_t idiv) {fCurrent=idiv;}
    virtual TGeoNode   *FindNode(Double_t *point); 
    virtual Int_t       GetDivAxis()      {return 1;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternSphR, 1)              // spherical R division pattern
 };
@@ -370,7 +370,7 @@ public:
    virtual void        cd(Int_t idiv) {fCurrent=idiv;}
    virtual TGeoNode   *FindNode(Double_t *point); 
    virtual Int_t       GetDivAxis()      {return 2;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternSphTheta, 1)              // spherical theta division pattern
 
@@ -396,7 +396,7 @@ public:
    virtual void        cd(Int_t idiv) {fCurrent=idiv;}
    virtual TGeoNode   *FindNode(Double_t *point); 
    virtual Int_t       GetDivAxis()      {return 3;}
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGeoPatternSphPhi, 1)              // Spherical phi division pattern
 };
diff --git a/geom/inc/TGeoPcon.h b/geom/inc/TGeoPcon.h
index 6c41e699da1e06f2554e33f8bf46f025e20cb58e..6c08984e8d817dcc6b57121c90776560f39b72a5 100644
--- a/geom/inc/TGeoPcon.h
+++ b/geom/inc/TGeoPcon.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoPcon.h,v 1.22 2005/11/18 16:07:58 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoPcon.h,v 1.23 2006/05/23 04:47:37 brun Exp $
 // Author: Andrei Gheata   24/10/01
 
 /*************************************************************************
@@ -92,7 +92,7 @@ public:
    Double_t             &Z(Int_t ipl) {return fZ[ipl];}
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
    Double_t              SafetyToSegment(Double_t *point, Int_t ipl, Bool_t in=kTRUE, Double_t safmin=TGeoShape::Big()) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
    virtual void          SetPoints(Float_t *points) const;
diff --git a/geom/inc/TGeoPgon.h b/geom/inc/TGeoPgon.h
index 16e6e16e5632b3794ef60a98d9cd9c8977262b92..ecd6c11357aad78dbc3cbc5bb337a2a570d57c69 100644
--- a/geom/inc/TGeoPgon.h
+++ b/geom/inc/TGeoPgon.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoPgon.h,v 1.22 2005/11/17 13:17:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoPgon.h,v 1.23 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   31/01/02
 
 /*************************************************************************
@@ -75,7 +75,7 @@ public:
    virtual TBuffer3D    *MakeBuffer3D() const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
    Double_t              SafetyToSegment(Double_t *point, Int_t ipl, Int_t iphi, Bool_t in, Double_t safphi, Double_t safmin=TGeoShape::Big()) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
    virtual void          SetPoints(Float_t *points) const;
diff --git a/geom/inc/TGeoScaledShape.h b/geom/inc/TGeoScaledShape.h
index c39e87cc85cb98daf72cf08a31168e8818cf708e..c8483b2d566e61764284719621d803ca4152c3a1 100644
--- a/geom/inc/TGeoScaledShape.h
+++ b/geom/inc/TGeoScaledShape.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoScaledShape.h,v 1.1 2005/10/03 06:54:51 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoScaledShape.h,v 1.2 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   26/09/05
    
 /*************************************************************************
@@ -54,7 +54,7 @@ public:
    virtual Bool_t        IsCylType() const {return fShape->IsCylType();}
    virtual TBuffer3D    *MakeBuffer3D() const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    virtual void          SetPoints(Double_t *points) const;
    virtual void          SetPoints(Float_t *points) const;
    virtual void          SetSegsAndPols(TBuffer3D &buffer) const;
diff --git a/geom/inc/TGeoShapeAssembly.h b/geom/inc/TGeoShapeAssembly.h
index 34852f5a30fe93c2ecd4baf01e26a70f51840027..3c268090cc21c0a437e6619a835ab2426bb991db 100644
--- a/geom/inc/TGeoShapeAssembly.h
+++ b/geom/inc/TGeoShapeAssembly.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoShapeAssembly.h,v 1.1 2005/06/13 12:17:31 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoShapeAssembly.h,v 1.2 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   02/06/05
 
 /*************************************************************************
@@ -54,7 +54,7 @@ public:
    virtual void          InspectShape() const;
    virtual Bool_t        IsCylType() const {return kFALSE;}
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    virtual void          SetPoints(Double_t *points) const;
    virtual void          SetPoints(Float_t *points) const;
    virtual void          SetSegsAndPols(TBuffer3D &buff) const;
diff --git a/geom/inc/TGeoSphere.h b/geom/inc/TGeoSphere.h
index d8fdd5fe541e50beb3bcd8e7ced115b84eae07c6..5d1268247d181c17e55c01fb14cfb46e1c8fb168 100644
--- a/geom/inc/TGeoSphere.h
+++ b/geom/inc/TGeoSphere.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoSphere.h,v 1.22 2005/11/17 13:17:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoSphere.h,v 1.23 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   31/01/02
 
 /*************************************************************************
@@ -83,7 +83,7 @@ public:
    Bool_t                IsPointInside(Double_t *point, Bool_t checkR=kTRUE, Bool_t checkTh=kTRUE, Bool_t checkPh=kTRUE) const;
    virtual TBuffer3D    *MakeBuffer3D() const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetSphDimensions(Double_t rmin, Double_t rmax, Double_t theta1,
                                        Double_t theta2, Double_t phi1, Double_t phi2);
    virtual void          SetNumberOfDivisions(Int_t p);
diff --git a/geom/inc/TGeoTorus.h b/geom/inc/TGeoTorus.h
index 5cb1ac58e41d30296bdaf2fb2efa6e2acb7ca28f..3e8de22561f40e246ed89e59eaf697a4ddb22ce8 100644
--- a/geom/inc/TGeoTorus.h
+++ b/geom/inc/TGeoTorus.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TGeoTorus.h,v 1.12 2005/11/17 13:17:54 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TGeoTorus.h,v 1.13 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   28/07/03
 
 /*************************************************************************
@@ -82,7 +82,7 @@ public:
    virtual Bool_t        IsCylType() const {return kTRUE;}
    virtual TBuffer3D    *MakeBuffer3D() const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetTorusDimensions(Double_t r, Double_t rmin, Double_t rmax, Double_t phi1, Double_t dphi);
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
diff --git a/geom/inc/TGeoTrd1.h b/geom/inc/TGeoTrd1.h
index aa01fdb77e6622ca761805f35cdef33effc23e47..3351da1d7e7de5e6950622c99e079cb900569e65 100644
--- a/geom/inc/TGeoTrd1.h
+++ b/geom/inc/TGeoTrd1.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoTrd1.h,v 1.14 2005/11/17 13:17:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoTrd1.h,v 1.15 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   24/10/01
 
 /*************************************************************************
@@ -70,7 +70,7 @@ public:
    virtual void          InspectShape() const;
    virtual Bool_t        IsCylType() const {return kFALSE;}
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
    virtual void          SetPoints(Float_t *points) const;
diff --git a/geom/inc/TGeoTrd2.h b/geom/inc/TGeoTrd2.h
index 88adabe1a62252bc99ba02c5a1996fbe461dcf2d..45ad633cc7063a497ae53d4e8d8b4268cd6d4d2f 100644
--- a/geom/inc/TGeoTrd2.h
+++ b/geom/inc/TGeoTrd2.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoTrd2.h,v 1.14 2005/11/17 13:17:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoTrd2.h,v 1.15 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   31/01/02
 
 /*************************************************************************
@@ -72,7 +72,7 @@ public:
    virtual void          InspectShape() const;
    virtual Bool_t        IsCylType() const {return kFALSE;}
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
    virtual void          SetPoints(Float_t *points) const;
diff --git a/geom/inc/TGeoTube.h b/geom/inc/TGeoTube.h
index 1b5d79b1442cc3bd0a77825dcfd0099f1c9859b5..11d8faacfd8635ddc8f617a95633ccad20463140 100644
--- a/geom/inc/TGeoTube.h
+++ b/geom/inc/TGeoTube.h
@@ -1,4 +1,4 @@
-// @(#)root/base:$Name:  $:$Id: TGeoTube.h,v 1.25 2005/11/17 13:17:54 brun Exp $
+// @(#)root/base:$Name:  $:$Id: TGeoTube.h,v 1.26 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   24/10/01
 
 /*************************************************************************
@@ -77,7 +77,7 @@ public:
    virtual TBuffer3D    *MakeBuffer3D() const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
    static  Double_t      SafetyS(Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, Int_t skipz=0);
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetTubeDimensions(Double_t rmin, Double_t rmax, Double_t dz);
    virtual void          SetDimensions(Double_t *param);
    virtual void          SetPoints(Double_t *points) const;
@@ -147,7 +147,7 @@ public:
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
    static  Double_t      SafetyS(Double_t *point, Bool_t in, Double_t rmin, Double_t rmax, Double_t dz, 
                                  Double_t phi1, Double_t phi2, Int_t skipz=0);
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetTubsDimensions(Double_t rmin, Double_t rmax, Double_t dz,
                                        Double_t phi1, Double_t phi2);
    virtual void          SetDimensions(Double_t *param);
@@ -206,7 +206,7 @@ public:
    Double_t              GetZcoord(Double_t xc, Double_t yc, Double_t zc) const;
    virtual void          InspectShape() const;
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetCtubDimensions(Double_t rmin, Double_t rmax, Double_t dz,
                                        Double_t phi1, Double_t phi2, Double_t lx, Double_t ly, Double_t lz,
                                        Double_t tx, Double_t ty, Double_t tz);
diff --git a/geom/inc/TGeoVolume.h b/geom/inc/TGeoVolume.h
index a31a24c17b2aee986bdacfca403d3fccfaf503aa..7b531103937f79d4500ef1b4a8fbe7b51f2f89b4 100644
--- a/geom/inc/TGeoVolume.h
+++ b/geom/inc/TGeoVolume.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name: v5-11-02 $:$Id: TGeoVolume.h,v 1.48 2006/03/24 15:11:23 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoVolume.h,v 1.49 2006/05/23 04:47:37 brun Exp $
 // Author: Andrei Gheata   30/05/02
 
 /*************************************************************************
@@ -189,7 +189,7 @@ public:
    void            Raytrace(Bool_t flag=kTRUE); // *TOGGLE* *GETTER=IsRaytracing
    void            RemoveNode(TGeoNode *node);
    void            SaveAs(const char *filename); // *MENU*
-   virtual void    SavePrimitive(ofstream &out, Option_t *option);
+   virtual void    SavePrimitive(ostream &out, Option_t *option = "");
    void            SelectVolume(Bool_t clear = kFALSE);
    void            SetActivity(Bool_t flag=kTRUE) {TGeoAtt::SetActivity(flag);}
    void            SetActiveDaughters(Bool_t flag=kTRUE) {TGeoAtt::SetActiveDaughters(flag);}
diff --git a/geom/inc/TGeoXtru.h b/geom/inc/TGeoXtru.h
index 36ddcfac0584e0e9f9be7967f438b87571c66d6c..7b1938242b798fac53fefac4ebd121d9dd52ae33 100644
--- a/geom/inc/TGeoXtru.h
+++ b/geom/inc/TGeoXtru.h
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoXtru.h,v 1.13 2005/11/18 16:07:58 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoXtru.h,v 1.14 2006/05/23 04:47:37 brun Exp $
 // Author: Mihaela Gheata   24/01/04
 
 /*************************************************************************
@@ -94,7 +94,7 @@ public:
    virtual TBuffer3D    *MakeBuffer3D() const;
    Double_t             &Z(Int_t ipl) {return fZ[ipl];}
    virtual Double_t      Safety(Double_t *point, Bool_t in=kTRUE) const;
-   virtual void          SavePrimitive(ofstream &out, Option_t *option);
+   virtual void          SavePrimitive(ostream &out, Option_t *option = "");
    void                  SetCurrentZ(Double_t z, Int_t iz);
    void                  SetCurrentVertices(Double_t x0, Double_t y0, Double_t scale);
    virtual void          SetDimensions(Double_t *param);
diff --git a/geom/src/TGeoArb8.cxx b/geom/src/TGeoArb8.cxx
index cb9906d752cc2826e1cea963352f60036985a485..49d0ffa141689b42df4c022c5b9ab80093f7e85b 100644
--- a/geom/src/TGeoArb8.cxx
+++ b/geom/src/TGeoArb8.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoArb8.cxx,v 1.49 2006/05/23 04:47:37 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoArb8.cxx,v 1.50 2006/05/24 17:11:54 brun Exp $
 // Author: Andrei Gheata   31/01/02
 
 /*************************************************************************
@@ -865,7 +865,7 @@ Double_t TGeoArb8::SafetyToFace(Double_t *point, Int_t iseg, Bool_t in) const
 }
    
 //_____________________________________________________________________________
-void TGeoArb8::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoArb8::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
@@ -1376,7 +1376,7 @@ Double_t TGeoTrap::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoTrap::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoTrap::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
@@ -1593,7 +1593,7 @@ TGeoShape *TGeoGtra::GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix * /*mat*/
 }
 
 //_____________________________________________________________________________
-void TGeoGtra::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoGtra::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;  
diff --git a/geom/src/TGeoBBox.cxx b/geom/src/TGeoBBox.cxx
index 418862043deaca8e6bc1fd949c08be86881da7d8..5031628692f0a6759796bbbebed125d9c3c93b77 100644
--- a/geom/src/TGeoBBox.cxx
+++ b/geom/src/TGeoBBox.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoBBox.cxx,v 1.48 2005/11/18 16:07:58 brun Exp $// Author: Andrei Gheata   24/10/01
+// @(#)root/geom:$Name:  $:$Id: TGeoBBox.cxx,v 1.49 2006/04/06 09:37:14 brun Exp $// Author: Andrei Gheata   24/10/01
 
 // Contains() and DistFromOutside/Out() implemented by Mihaela Gheata
 
@@ -586,7 +586,7 @@ Double_t TGeoBBox::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoBBox::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoBBox::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoBoolNode.cxx b/geom/src/TGeoBoolNode.cxx
index 3889e665060f8b17c89b339111dd593635e44dea..46ae8d485d8233c18bab3c8ef45d8874f00dddb2 100644
--- a/geom/src/TGeoBoolNode.cxx
+++ b/geom/src/TGeoBoolNode.cxx
@@ -1,4 +1,4 @@
-// @(#):$Name:  $:$Id: TGeoBoolNode.cxx,v 1.25 2006/01/25 10:17:30 brun Exp $
+// @(#):$Name:  $:$Id: TGeoBoolNode.cxx,v 1.26 2006/03/24 15:11:23 brun Exp $
 // Author: Andrei Gheata   30/05/02
 // TGeoBoolNode::Contains and parser implemented by Mihaela Gheata
 
@@ -204,7 +204,7 @@ void TGeoBoolNode::RegisterMatrices()
    if (fRight->IsComposite()) ((TGeoCompositeShape*)fRight)->GetBoolNode()->RegisterMatrices();
 }
 //_____________________________________________________________________________
-void TGeoBoolNode::SavePrimitive(ofstream &out, Option_t *option)
+void TGeoBoolNode::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    fLeft->SavePrimitive(out,option);
@@ -526,7 +526,7 @@ Double_t TGeoUnion::Safety(Double_t *point, Bool_t) const
 }   
 
 //_____________________________________________________________________________
-void TGeoUnion::SavePrimitive(ofstream &out, Option_t *option)
+void TGeoUnion::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    TGeoBoolNode::SavePrimitive(out,option);
@@ -806,7 +806,7 @@ Double_t TGeoSubtraction::Safety(Double_t *point, Bool_t) const
    return saf1;
 }   
 //_____________________________________________________________________________
-void TGeoSubtraction::SavePrimitive(ofstream &out, Option_t *option)
+void TGeoSubtraction::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    TGeoBoolNode::SavePrimitive(out,option);
@@ -1168,7 +1168,7 @@ Double_t TGeoIntersection::Safety(Double_t *point, Bool_t) const
    return TMath::Max(saf1,saf2);
 }   
 //_____________________________________________________________________________
-void TGeoIntersection::SavePrimitive(ofstream &out, Option_t *option)
+void TGeoIntersection::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    TGeoBoolNode::SavePrimitive(out,option);
diff --git a/geom/src/TGeoCompositeShape.cxx b/geom/src/TGeoCompositeShape.cxx
index 97cf38a04c018ed8e30e49bbf1ee82a6e939e28b..2ffe3e6640291ea06d0f19146da14a963b607226 100644
--- a/geom/src/TGeoCompositeShape.cxx
+++ b/geom/src/TGeoCompositeShape.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoCompositeShape.cxx,v 1.34 2005/11/18 16:07:58 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoCompositeShape.cxx,v 1.35 2006/06/04 09:35:24 brun Exp $
 // Author: Andrei Gheata   31/01/02
 
 /*************************************************************************
@@ -386,7 +386,7 @@ Double_t TGeoCompositeShape::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoCompositeShape::SavePrimitive(ofstream &out, Option_t *option)
+void TGeoCompositeShape::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoCone.cxx b/geom/src/TGeoCone.cxx
index cf8593ca3f3ee6386a3884f021ef2ad049b7d019..d893e956b29ced99ef46043c088c6a63e1e55ae9 100644
--- a/geom/src/TGeoCone.cxx
+++ b/geom/src/TGeoCone.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoCone.cxx,v 1.54 2005/11/17 13:17:55 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoCone.cxx,v 1.55 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   31/01/02
 // TGeoCone::Contains() and DistFromInside() implemented by Mihaela Gheata
 
@@ -839,7 +839,7 @@ Double_t TGeoCone::SafetyS(Double_t *point, Bool_t in, Double_t dz, Double_t rmi
 }
 
 //_____________________________________________________________________________
-void TGeoCone::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoCone::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
@@ -2072,7 +2072,7 @@ Double_t TGeoConeSeg::SafetyS(Double_t *point, Bool_t in, Double_t dz, Double_t
 }
 
 //_____________________________________________________________________________
-void TGeoConeSeg::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoConeSeg::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoEltu.cxx b/geom/src/TGeoEltu.cxx
index e60a9be91f63204510f0c12ec395b60fe043a804..8818787397721a5ef1edfefd688e0865b0978087 100644
--- a/geom/src/TGeoEltu.cxx
+++ b/geom/src/TGeoEltu.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoEltu.cxx,v 1.27 2005/11/17 13:17:55 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoEltu.cxx,v 1.28 2005/11/18 16:07:58 brun Exp $
 // Author: Mihaela Gheata   05/06/02
 
 /*************************************************************************
@@ -382,7 +382,7 @@ Double_t TGeoEltu::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoEltu::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoEltu::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoHalfSpace.cxx b/geom/src/TGeoHalfSpace.cxx
index c5610fddd84fc73ff3773a77531722fbe47ed1e3..9a31a600909b153396fbccccc37ecae57867fb8d 100644
--- a/geom/src/TGeoHalfSpace.cxx
+++ b/geom/src/TGeoHalfSpace.cxx
@@ -1,4 +1,4 @@
-// @(#):$Name:  $:$Id: TGeoHalfSpace.cxx,v 1.8 2005/05/13 16:20:38 brun Exp $
+// @(#):$Name:  $:$Id: TGeoHalfSpace.cxx,v 1.9 2005/11/18 16:07:58 brun Exp $
 // Author: Mihaela Gheata   03/08/04
 
 /*************************************************************************
@@ -171,7 +171,7 @@ Double_t TGeoHalfSpace::Safety(Double_t *point, Bool_t /*in*/) const
 }
 
 //_____________________________________________________________________________
-void TGeoHalfSpace::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoHalfSpace::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoHype.cxx b/geom/src/TGeoHype.cxx
index 7d899ab4cfb1db257f048a6b435f0ac3d024dad7..2b58c65dd8e1edebb9b9875eea828c1bb2a914a0 100644
--- a/geom/src/TGeoHype.cxx
+++ b/geom/src/TGeoHype.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoHype.cxx,v 1.11 2005/11/17 13:17:55 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoHype.cxx,v 1.12 2005/11/18 16:07:58 brun Exp $
 // Author: Mihaela Gheata   20/11/04
 
 /*************************************************************************
@@ -729,7 +729,7 @@ Double_t TGeoHype::SafetyToHype(Double_t *point, Bool_t inner, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoHype::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoHype::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoMaterial.cxx b/geom/src/TGeoMaterial.cxx
index 8ebd5e5899763ce60b16fef12e274a4c964f9811..87fd5556b48e278ec2e82a00612f9e31363a3e75 100644
--- a/geom/src/TGeoMaterial.cxx
+++ b/geom/src/TGeoMaterial.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoMaterial.cxx,v 1.30 2006/05/26 09:09:59 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoMaterial.cxx,v 1.31 2006/06/11 12:56:48 brun Exp $
 // Author: Andrei Gheata   25/10/01
 
 /*************************************************************************
@@ -227,7 +227,7 @@ void TGeoMaterial::Print(const Option_t * /*option*/) const
 }
 
 //_____________________________________________________________________________
-void TGeoMaterial::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoMaterial::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TestBit(TGeoMaterial::kMatSavePrimitive)) return;
@@ -605,7 +605,7 @@ void TGeoMixture::Print(const Option_t * /*option*/) const
 }
 
 //_____________________________________________________________________________
-void TGeoMixture::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoMixture::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TestBit(TGeoMaterial::kMatSavePrimitive)) return;
diff --git a/geom/src/TGeoMatrix.cxx b/geom/src/TGeoMatrix.cxx
index 4cc61e51fcfa0d48ea90a462e694600aa9232e3f..53997f808aaf584bcf3248e793fe17996d5413aa 100644
--- a/geom/src/TGeoMatrix.cxx
+++ b/geom/src/TGeoMatrix.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoMatrix.cxx,v 1.55 2006/04/27 07:46:30 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoMatrix.cxx,v 1.56 2006/05/26 09:09:59 brun Exp $
 // Author: Andrei Gheata   25/10/01
 
 /*************************************************************************
@@ -709,7 +709,7 @@ void TGeoTranslation::MasterToLocalBomb(const Double_t *master, Double_t *local)
 }
 
 //_____________________________________________________________________________
-void TGeoTranslation::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoTranslation::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TestBit(kGeoSavePrimitive)) return;
@@ -959,7 +959,7 @@ void TGeoRotation::RotateZ(Double_t angle)
 }
 
 //_____________________________________________________________________________
-void TGeoRotation::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoRotation::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TestBit(kGeoSavePrimitive)) return;
@@ -1565,7 +1565,7 @@ void TGeoCombiTrans::RotateZ(Double_t angle)
 }   
 
 //_____________________________________________________________________________
-void TGeoCombiTrans::SavePrimitive(ofstream &out, Option_t *option)
+void TGeoCombiTrans::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TestBit(kGeoSavePrimitive)) return;
@@ -2176,7 +2176,7 @@ void TGeoHMatrix::RotateZ(Double_t angle)
 }
 
 //_____________________________________________________________________________
-void TGeoHMatrix::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoHMatrix::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoMedium.cxx b/geom/src/TGeoMedium.cxx
index 36e6faab379e7afea05bde14b69f68ed352e2f28..169383dfec1981af570034f52a24e983893cc031 100644
--- a/geom/src/TGeoMedium.cxx
+++ b/geom/src/TGeoMedium.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoMedium.cxx,v 1.8 2006/05/23 04:47:37 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoMedium.cxx,v 1.9 2006/05/24 17:11:54 brun Exp $
 // Author: Rene Brun   26/12/02
 
 /*************************************************************************
@@ -112,7 +112,7 @@ char *TGeoMedium::GetPointerName() const
 }    
 
 //_____________________________________________________________________________
-void TGeoMedium::SavePrimitive(ofstream &out, Option_t *option)
+void TGeoMedium::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TestBit(TGeoMedium::kMedSavePrimitive)) return;
diff --git a/geom/src/TGeoNode.cxx b/geom/src/TGeoNode.cxx
index d82eb53c5dc3a5471b4e89173095cae297b40f2b..5e07dcab8a816211282c8eda0d363ac8e2e66aee 100644
--- a/geom/src/TGeoNode.cxx
+++ b/geom/src/TGeoNode.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoNode.cxx,v 1.35 2006/05/24 17:11:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoNode.cxx,v 1.36 2006/06/02 16:00:43 brun Exp $
 // Author: Andrei Gheata   24/10/01
 
 /*************************************************************************
@@ -375,7 +375,7 @@ Int_t TGeoNode::FindNode(const TGeoNode *node, Int_t level)
 }
 
 //_____________________________________________________________________________
-void TGeoNode::SaveAttributes(ofstream &out)
+void TGeoNode::SaveAttributes(ostream &out)
 {
 // save attributes for this node
    if (IsVisStreamed()) return;
diff --git a/geom/src/TGeoPara.cxx b/geom/src/TGeoPara.cxx
index c924bfb3dd9dae08d8b3a8fed17c78e1bfb3591f..4d0e569b483233886e06454487316b89e8df2cbc 100644
--- a/geom/src/TGeoPara.cxx
+++ b/geom/src/TGeoPara.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoPara.cxx,v 1.28 2005/11/17 13:17:55 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoPara.cxx,v 1.29 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   31/01/02
 // TGeoPara::Contains() implemented by Mihaela Gheata
 
@@ -551,7 +551,7 @@ Double_t TGeoPara::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoPara::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPara::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoParaboloid.cxx b/geom/src/TGeoParaboloid.cxx
index 50bb7dc8350ccd0214defdca9eadde272ccbb69c..494582f2c4e0a026b36f3d4838945bd3256877b2 100644
--- a/geom/src/TGeoParaboloid.cxx
+++ b/geom/src/TGeoParaboloid.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoParaboloid.cxx,v 1.18 2005/11/17 13:17:55 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoParaboloid.cxx,v 1.19 2005/11/18 16:07:58 brun Exp $
 // Author: Mihaela Gheata   20/06/04
 
 /*************************************************************************
@@ -487,7 +487,7 @@ Int_t TGeoParaboloid::GetNmeshVertices() const
 }   
    
 //_____________________________________________________________________________
-void TGeoParaboloid::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoParaboloid::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoPatternFinder.cxx b/geom/src/TGeoPatternFinder.cxx
index 850c8351c8fdf4d9c144e8828687c5146e71f449..d4c8bc23e7901930b31a59167d3a770c59fbb833 100644
--- a/geom/src/TGeoPatternFinder.cxx
+++ b/geom/src/TGeoPatternFinder.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoPatternFinder.cxx,v 1.16 2006/05/24 17:11:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoPatternFinder.cxx,v 1.17 2006/06/13 12:11:45 brun Exp $
 // Author: Andrei Gheata   30/10/01
 
 /*************************************************************************
@@ -179,7 +179,7 @@ Double_t TGeoPatternX::FindNextBoundary(Double_t *point, Double_t *dir, Int_t &i
 }   
 
 //______________________________________________________________________________
-void TGeoPatternX::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternX::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 1;
@@ -270,7 +270,7 @@ Double_t TGeoPatternY::FindNextBoundary(Double_t *point, Double_t *dir, Int_t &i
 }   
 
 //______________________________________________________________________________
-void TGeoPatternY::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternY::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 2;
@@ -362,7 +362,7 @@ Double_t TGeoPatternZ::FindNextBoundary(Double_t *point, Double_t *dir, Int_t &i
 }   
 
 //______________________________________________________________________________
-void TGeoPatternZ::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternZ::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 3;
@@ -437,7 +437,7 @@ TGeoNode *TGeoPatternParaX::FindNode(Double_t *point)
 }
 
 //______________________________________________________________________________
-void TGeoPatternParaX::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternParaX::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 1;
@@ -522,7 +522,7 @@ TGeoNode *TGeoPatternParaY::FindNode(Double_t *point)
 }
 
 //______________________________________________________________________________
-void TGeoPatternParaY::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternParaY::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 2;
@@ -611,7 +611,7 @@ TGeoNode *TGeoPatternParaZ::FindNode(Double_t *point)
 }
 
 //______________________________________________________________________________
-void TGeoPatternParaZ::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternParaZ::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 3;
@@ -706,7 +706,7 @@ TGeoNode *TGeoPatternTrapZ::FindNode(Double_t *point)
 }
 
 //______________________________________________________________________________
-void TGeoPatternTrapZ::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternTrapZ::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 3;
@@ -774,7 +774,7 @@ TGeoNode *TGeoPatternCylR::FindNode(Double_t *point)
 }
 
 //______________________________________________________________________________
-void TGeoPatternCylR::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternCylR::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 1;
@@ -875,7 +875,7 @@ TGeoNode *TGeoPatternCylPhi::FindNode(Double_t *point)
 }
 
 //______________________________________________________________________________
-void TGeoPatternCylPhi::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternCylPhi::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 2;
@@ -932,7 +932,7 @@ TGeoNode *TGeoPatternSphR::FindNode(Double_t * /*point*/)
 }
 
 //______________________________________________________________________________
-void TGeoPatternSphR::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternSphR::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 1;
@@ -989,7 +989,7 @@ TGeoNode *TGeoPatternSphTheta::FindNode(Double_t * /*point*/)
 }
 
 //______________________________________________________________________________
-void TGeoPatternSphTheta::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternSphTheta::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 2;
@@ -1043,7 +1043,7 @@ TGeoNode *TGeoPatternSphPhi::FindNode(Double_t * /*point*/)
 }
 
 //______________________________________________________________________________
-void TGeoPatternSphPhi::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPatternSphPhi::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    Int_t iaxis = 3;
diff --git a/geom/src/TGeoPcon.cxx b/geom/src/TGeoPcon.cxx
index 1918c413c5d2472d259db9269565b752ba017a88..0427f4c7afd036bab2d9dcc1dd0d73042dea8231 100644
--- a/geom/src/TGeoPcon.cxx
+++ b/geom/src/TGeoPcon.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoPcon.cxx,v 1.55 2006/05/24 17:11:54 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoPcon.cxx,v 1.56 2006/06/19 14:58:48 brun Exp $
 // Author: Andrei Gheata   24/10/01
 // TGeoPcon::Contains() implemented by Mihaela Gheata
 
@@ -1074,7 +1074,7 @@ Double_t TGeoPcon::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoPcon::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPcon::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoPgon.cxx b/geom/src/TGeoPgon.cxx
index e4edec9a9885cf8cda6f66fb3a772c1c56a43ca0..caeaa3677513a1410e74b437ff68eaac3d71781c 100644
--- a/geom/src/TGeoPgon.cxx
+++ b/geom/src/TGeoPgon.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoPgon.cxx,v 1.57 2005/11/23 14:13:27 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoPgon.cxx,v 1.58 2006/04/05 09:36:06 brun Exp $
 // Author: Andrei Gheata   31/01/02
 // TGeoPgon::Contains() implemented by Mihaela Gheata
 
@@ -1651,7 +1651,7 @@ Double_t TGeoPgon::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoPgon::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoPgon::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoScaledShape.cxx b/geom/src/TGeoScaledShape.cxx
index 2765a5b07ad875d6d0afbde770fbce4ea5f4997f..674cf5c7a18cf9804f4dc549aa31e46531b91356 100644
--- a/geom/src/TGeoScaledShape.cxx
+++ b/geom/src/TGeoScaledShape.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoScaledShape.cxx,v 1.2 2005/10/03 07:02:51 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoScaledShape.cxx,v 1.3 2005/11/18 16:07:58 brun Exp $
 // Author: Andrei Gheata   26/09/05
 
 /*************************************************************************
@@ -248,7 +248,7 @@ Double_t TGeoScaledShape::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoScaledShape::SavePrimitive(ofstream & /*out*/, Option_t * /*option*/)
+void TGeoScaledShape::SavePrimitive(ostream & /*out*/, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
 }
diff --git a/geom/src/TGeoShapeAssembly.cxx b/geom/src/TGeoShapeAssembly.cxx
index 9395679d4272a87e3f67671303dd368f44d3e7dc..bc7a8af8d2da83383addc1c0f3c561a46b546f0a 100644
--- a/geom/src/TGeoShapeAssembly.cxx
+++ b/geom/src/TGeoShapeAssembly.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoShapeAssembly.cxx,v 1.5 2006/03/14 15:16:35 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoShapeAssembly.cxx,v 1.6 2006/04/10 08:38:43 brun Exp $
 // Author: Andrei Gheata   02/06/05
 
 /*************************************************************************
@@ -317,7 +317,7 @@ Double_t TGeoShapeAssembly::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoShapeAssembly::SavePrimitive(ofstream & /*out*/, Option_t * /*option*/)
+void TGeoShapeAssembly::SavePrimitive(ostream & /*out*/, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
 }
diff --git a/geom/src/TGeoSphere.cxx b/geom/src/TGeoSphere.cxx
index a04f40c667cd75d3488fac24700477a753925976..174e97b6ed3acb2d980ccd75a61b4872c15441ec 100644
--- a/geom/src/TGeoSphere.cxx
+++ b/geom/src/TGeoSphere.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoSphere.cxx,v 1.48 2005/11/18 16:07:58 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoSphere.cxx,v 1.49 2005/11/21 09:31:47 brun Exp $
 // Author: Andrei Gheata   31/01/02
 // TGeoSphere::Contains() DistFromOutside/Out() implemented by Mihaela Gheata
 
@@ -1336,7 +1336,7 @@ Double_t TGeoSphere::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoSphere::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoSphere::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoTorus.cxx b/geom/src/TGeoTorus.cxx
index ba176ee6b6a6272c7e2aba4df42e08252ba2fe37..f2e3a1ae69781412b66a9ca10f3a0e53961e913b 100644
--- a/geom/src/TGeoTorus.cxx
+++ b/geom/src/TGeoTorus.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoTorus.cxx,v 1.31 2006/02/13 12:12:32 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoTorus.cxx,v 1.32 2006/03/03 14:26:15 brun Exp $
 // Author: Andrei Gheata   28/07/03
 
 /*************************************************************************
@@ -724,7 +724,7 @@ Double_t TGeoTorus::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoTorus::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoTorus::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;  
diff --git a/geom/src/TGeoTrd1.cxx b/geom/src/TGeoTrd1.cxx
index 429ffde2635c92a65b61373c228488419e7ce8c7..8e710b9444fa7b846f9b0a09e32fa187ea6229ec 100644
--- a/geom/src/TGeoTrd1.cxx
+++ b/geom/src/TGeoTrd1.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoTrd1.cxx,v 1.33 2005/11/17 13:17:55 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoTrd1.cxx,v 1.34 2005/11/18 16:07:59 brun Exp $
 // Author: Andrei Gheata   24/10/01
 // TGeoTrd1::Contains() and DistFromInside() implemented by Mihaela Gheata
 
@@ -618,7 +618,7 @@ Double_t TGeoTrd1::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoTrd1::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoTrd1::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoTrd2.cxx b/geom/src/TGeoTrd2.cxx
index a982098bf7fdd1a827a3163248ba798edd90eb6e..9375caff83938939396730b4fe4a5499d2e8a917 100644
--- a/geom/src/TGeoTrd2.cxx
+++ b/geom/src/TGeoTrd2.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoTrd2.cxx,v 1.33 2005/11/17 13:17:55 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoTrd2.cxx,v 1.34 2005/11/18 16:07:59 brun Exp $
 // Author: Andrei Gheata   31/01/02
 // TGeoTrd2::Contains() and DistFromInside() implemented by Mihaela Gheata
 
@@ -644,7 +644,7 @@ Double_t TGeoTrd2::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoTrd2::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoTrd2::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoTube.cxx b/geom/src/TGeoTube.cxx
index f9bffcff313ba510558c1f58531c4b3408fadfdc..e7c7a9ec556b55163fb71374f8a8cc8f703c33a6 100644
--- a/geom/src/TGeoTube.cxx
+++ b/geom/src/TGeoTube.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoTube.cxx,v 1.66 2005/11/18 16:07:59 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoTube.cxx,v 1.67 2006/05/26 09:09:59 brun Exp $
 // Author: Andrei Gheata   24/10/01
 // TGeoTube::Contains() and DistFromInside/In() implemented by Mihaela Gheata
 
@@ -841,7 +841,7 @@ Double_t TGeoTube::SafetyS(Double_t *point, Bool_t in, Double_t rmin, Double_t r
 }
 
 //_____________________________________________________________________________
-void TGeoTube::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoTube::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
@@ -1926,7 +1926,7 @@ Double_t TGeoTubeSeg::SafetyS(Double_t *point, Bool_t in, Double_t rmin, Double_
 }
 
 //_____________________________________________________________________________
-void TGeoTubeSeg::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoTubeSeg::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
@@ -2706,7 +2706,7 @@ void TGeoCtub::SetCtubDimensions(Double_t rmin, Double_t rmax, Double_t dz, Doub
 }
 
 //_____________________________________________________________________________
-void TGeoCtub::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoCtub::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;
diff --git a/geom/src/TGeoVolume.cxx b/geom/src/TGeoVolume.cxx
index 66af45016f48fc5da7c40cccb616cb9627883c37..6e2231a2eab06ed312d490de558846c8548a4d45 100644
--- a/geom/src/TGeoVolume.cxx
+++ b/geom/src/TGeoVolume.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoVolume.cxx,v 1.84 2006/05/26 16:26:25 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoVolume.cxx,v 1.85 2006/06/11 12:56:48 brun Exp $
 // Author: Andrei Gheata   30/05/02
 // Divide(), CheckOverlaps() implemented by Mihaela Gheata
 
@@ -1085,7 +1085,7 @@ void TGeoVolume::SaveAs(const char *filename)
 }   
 
 //______________________________________________________________________________
-void TGeoVolume::SavePrimitive(ofstream &out, Option_t *option)
+void TGeoVolume::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a primitive as a C++ statement(s) on output stream "out".
    out.precision(6);
diff --git a/geom/src/TGeoXtru.cxx b/geom/src/TGeoXtru.cxx
index cb4f0b60e6518f636cfd2113ae01ec546505ef2e..e4c381e43cb7681f5afe5114ce9f7f38c913546e 100644
--- a/geom/src/TGeoXtru.cxx
+++ b/geom/src/TGeoXtru.cxx
@@ -1,4 +1,4 @@
-// @(#)root/geom:$Name:  $:$Id: TGeoXtru.cxx,v 1.32 2006/05/23 04:47:37 brun Exp $
+// @(#)root/geom:$Name:  $:$Id: TGeoXtru.cxx,v 1.33 2006/05/24 17:11:54 brun Exp $
 // Author: Mihaela Gheata   24/01/04
 
 /*************************************************************************
@@ -932,7 +932,7 @@ Double_t TGeoXtru::Safety(Double_t *point, Bool_t in) const
 }
 
 //_____________________________________________________________________________
-void TGeoXtru::SavePrimitive(ofstream &out, Option_t * /*option*/)
+void TGeoXtru::SavePrimitive(ostream &out, Option_t * /*option*/ /*= ""*/)
 {
 // Save a primitive as a C++ statement(s) on output stream "out".
    if (TObject::TestBit(kGeoSavePrimitive)) return;   
diff --git a/gpad/inc/TButton.h b/gpad/inc/TButton.h
index 981f0b30b79cfe9925080ff6defbba229a42b40b..e209d5124dbfbf1700fc9f4c3c7857eda7a2c4c5 100644
--- a/gpad/inc/TButton.h
+++ b/gpad/inc/TButton.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TButton.h,v 1.2 2000/06/13 11:25:02 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TButton.h,v 1.3 2000/11/21 20:19:45 brun Exp $
 // Author: Rene Brun   01/07/96
 
 /*************************************************************************
@@ -52,7 +52,7 @@ public:
    virtual void  Paint(Option_t *option="");
    virtual void  PaintModified();
    virtual void  Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetBorderMode(Short_t bordermode) { fBorderMode = bordermode; }
    virtual void  SetFraming(Bool_t f=1);
    virtual Bool_t GetFraming() { return fFraming; };
diff --git a/gpad/inc/TCanvas.h b/gpad/inc/TCanvas.h
index 2ac419fa88bf3c1795fe99f60ef60fd8342df26b..ed1fbbe6c7d7d8a07bf0d8c8aba6e33ae29f8efe 100644
--- a/gpad/inc/TCanvas.h
+++ b/gpad/inc/TCanvas.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TCanvas.h,v 1.36 2005/11/17 14:43:17 couet Exp $
+// @(#)root/gpad:$Name:  $:$Id: TCanvas.h,v 1.37 2006/03/28 16:43:04 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -195,7 +195,7 @@ public:
    virtual void      Resize(Option_t *option="");
    void              ResizeOpaque(Int_t set=1);
    void              SaveSource(const char *filename="", Option_t *option="");
-   void              SavePrimitive(ofstream &out, Option_t *option);
+   void              SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      SetCursor(ECursor cursor);
    virtual void      SetDoubleBuffer(Int_t mode=1);
    virtual void      SetFixedAspectRatio(Bool_t fixed = kTRUE);  // *TOGGLE*
diff --git a/gpad/inc/TDrawPanelHist.h b/gpad/inc/TDrawPanelHist.h
index ef374af30a688a2627bc796793cfb316e6489674..e838c821eb9f2dd4fbc05962ed8348a75f1f419b 100644
--- a/gpad/inc/TDrawPanelHist.h
+++ b/gpad/inc/TDrawPanelHist.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TDrawPanelHist.h,v 1.4 2004/07/20 07:23:34 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TDrawPanelHist.h,v 1.5 2005/11/23 11:03:12 couet Exp $
 // Author: Rene Brun   26/11/96
 
 /*************************************************************************
@@ -47,7 +47,7 @@ public:
    virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
    TObject       *GetHistogram() const {return fHistogram;}
    virtual void  RecursiveRemove(TObject *obj);
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetDefaults();
    virtual void  SetSame();
 
diff --git a/gpad/inc/TFitPanel.h b/gpad/inc/TFitPanel.h
index 61b04cb0f00c8f448353901b4be8657ab4b1d4e6..84dc1232c271ec6fff3ee528a39f9c12816d49a4 100644
--- a/gpad/inc/TFitPanel.h
+++ b/gpad/inc/TFitPanel.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TFitPanel.h,v 1.4 2004/07/20 07:23:34 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TFitPanel.h,v 1.5 2005/11/23 11:03:12 couet Exp $
 // Author: Rene Brun   24/11/96
 
 /*************************************************************************
@@ -49,7 +49,7 @@ public:
    virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
    TObject       *GetObjectFit() const {return fObjectFit;}
    virtual void  RecursiveRemove(TObject *obj);
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetDefaults();
    virtual void  SetFunction(const char *function);
    virtual void  SetSame();
diff --git a/gpad/inc/TFitPanelGraph.h b/gpad/inc/TFitPanelGraph.h
index f4d2ae1dd5fc45f809a9fe1e2b00c4035c1ffa98..ee20f4b3e0c96deae4284ffa989fd4f1859d7e07 100644
--- a/gpad/inc/TFitPanelGraph.h
+++ b/gpad/inc/TFitPanelGraph.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TFitPanelGraph.h,v 1.2 2004/07/20 07:23:34 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TFitPanelGraph.h,v 1.3 2005/11/23 11:03:12 couet Exp $
 // Author: Rene Brun   28/11/96
 
 /*************************************************************************
@@ -37,7 +37,7 @@ public:
    TFitPanelGraph(const char *name, const char *title, UInt_t ww, UInt_t wh, const TVirtualPad *pad, const TObject *obj);
    virtual ~TFitPanelGraph();
    virtual void  Apply(const char *action="");
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TFitPanelGraph,1)  //Class used to control graphs fit panel
 };
diff --git a/gpad/inc/TGroupButton.h b/gpad/inc/TGroupButton.h
index 315f4da4022bae067fd3c6cbc0d2898bb3a24624..3428e553a995383da2422bc10afefe0cb9fe2292 100644
--- a/gpad/inc/TGroupButton.h
+++ b/gpad/inc/TGroupButton.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TGroupButton.h,v 1.1.1.1 2000/05/16 17:00:41 rdm Exp $
+// @(#)root/gpad:$Name:  $:$Id: TGroupButton.h,v 1.2 2000/06/13 11:27:03 brun Exp $
 // Author: Rene Brun   01/07/96
 
 /*************************************************************************
@@ -44,7 +44,7 @@ public:
    virtual void  DisplayColorTable(const char *action, Double_t x0, Double_t y0, Double_t wc, Double_t hc);
    virtual void  ExecuteAction();
    virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    ClassDef(TGroupButton,0)  //A user interface button in a group of buttons.
 };
 
diff --git a/gpad/inc/TPad.h b/gpad/inc/TPad.h
index 0126d2d930003c010b63348c82aa45527d1c559c..b639a299878a37e764de9924d5d10b68e67a9c0f 100644
--- a/gpad/inc/TPad.h
+++ b/gpad/inc/TPad.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TPad.h,v 1.44 2006/04/07 09:37:14 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TPad.h,v 1.45 2006/06/14 14:21:56 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -126,7 +126,7 @@ protected:
    void          PaintBorder(Color_t color, Bool_t tops);
    virtual void  PaintBorderPS(Double_t xl,Double_t yl,Double_t xt,Double_t yt,Int_t bmode,Int_t bsize,Int_t dark,Int_t light);
    void          PaintDate();
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetBatch(Bool_t batch=kTRUE);
 
 private:
diff --git a/gpad/inc/TPaveClass.h b/gpad/inc/TPaveClass.h
index cd476408254863e0a05f6a8f7ea085855ad19c6a..e6be6b6bdebe8e323b841de37783542107df577a 100644
--- a/gpad/inc/TPaveClass.h
+++ b/gpad/inc/TPaveClass.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TPaveClass.h,v 1.4 2002/10/31 07:27:34 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TPaveClass.h,v 1.5 2005/11/23 11:03:12 couet Exp $
 // Author: Rene Brun   06/08/99
 
 /*************************************************************************
@@ -43,7 +43,7 @@ public:
    virtual void  DrawClasses(const char *classes="this");   // *MENU*
    TClassTree   *GetClassTree() const {return fClassTree;}
    virtual void  SaveAs(const char *filename=""); // *MENU*
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetClasses(const char *classes="this", Option_t *option="ID");   // *MENU*
    virtual void  ShowClassesUsedBy(const char *classes="this");  // *MENU*
    virtual void  ShowClassesUsing(const char *classes="this");   // *MENU*
diff --git a/gpad/inc/TSlider.h b/gpad/inc/TSlider.h
index bc93bc9692718e01f9854f548465ecc2c355585a..e0ef8eff319e7e09c8b4e996fc2acf4ffa2ade4e 100644
--- a/gpad/inc/TSlider.h
+++ b/gpad/inc/TSlider.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TSlider.h,v 1.3 2000/12/13 15:13:49 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TSlider.h,v 1.4 2001/01/23 21:09:08 brun Exp $
 // Author: Rene Brun   23/11/96
 
 /*************************************************************************
@@ -49,7 +49,7 @@ public:
    Double_t      GetMaximum() const {return fMaximum;}
    virtual const char *GetMethod() const { return fMethod.Data(); }
    virtual void  Paint(Option_t *option="");
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetMethod(const char *method) { fMethod=method; } // *MENU*
    void          SetObject(TObject *obj=0) {fObject=obj;}
    virtual void  SetMinimum(Double_t min=0) {fMinimum=min;}
diff --git a/gpad/inc/TSliderBox.h b/gpad/inc/TSliderBox.h
index d5141ca0f91addd3e961590b70305733bae15c2b..9e5e1c84d787cf3935b0454c61b2a4ffb04a5db8 100644
--- a/gpad/inc/TSliderBox.h
+++ b/gpad/inc/TSliderBox.h
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TSliderBox.h,v 1.2 2000/06/13 12:14:34 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TSliderBox.h,v 1.3 2006/05/23 04:47:37 brun Exp $
 // Author: Rene Brun   23/11/96
 
 /*************************************************************************
@@ -45,7 +45,7 @@ public:
               Color_t color=18, Short_t bordersize=2 ,Short_t bordermode=-1);
    virtual ~TSliderBox();
    virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    void          SetSlider(TSlider*slider) {fSlider=slider;}
 
    ClassDef(TSliderBox,1)  //The moving box of a TSlider
diff --git a/gpad/src/TButton.cxx b/gpad/src/TButton.cxx
index 47aa2b78bc51d563dba549dcc71b7d15c674dccc..b95e90034d029bae87ccce1e7f459f8e28bba8c3 100644
--- a/gpad/src/TButton.cxx
+++ b/gpad/src/TButton.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TButton.cxx,v 1.11 2005/11/24 23:30:05 rdm Exp $
+// @(#)root/gpad:$Name:  $:$Id: TButton.cxx,v 1.12 2006/03/17 09:08:48 couet Exp $
 // Author: Rene Brun   01/07/96
 
 /*************************************************************************
@@ -249,7 +249,7 @@ void TButton::Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
 
 
 //______________________________________________________________________________
-void TButton::SavePrimitive(ofstream &out, Option_t *)
+void TButton::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/gpad/src/TCanvas.cxx b/gpad/src/TCanvas.cxx
index d1e0ff2b7d00d2fe0e25b5da08ae25cf738782f2..b7d8567076b78f828b21fddcde44aec2ddd0dcb3 100644
--- a/gpad/src/TCanvas.cxx
+++ b/gpad/src/TCanvas.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TCanvas.cxx,v 1.111 2006/05/15 11:01:13 rdm Exp $
+// @(#)root/gpad:$Name:  $:$Id: TCanvas.cxx,v 1.112 2006/05/30 07:30:41 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -1515,7 +1515,7 @@ void TCanvas::RunAutoExec()
 
 
 //______________________________________________________________________________
-void TCanvas::SavePrimitive(ofstream &out, Option_t *option)
+void TCanvas::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitives in this canvas in C++ macro file with GUI
 
diff --git a/gpad/src/TDrawPanelHist.cxx b/gpad/src/TDrawPanelHist.cxx
index a803a9f3eeae8cc05e6da6d487c91f5f7c36f529..035ed33356467c6794360189131758579600fc02 100644
--- a/gpad/src/TDrawPanelHist.cxx
+++ b/gpad/src/TDrawPanelHist.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TDrawPanelHist.cxx,v 1.5 2001/09/28 12:34:50 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TDrawPanelHist.cxx,v 1.6 2004/07/20 07:23:34 brun Exp $
 // Author: Rene Brun   26/11/96
 
 /*************************************************************************
@@ -378,7 +378,7 @@ void TDrawPanelHist::RecursiveRemove(TObject *obj)
 }
 
 //______________________________________________________________________________
-void TDrawPanelHist::SavePrimitive(ofstream &, Option_t *)
+void TDrawPanelHist::SavePrimitive(ostream &, Option_t * /*= ""*/)
 {
    // Save this drawpanel in a macro.
 
diff --git a/gpad/src/TFitPanel.cxx b/gpad/src/TFitPanel.cxx
index a14486daf8573e7ad1d701855c6e3234823f4ab4..27ca1ca20e5988f69964b62a617b1341a5024291 100644
--- a/gpad/src/TFitPanel.cxx
+++ b/gpad/src/TFitPanel.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TFitPanel.cxx,v 1.6 2001/09/28 12:34:50 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TFitPanel.cxx,v 1.7 2004/07/20 07:23:34 brun Exp $
 // Author: Rene Brun   24/11/96
 
 /*************************************************************************
@@ -335,7 +335,7 @@ void TFitPanel::RecursiveRemove(TObject *obj)
 }
 
 //______________________________________________________________________________
-void TFitPanel::SavePrimitive(ofstream &, Option_t *)
+void TFitPanel::SavePrimitive(ostream &, Option_t * /*= ""*/)
 {
 //*-*-*-*-*-*-*-*-*-*-*Save this fitpanel in a macro*-*-*-*-*-*-*
 //*-*                  =============================
diff --git a/gpad/src/TFitPanelGraph.cxx b/gpad/src/TFitPanelGraph.cxx
index 889bcab91fcd110fbac1f29a0c22b6663d1b11a7..753e2220ebd257e11ecd06f88680198c2916ef94 100644
--- a/gpad/src/TFitPanelGraph.cxx
+++ b/gpad/src/TFitPanelGraph.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TFitPanelGraph.cxx,v 1.2 2000/06/13 12:16:22 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TFitPanelGraph.cxx,v 1.3 2004/07/20 07:23:34 brun Exp $
 // Author: Rene Brun   28/11/96
 
 /*************************************************************************
@@ -119,7 +119,7 @@ void TFitPanelGraph::Apply(const char *action)
 }
 
 //______________________________________________________________________________
-void TFitPanelGraph::SavePrimitive(ofstream &, Option_t *)
+void TFitPanelGraph::SavePrimitive(ostream &, Option_t * /*= ""*/)
 {
 //*-*-*-*-*-*-*-*-*-*-*Save this fitpanelgraph in a macro*-*-*-*-*-*-*
 //*-*                  ==================================
diff --git a/gpad/src/TGroupButton.cxx b/gpad/src/TGroupButton.cxx
index 037b6f151f5dbd3461d72b109860ae1509484f72..cbc917da407e89c293700088550c8a79886b70bf 100644
--- a/gpad/src/TGroupButton.cxx
+++ b/gpad/src/TGroupButton.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TGroupButton.cxx,v 1.9 2004/12/13 11:21:14 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TGroupButton.cxx,v 1.10 2005/11/23 11:03:12 couet Exp $
 // Author: Rene Brun   01/07/96
 
 /*************************************************************************
@@ -212,7 +212,7 @@ void TGroupButton::ExecuteEvent(Int_t event, Int_t px, Int_t py)
 
 
 //______________________________________________________________________________
-void TGroupButton::SavePrimitive(ofstream &out, Option_t *)
+void TGroupButton::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/gpad/src/TPad.cxx b/gpad/src/TPad.cxx
index 7c42a0de96d803971ef0920b7c72b6888514b18b..e0a69c2283135d4d56d86449fde6052e0fbdeed3 100644
--- a/gpad/src/TPad.cxx
+++ b/gpad/src/TPad.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TPad.cxx,v 1.230 2006/05/26 15:13:01 rdm Exp $
+// @(#)root/gpad:$Name:  $:$Id: TPad.cxx,v 1.231 2006/06/14 14:21:56 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -4606,7 +4606,7 @@ void TPad::SaveAs(const char *filename)
 
 
 //______________________________________________________________________________
-void TPad::SavePrimitive(ofstream &out, Option_t *)
+void TPad::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitives in this pad on the C++ source file out.
 
diff --git a/gpad/src/TPaveClass.cxx b/gpad/src/TPaveClass.cxx
index 7f60a44a5f51202f7089616ded3fe4e6bb80a040..6f0578dcd7656003cb4fa55e0d0c4cc82cb10351 100644
--- a/gpad/src/TPaveClass.cxx
+++ b/gpad/src/TPaveClass.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TPaveClass.cxx,v 1.6 2002/10/31 07:27:34 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TPaveClass.cxx,v 1.7 2005/11/23 11:03:12 couet Exp $
 // Author: Rene Brun   06/08/99
 /*************************************************************************
  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
@@ -143,7 +143,7 @@ void TPaveClass::ShowClassesUsing(const char *classes)
 
 
 //______________________________________________________________________________
-void TPaveClass::SavePrimitive(ofstream &out, Option_t *)
+void TPaveClass::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/gpad/src/TSlider.cxx b/gpad/src/TSlider.cxx
index 39b093501b8c75996c20554f2965f97b829655db..a587b43f8e40e0f306d7ec29394ecc0b2b04477b 100644
--- a/gpad/src/TSlider.cxx
+++ b/gpad/src/TSlider.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TSlider.cxx,v 1.4 2002/01/24 11:39:28 rdm Exp $
+// @(#)root/gpad:$Name:  $:$Id: TSlider.cxx,v 1.5 2005/11/23 11:03:12 couet Exp $
 // Author: Rene Brun   23/11/96
 
 /*************************************************************************
@@ -160,7 +160,7 @@ void TSlider::Paint(Option_t *option)
 
 
 //______________________________________________________________________________
-void TSlider::SavePrimitive(ofstream &out, Option_t *)
+void TSlider::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/gpad/src/TSliderBox.cxx b/gpad/src/TSliderBox.cxx
index 2cb6ce9029e88c0f76a77c3b72ed45c42a947e64..59727edfc1e16d191b870f4fd7776ea0d52e087e 100644
--- a/gpad/src/TSliderBox.cxx
+++ b/gpad/src/TSliderBox.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gpad:$Name:  $:$Id: TSliderBox.cxx,v 1.5 2005/08/29 15:54:55 brun Exp $
+// @(#)root/gpad:$Name:  $:$Id: TSliderBox.cxx,v 1.6 2005/11/23 11:03:12 couet Exp $
 // Author: Rene Brun   23/11/96
 
 /*************************************************************************
@@ -290,7 +290,7 @@ again:
 
 
 //______________________________________________________________________________
-void TSliderBox::SavePrimitive(ofstream &, Option_t *)
+void TSliderBox::SavePrimitive(ostream &, Option_t * /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 }
diff --git a/graf/inc/TArc.h b/graf/inc/TArc.h
index 820d7005c9750d136a923068f5a21183ea424ba2..1b50aa89f67e9bdcb4bb61279e607678a7723d14 100644
--- a/graf/inc/TArc.h
+++ b/graf/inc/TArc.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TArc.h,v 1.4 2002/10/31 07:27:34 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TArc.h,v 1.5 2005/11/11 17:31:48 couet Exp $
 // Author: Rene Brun   16/10/95
 
 /*************************************************************************
@@ -37,7 +37,7 @@ public:
    void Copy(TObject &arc) const;
    virtual void DrawArc(Double_t x1, Double_t y1, Double_t radius
                        ,Double_t  phimin=0, Double_t  phimax=360, Option_t *option="");
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TArc,1)  //Arc of a circle
 };
diff --git a/graf/inc/TArrow.h b/graf/inc/TArrow.h
index 6c8fc98eafac26094da3fc763e14c999bccd56aa..d78d732e14bc5cec27cbcfd8385ec8db233d448e 100644
--- a/graf/inc/TArrow.h
+++ b/graf/inc/TArrow.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TArrow.h,v 1.8 2005/04/20 15:15:13 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TArrow.h,v 1.9 2005/11/11 17:31:48 couet Exp $
 // Author: Rene Brun   17/10/95
 
 /*************************************************************************
@@ -60,7 +60,7 @@ public:
    virtual void   Paint(Option_t *option="");
    virtual void   PaintArrow(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2
                                  ,Float_t arrowsize=0.05 ,Option_t *option=">");
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
    virtual void   SetAngle(Float_t angle=60) {fAngle=angle;} // *MENU*
    virtual void   SetArrowSize(Float_t arrowsize=0.05) {fArrowSize=arrowsize;} // *MENU*
    virtual void   SetOption(Option_t *option=">"){ fOption = option;}
diff --git a/graf/inc/TAttImage.h b/graf/inc/TAttImage.h
index 3efe87120b714dbc9a6052055f7bc1839bcdfc08..5411ad4772970ebd38c39ecf12c051c749b6fd17 100644
--- a/graf/inc/TAttImage.h
+++ b/graf/inc/TAttImage.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TAttImage.h,v 1.7 2005/06/21 17:09:26 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TAttImage.h,v 1.8 2005/11/15 14:04:51 couet Exp $
 // Author: Reiner Rohlfs   24/03/02
 
 /*************************************************************************
@@ -136,7 +136,7 @@ public:
    virtual const TImagePalette &GetPalette() const { return fPalette; }
 
    virtual void     ResetAttImage(Option_t *option="");
-   virtual void     SaveImageAttributes(ofstream &out, const char *name,
+   virtual void     SaveImageAttributes(ostream &out, const char *name,
                                         EImageQuality qualdef = kImgDefault,
                                         UInt_t comprdef = 0,
                                         Bool_t constRatiodef = kTRUE);
diff --git a/graf/inc/TBox.h b/graf/inc/TBox.h
index 03e40a6a7489af1d2b3d3fe7a7e823290265b8e9..84f65483dcfa80bc1fa84cca01a1e24078df87ad 100644
--- a/graf/inc/TBox.h
+++ b/graf/inc/TBox.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TBox.h,v 1.7 2006/05/12 12:25:45 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TBox.h,v 1.8 2006/05/23 04:47:37 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -69,7 +69,7 @@ public:
    virtual void  Paint(Option_t *option="");
    virtual void  PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="");
    virtual void  Print(Option_t *option="") const;
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetX1(Double_t x1) {fX1=x1;}
    virtual void  SetX2(Double_t x2) {fX2=x2;}
    virtual void  SetY1(Double_t y1) {fY1=y1;}
diff --git a/graf/inc/TCrown.h b/graf/inc/TCrown.h
index 6ad6102a0ce5996c64723f07cb7e299af36e2436..cc857f72913c68a3f4a38d5b63455c29815daefb 100644
--- a/graf/inc/TCrown.h
+++ b/graf/inc/TCrown.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TCrown.h,v 1.2 2002/10/31 07:27:34 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TCrown.h,v 1.3 2005/11/15 14:04:51 couet Exp $
 // Author: Rene Brun   08/08/2002
 
 /*************************************************************************
@@ -41,7 +41,7 @@ public:
                             Double_t  phimin=0, Double_t  phimax=360, Option_t *option="");
    virtual void   ExecuteEvent(Int_t event, Int_t px, Int_t py);
    virtual void   Paint(Option_t *option="");
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TCrown,1)  //A crown or segment of crown
 };
diff --git a/graf/inc/TCurlyArc.h b/graf/inc/TCurlyArc.h
index 9e4518702b94b1f3b4ae9779d44a89433e9a9646..f1150f50adf676305f3035def57a3efc12e5602f 100644
--- a/graf/inc/TCurlyArc.h
+++ b/graf/inc/TCurlyArc.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TCurlyArc.h,v 1.6 2005/04/20 14:59:38 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TCurlyArc.h,v 1.7 2005/04/20 15:15:13 brun Exp $
 // Author: Otto Schaile   20/11/99
 
 /*************************************************************************
@@ -45,7 +45,7 @@ public:
    virtual void SetRadius(Double_t radius);          // *MENU* *ARGS={radius=>fR1}
    virtual void SetPhimin(Double_t phimin);          // *MENU* *ARGS={phimin=>fPhimin}
    virtual void SetPhimax(Double_t phimax);          // *MENU* *ARGS={phimax=>fPhimax}
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    static void     SetDefaultWaveLength(Double_t WaveLength); 
    static void     SetDefaultAmplitude (Double_t Amplitude );    
diff --git a/graf/inc/TCurlyLine.h b/graf/inc/TCurlyLine.h
index 141b3b02dc8b9e566dff1d52e1fef57454b70c24..67c0212920fa699264b097be94ce4c39bc435377 100644
--- a/graf/inc/TCurlyLine.h
+++ b/graf/inc/TCurlyLine.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TCurlyLine.h,v 1.8 2005/04/20 14:59:38 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TCurlyLine.h,v 1.9 2005/04/20 15:15:13 brun Exp $
 // Author: Otto Schaile   20/11/99
 
 /*************************************************************************
@@ -64,7 +64,7 @@ public:
    virtual void SetAmplitude(Double_t x);               // *MENU* *ARGS={x=>fAmplitude}
    virtual void SetStartPoint(Double_t x1, Double_t y1);
    virtual void SetEndPoint  (Double_t x2, Double_t y2);
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    static void     SetDefaultWaveLength(Double_t WaveLength); 
    static void     SetDefaultAmplitude (Double_t Amplitude );    
diff --git a/graf/inc/TCutG.h b/graf/inc/TCutG.h
index 3f2b3894f2dfaf3eed0f3eaa8e118268d38e8a35..79d44cb56ae83eade719c04c618b75041a0cbc78 100644
--- a/graf/inc/TCutG.h
+++ b/graf/inc/TCutG.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TCutG.h,v 1.6 2004/02/22 11:31:17 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TCutG.h,v 1.7 2004/06/26 13:38:57 brun Exp $
 // Author: Rene Brun   16/05/97
 
 /*************************************************************************
@@ -47,7 +47,7 @@ public:
    const char    *GetVarY() const {return fVarY.Data();}
    Double_t       Integral(TH2 *h, Option_t *option="") const;
    virtual Int_t  IsInside(Double_t x, Double_t y) const;
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
    virtual void   SetObjectX(TObject *obj) {fObjectX = obj;}
    virtual void   SetObjectY(TObject *obj) {fObjectY = obj;}
    virtual void   SetVarX(const char *varx); // *MENU*
diff --git a/graf/inc/TDiamond.h b/graf/inc/TDiamond.h
index c68a456af22133a557fc4495042fbf0718b386b7..7edabb461a28da6fe635c0dd5d549862beaa7961 100644
--- a/graf/inc/TDiamond.h
+++ b/graf/inc/TDiamond.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TDiamond.h,v 1.2 2000/06/13 10:52:53 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TDiamond.h,v 1.3 2002/08/05 21:12:12 brun Exp $
 // Author: Rene Brun   22/06/96
 
 /*************************************************************************
@@ -43,7 +43,7 @@ public:
    virtual void  Draw(Option_t *option="");
    virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
    virtual void  Paint(Option_t *option="");
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TDiamond,1)  //Diamond class
 };
diff --git a/graf/inc/TEllipse.h b/graf/inc/TEllipse.h
index 80531e0ea3ce5d3136c7dc363c1788826477d755..2a2653c27be4e5562a40e85c23448165853e5b37 100644
--- a/graf/inc/TEllipse.h
+++ b/graf/inc/TEllipse.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TEllipse.h,v 1.7 2004/03/22 15:56:27 rdm Exp $
+// @(#)root/graf:$Name:  $:$Id: TEllipse.h,v 1.8 2005/11/15 14:04:51 couet Exp $
 // Author: Rene Brun   16/10/95
 
 /*************************************************************************
@@ -69,7 +69,7 @@ public:
    virtual void   Paint(Option_t *option="");
    virtual void   PaintEllipse(Double_t x1, Double_t y1, Double_t r1,Double_t r2,Double_t phimin, Double_t phimax,Double_t theta,Option_t *option="");
    virtual void   Print(Option_t *option="") const;
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
    virtual void   SetNoEdges(Bool_t noEdges=kTRUE); // *TOGGLE* *GETTER=GetNoEdges
    virtual void   SetPhimin(Double_t phi=0)   {fPhimin=phi;} // *MENU*
    virtual void   SetPhimax(Double_t phi=360) {fPhimax=phi;} // *MENU*
diff --git a/graf/inc/TFrame.h b/graf/inc/TFrame.h
index 6a0c58ab18c5fdd4b53f7ef8d13ba678dbede16c..f7b59e719f6f3559025828e52c311726ec8c24ad 100644
--- a/graf/inc/TFrame.h
+++ b/graf/inc/TFrame.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TFrame.h,v 1.4 2005/11/15 14:04:51 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TFrame.h,v 1.5 2006/01/09 08:34:58 brun Exp $
 // Author: Rene Brun   31/10/96
 
 /*************************************************************************
@@ -39,7 +39,7 @@ public:
    virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
    virtual void  Paint(Option_t *option="");
    virtual void  Pop();
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  UseCurrentStyle();  // *MENU*
 
    ClassDef(TFrame,1)  //Pad graphics frame
diff --git a/graf/inc/TGaxis.h b/graf/inc/TGaxis.h
index c4c5b1a2fe394c9ffd56e875760c6424c832b3e6..1652535fdcce94bc446958b334ba4917a96980b1 100644
--- a/graf/inc/TGaxis.h
+++ b/graf/inc/TGaxis.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGaxis.h,v 1.20 2006/01/16 09:06:06 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TGaxis.h,v 1.21 2006/05/23 04:47:37 brun Exp $
 // Author: Rene Brun, Olivier Couet   12/12/94
 
 /*************************************************************************
@@ -105,7 +105,7 @@ public:
                                  Double_t gridlength = 0, Bool_t drawGridOnly = kFALSE);
    virtual void        Rotate(Double_t X,  Double_t Y,  Double_t CFI, Double_t SFI
                              ,Double_t XT, Double_t YT, Double_t &U,   Double_t &V);
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
    void                SetFunction(const char *funcname="");
    void                SetOption(Option_t *option="");
    void                SetLabelColor(Int_t labelcolor) {fLabelColor = labelcolor;} // *MENU*
diff --git a/graf/inc/TGraph.h b/graf/inc/TGraph.h
index 2c6a26e9136138d367aee706f41dbbc8ba45063f..9f5383d48a091da2ab346f8aed67cb67c46709ad 100644
--- a/graf/inc/TGraph.h
+++ b/graf/inc/TGraph.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGraph.h,v 1.53 2006/05/03 13:33:23 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TGraph.h,v 1.54 2006/05/23 04:47:37 brun Exp $
 // Author: Rene Brun, Olivier Couet   12/12/94
 
 /*************************************************************************
@@ -151,7 +151,7 @@ public:
    virtual void      Print(Option_t *chopt="") const;
    virtual Int_t     RemovePoint(); // *MENU*
    virtual Int_t     RemovePoint(Int_t ipoint);
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      SetEditable(Bool_t editable=kTRUE); // *TOGGLE* *GETTER=GetEditable
    virtual void      SetHistogram(TH1 *h) {fHistogram = (TH1F*)h;}
    virtual void      SetMaximum(Double_t maximum=-1111); // *MENU*
diff --git a/graf/inc/TGraphAsymmErrors.h b/graf/inc/TGraphAsymmErrors.h
index 714788fc7d002f214bd320f97be32aee45ca5a12..a5ba5e61bca3ae1da90f122f109c035cd4550fa4 100644
--- a/graf/inc/TGraphAsymmErrors.h
+++ b/graf/inc/TGraphAsymmErrors.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGraphAsymmErrors.h,v 1.25 2006/05/03 13:33:23 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TGraphAsymmErrors.h,v 1.26 2006/05/23 04:47:37 brun Exp $
 // Author: Rene Brun   03/03/99
 
 /*************************************************************************
@@ -82,7 +82,7 @@ public:
 
    virtual void    Paint(Option_t *chopt="");
    virtual void    Print(Option_t *chopt="") const;
-   virtual void    SavePrimitive(ofstream &out, Option_t *option);
+   virtual void    SavePrimitive(ostream &out, Option_t *option = "");
    virtual void    SetPointError(Double_t exl, Double_t exh, Double_t eyl, Double_t eyh); // *MENU*
    virtual void    SetPointError(Int_t i, Double_t exl, Double_t exh, Double_t eyl, Double_t eyh);
    virtual void    SetPointEXlow(Int_t i, Double_t exl);
diff --git a/graf/inc/TGraphBentErrors.h b/graf/inc/TGraphBentErrors.h
index c730b3bda2c300c9fc79713c445090f9ac2c0c70..4cc593087d2d5f8370f78b24e2ae866dacb7ae87 100644
--- a/graf/inc/TGraphBentErrors.h
+++ b/graf/inc/TGraphBentErrors.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGraphBentErrors.h,v 1.8 2005/09/05 07:25:21 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TGraphBentErrors.h,v 1.9 2005/11/16 17:38:38 couet Exp $
 // Author: Dave Morrison  30/06/2003
 
 /*************************************************************************
@@ -80,7 +80,7 @@ public:
    Double_t       *GetEYhigh() const {return fEYhigh;}
    virtual void    Paint(Option_t *chopt="");
    virtual void    Print(Option_t *chopt="") const;
-   virtual void    SavePrimitive(ofstream &out, Option_t *option);
+   virtual void    SavePrimitive(ostream &out, Option_t *option = "");
    virtual void    SetPointError(Double_t exl, Double_t exh,
                                  Double_t eyl, Double_t eyh); // *MENU*
    virtual void    SetPointError(Int_t i,
diff --git a/graf/inc/TGraphErrors.h b/graf/inc/TGraphErrors.h
index f119d3d8238248de1cb92f547ad894eb177b0256..29bffe28a8c87e836910246bdf27f5afed8c2b97 100644
--- a/graf/inc/TGraphErrors.h
+++ b/graf/inc/TGraphErrors.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGraphErrors.h,v 1.24 2006/05/03 13:33:23 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TGraphErrors.h,v 1.25 2006/05/23 04:47:37 brun Exp $
 // Author: Rene Brun   15/09/96
 
 /*************************************************************************
@@ -67,7 +67,7 @@ public:
    Double_t       *GetEY() const {return fEY;}
    virtual void    Paint(Option_t *chopt="");
    virtual void    Print(Option_t *chopt="") const;
-   virtual void    SavePrimitive(ofstream &out, Option_t *option);
+   virtual void    SavePrimitive(ostream &out, Option_t *option = "");
    virtual void    SetPointError(Double_t ex, Double_t ey);  // *MENU
    virtual void    SetPointError(Int_t i, Double_t ex, Double_t ey);
 
diff --git a/graf/inc/TLatex.h b/graf/inc/TLatex.h
index 2b25aa623b9290bc71534ee68fcf7b5ba0f1e778..5cb5d6f7bb27f427100617475f917f29cab3fd5d 100644
--- a/graf/inc/TLatex.h
+++ b/graf/inc/TLatex.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TLatex.h,v 1.13 2006/05/23 04:47:37 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TLatex.h,v 1.14 2006/05/24 16:44:33 brun Exp $
 // Author: Nicolas Brun   07/08/98
 
 /*************************************************************************
@@ -122,7 +122,7 @@ public:
       virtual void     Paint(Option_t *option="");
       virtual void     PaintLatex(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text);
 
-      virtual void     SavePrimitive(ofstream &out, Option_t *option);
+      virtual void     SavePrimitive(ostream &out, Option_t *option = "");
       virtual void     SetIndiceSize(Double_t factorSize);
       virtual void     SetLimitIndiceSize(Int_t limitFactorSize);
 
diff --git a/graf/inc/TLegend.h b/graf/inc/TLegend.h
index 83c7b82b703cd9608dbd1ed5254196a820ab9743..0db8451bdae73a9e1de44ecf489da729dadc7732 100644
--- a/graf/inc/TLegend.h
+++ b/graf/inc/TLegend.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TLegend.h,v 1.9 2005/11/21 08:49:48 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TLegend.h,v 1.10 2006/05/23 04:47:37 brun Exp $
 // Author: Matthew.Adam.Dobbs   06/09/99
 
 /*************************************************************************
@@ -65,7 +65,7 @@ public:
    virtual void    PaintPrimitives();
    virtual void    Print( Option_t* option = "" ) const;
    virtual void    RecursiveRemove(TObject *obj);
-   virtual void    SavePrimitive(ofstream &out, Option_t *option );
+   virtual void    SavePrimitive(ostream &out, Option_t *option  = "");
    void            SetDefaults() { fEntrySeparation = 0.1f; fMargin = 0.25f; }
    virtual void    SetEntryLabel( const char* label ); // *MENU*
    virtual void    SetEntryOption( Option_t* option ); // *MENU*
diff --git a/graf/inc/TLegendEntry.h b/graf/inc/TLegendEntry.h
index 2e4c236780c56bcc684a7c5062c3f4b59663b1a9..f87bc2765898c26607567c708407758d228994ee 100644
--- a/graf/inc/TLegendEntry.h
+++ b/graf/inc/TLegendEntry.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TLegendEntry.h,v 1.3 2002/10/31 07:27:34 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TLegendEntry.h,v 1.4 2005/11/18 16:55:07 couet Exp $
 // Author: Matthew.Adam.Dobbs   06/09/99
 
 /*************************************************************************
@@ -50,7 +50,7 @@ public:
    virtual TObject      *GetObject() const { return fObject; }
    virtual Option_t     *GetOption() const { return fOption.Data(); }
    virtual void          Print( Option_t *option = "" ) const;
-   virtual void          SaveEntry( ofstream &out, const char *name );
+   virtual void          SaveEntry( ostream &out, const char *name );
    virtual void          SetLabel( const char *label = "" ) { fLabel = label; } // *MENU*
    virtual void          SetObject(TObject* obj );
    virtual void          SetObject( const char *objectName );  // *MENU*
diff --git a/graf/inc/TLine.h b/graf/inc/TLine.h
index cc840cfd43cfbd501bebf3de64ffb39a264455ad..0420fc8ce443f7b0d83104c32e7467f82e97a05c 100644
--- a/graf/inc/TLine.h
+++ b/graf/inc/TLine.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TLine.h,v 1.5 2005/11/21 08:49:48 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TLine.h,v 1.6 2006/04/25 09:11:35 couet Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -67,7 +67,7 @@ public:
    virtual void   PaintLine(Double_t x1, Double_t y1,Double_t x2, Double_t  y2);
    virtual void   PaintLineNDC(Double_t u1, Double_t v1,Double_t u2, Double_t  v2);
    virtual void   Print(Option_t *option="") const;
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
    void           SetHorizontal(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsHorizontal
    void           SetVertical(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsVertical
    virtual void   SetX1(Double_t x1) {fX1=x1;}
diff --git a/graf/inc/TMarker.h b/graf/inc/TMarker.h
index 118f2ad99cb4dcf5c067e74a7b3297d4f6c44c48..65c0483f2c4faeb55e61d4ad61962f5ac76d0572 100644
--- a/graf/inc/TMarker.h
+++ b/graf/inc/TMarker.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TMarker.h,v 1.5 2003/01/30 08:37:05 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TMarker.h,v 1.6 2005/11/21 13:57:42 couet Exp $
 // Author: Rene Brun   12/05/95
 
 /*************************************************************************
@@ -58,7 +58,7 @@ public:
    virtual void     PaintMarker(Double_t x, Double_t y);
    virtual void     PaintMarkerNDC(Double_t u, Double_t v);
    virtual void     Print(Option_t *option="") const;
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetNDC(Bool_t isNDC=kTRUE);
    virtual void     SetX(Double_t x) { fX = x;} // *MENU*
    virtual void     SetY(Double_t y) { fY = y;} // *MENU*
diff --git a/graf/inc/TMultiGraph.h b/graf/inc/TMultiGraph.h
index 16d77046c1b60aed0e476e84ffed2c3c1b654b8d..d355a10ec46da6835b22a1d6980af3320630d23e 100644
--- a/graf/inc/TMultiGraph.h
+++ b/graf/inc/TMultiGraph.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TMultiGraph.h,v 1.7 2005/11/21 13:57:42 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TMultiGraph.h,v 1.8 2006/05/23 04:47:37 brun Exp $
 // Author: Rene Brun   12/10/2000
 
 /*************************************************************************
@@ -70,7 +70,7 @@ public:
    virtual void      Paint(Option_t *chopt="");
    virtual void      Print(Option_t *chopt="") const;
    virtual void      RecursiveRemove(TObject *obj);
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      SetMaximum(Double_t maximum=-1111);
    virtual void      SetMinimum(Double_t minimum=-1111);
   
diff --git a/graf/inc/TPave.h b/graf/inc/TPave.h
index d7f8bdbdce79038b913a0c4a2a41fe8c9fb908e7..ee02f96c227407a87de45b5e768fddee98d5ad7e 100644
--- a/graf/inc/TPave.h
+++ b/graf/inc/TPave.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPave.h,v 1.7 2006/01/23 21:15:57 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TPave.h,v 1.8 2006/04/12 13:45:28 brun Exp $
 // Author: Rene Brun   16/10/95
 
 /*************************************************************************
@@ -76,7 +76,7 @@ public:
    virtual void  PaintPaveArc(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
                               Int_t bordersize=4 ,Option_t *option="br");
    virtual void  Print(Option_t *option="") const;
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetBorderSize(Int_t bordersize=4) {fBorderSize = bordersize;} // *MENU*
    virtual void  SetCornerRadius(Double_t rad = 0.2) {fCornerRadius = rad;} // *MENU*
    virtual void  SetName(const char *name="") {fName = name;} // *MENU*
diff --git a/graf/inc/TPaveLabel.h b/graf/inc/TPaveLabel.h
index ec857d9be6f9f5a3e54b7a03f86da6cd964a1290..b9000ea6c32e2a7bd3a829c8efb42d0b9bc329f0 100644
--- a/graf/inc/TPaveLabel.h
+++ b/graf/inc/TPaveLabel.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPaveLabel.h,v 1.4 2002/10/31 07:27:34 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TPaveLabel.h,v 1.5 2005/11/21 13:57:42 couet Exp $
 // Author: Rene Brun   17/10/95
 
 /*************************************************************************
@@ -49,7 +49,7 @@ public:
    virtual void  Paint(Option_t *option="");
    virtual void  PaintPaveLabel(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
                       const char *label, Option_t *option="");
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetLabel(const char *label) {fLabel = label;} // *MENU*
 
    ClassDef(TPaveLabel,1)  //PaveLabel. A Pave with a label
diff --git a/graf/inc/TPaveStats.h b/graf/inc/TPaveStats.h
index 4f8f6e3d5293cd53af4dbcbc7588352f323faf7a..a26471e10840dd4d72697ab323630d3ff64a9fd8 100644
--- a/graf/inc/TPaveStats.h
+++ b/graf/inc/TPaveStats.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPaveStats.h,v 1.11 2004/05/13 19:39:18 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TPaveStats.h,v 1.12 2005/09/16 17:19:40 brun Exp $
 // Author: Rene Brun   15/03/99
 
 /*************************************************************************
@@ -51,7 +51,7 @@ public:
    virtual void     InsertText(const char *) { }
    virtual void     InsertLine() { }
    virtual void     ReadFile(const char *, Option_t *, Int_t, Int_t) { }
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SaveStyle(); // *MENU*
    virtual void     SetAllWith(const char *, Option_t *, Double_t) { }
    virtual void     SetMargin(Float_t) { }
diff --git a/graf/inc/TPaveText.h b/graf/inc/TPaveText.h
index 475a22cbbcb49bb23aca9bd6a5d83725de040e0b..7ab4f0684cfeb4f40cd61d372dccbbf69b20f93b 100644
--- a/graf/inc/TPaveText.h
+++ b/graf/inc/TPaveText.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPaveText.h,v 1.5 2005/11/21 13:57:42 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TPaveText.h,v 1.6 2006/05/23 04:47:37 brun Exp $
 // Author: Rene Brun   20/10/95
 
 /*************************************************************************
@@ -70,8 +70,8 @@ public:
    virtual void     PaintPrimitives(Int_t mode);
    virtual void     Print(Option_t *option="") const;
    virtual void     ReadFile(const char *filename, Option_t *option="", Int_t nlines=50, Int_t fromline=0); // *MENU*
-   virtual void     SaveLines(ofstream &out, const char *name);
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SaveLines(ostream &out, const char *name);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetAllWith(const char *text, Option_t *option, Double_t value); // *MENU*
    virtual void     SetLabel(const char *label) {fLabel = label;} // *MENU*
    virtual void     SetMargin(Float_t margin=0.05) {fMargin=margin;} // *MENU*
diff --git a/graf/inc/TPavesText.h b/graf/inc/TPavesText.h
index 99645fc319a30efe4825234bed298bfcfab74b08..d5c49349aa2e67459052df92f13e667e841f1196 100644
--- a/graf/inc/TPavesText.h
+++ b/graf/inc/TPavesText.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPavesText.h,v 1.3 2002/08/05 21:12:12 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TPavesText.h,v 1.4 2005/11/21 13:57:42 couet Exp $
 // Author: Rene Brun   19/11/95
 
 /*************************************************************************
@@ -39,7 +39,7 @@ public:
    virtual void  Draw(Option_t *option="");
    virtual Int_t GetNpaves() {return fNpaves;}
    virtual void  Paint(Option_t *option="");
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetNpaves(Int_t npaves=5) {fNpaves=npaves;} // *MENU*
 
    ClassDef(TPavesText,1)  //Stacked Paves with text strings
diff --git a/graf/inc/TPolyLine.h b/graf/inc/TPolyLine.h
index c692076dedfd57b248d27e035233ec10226bcf7b..b6810139f2b54ba18f5e6765f1bd69ac6b0cf53a 100644
--- a/graf/inc/TPolyLine.h
+++ b/graf/inc/TPolyLine.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPolyLine.h,v 1.6 2005/11/21 13:57:42 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TPolyLine.h,v 1.7 2006/05/23 04:47:37 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -72,7 +72,7 @@ public:
    virtual void    PaintPolyLine(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
    virtual void    PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
    virtual void    Print(Option_t *option="") const;
-   virtual void    SavePrimitive(ofstream &out, Option_t *option);
+   virtual void    SavePrimitive(ostream &out, Option_t *option = "");
    virtual Int_t   SetNextPoint(Double_t x, Double_t y); // *MENU*
    virtual void    SetOption(Option_t *option="") {fOption = option;}
    virtual void    SetPoint(Int_t point, Double_t x, Double_t y); // *MENU*
diff --git a/graf/inc/TText.h b/graf/inc/TText.h
index 618466b5eb37c698d19f7a793dcdb6a902804f9b..f044cc81c4882bf800ed2416d689f6c78509a537 100644
--- a/graf/inc/TText.h
+++ b/graf/inc/TText.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TText.h,v 1.5 2003/01/22 11:23:03 rdm Exp $
+// @(#)root/graf:$Name:  $:$Id: TText.h,v 1.6 2005/01/13 10:24:10 brun Exp $
 // Author: Nicolas Brun   12/12/94
 
 /*************************************************************************
@@ -65,7 +65,7 @@ public:
    virtual void     PaintText(Double_t x, Double_t y, const char *text);
    virtual void     PaintTextNDC(Double_t u, Double_t v, const char *text);
    virtual void     Print(Option_t *option="") const;
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetNDC(Bool_t isNDC=kTRUE);
    virtual void     SetText(Double_t x, Double_t y, const char *text) {fX=x; fY=y; SetTitle(text);} // *MENU* *ARGS={x=>fX,y=>fY,text=>fTitle}
    virtual void     SetX(Double_t x) { fX = x; } // *MENU*
diff --git a/graf/inc/TWbox.h b/graf/inc/TWbox.h
index 1926611ba44670d56749b4e73edee042f79f89e4..82f87192d796710579323a76bfd36dec6b7a023a 100644
--- a/graf/inc/TWbox.h
+++ b/graf/inc/TWbox.h
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TWbox.h,v 1.4 2002/10/31 07:27:34 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TWbox.h,v 1.5 2005/11/21 13:57:42 couet Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -55,7 +55,7 @@ public:
                             Bool_t tops);
    virtual void  PaintWbox(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
                  Color_t color=33, Short_t bordersize=5, Short_t bordermode=-1);
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetBorderMode(Short_t bordermode) {fBorderMode = bordermode;} // *MENU*
    virtual void  SetBorderSize(Short_t bordersize) {fBorderSize = bordersize;} // *MENU*
 
diff --git a/graf/src/TArc.cxx b/graf/src/TArc.cxx
index d0dd701410695d524289b2d7876f5a0aba64e52f..be6fb1a001225e934424b1df29d49a0ab0a74ac1 100644
--- a/graf/src/TArc.cxx
+++ b/graf/src/TArc.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TArc.cxx,v 1.8 2005/01/13 21:39:40 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TArc.cxx,v 1.9 2005/11/11 17:31:48 couet Exp $
 // Author: Rene Brun   16/10/95
 
 /*************************************************************************
@@ -87,7 +87,7 @@ void TArc::DrawArc(Double_t x1, Double_t y1,Double_t r1,Double_t phimin,Double_t
 
 
 //______________________________________________________________________________
-void TArc::SavePrimitive(ofstream &out, Option_t *)
+void TArc::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TArrow.cxx b/graf/src/TArrow.cxx
index a980decee16e7c244bc8d0aef609575d16dc8533..5dd2b73b8aab2da9c4cabe44acef9f58d7fecf5c 100644
--- a/graf/src/TArrow.cxx
+++ b/graf/src/TArrow.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TArrow.cxx,v 1.19 2005/10/18 20:45:27 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TArrow.cxx,v 1.20 2005/11/11 17:31:48 couet Exp $
 // Author: Rene Brun   17/10/95
 
 /*************************************************************************
@@ -337,7 +337,7 @@ void TArrow::PaintArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2,
 }
 
 //______________________________________________________________________________
-void TArrow::SavePrimitive(ofstream &out, Option_t *)
+void TArrow::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TAttImage.cxx b/graf/src/TAttImage.cxx
index a18704d6717db8f9c3bb64423b5943b721925513..25365b13737edc2d1712120c274c42eaa3b1462a 100644
--- a/graf/src/TAttImage.cxx
+++ b/graf/src/TAttImage.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TAttImage.cxx,v 1.8 2005/06/21 17:09:26 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TAttImage.cxx,v 1.9 2005/09/02 10:20:45 brun Exp $
 // Author: Reiner Rohlfs   24/03/02
 
 /*************************************************************************
@@ -466,7 +466,7 @@ void TAttImage::ResetAttImage(Option_t *)
 }
 
 //______________________________________________________________________________
-void TAttImage::SaveImageAttributes(ofstream &out, const char *name,
+void TAttImage::SaveImageAttributes(ostream &out, const char *name,
                                     EImageQuality qualdef,
                                     UInt_t comprdef, Bool_t constRatiodef)
 {
diff --git a/graf/src/TBox.cxx b/graf/src/TBox.cxx
index 190290991f10710b37f4787dbdb777de2f1bdfda..28d78e2b7e457a136d7198cf758cdbce72264601 100644
--- a/graf/src/TBox.cxx
+++ b/graf/src/TBox.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TBox.cxx,v 1.23 2006/05/23 04:47:37 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TBox.cxx,v 1.24 2006/05/24 16:44:33 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -578,7 +578,7 @@ void TBox::Print(Option_t *) const
 
 
 //______________________________________________________________________________
-void TBox::SavePrimitive(ofstream &out, Option_t *)
+void TBox::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TCrown.cxx b/graf/src/TCrown.cxx
index d094ebd9347d2bc14a7b31e5bed85dbc91757d7d..129f154bf4bded06166c00ca014ca82bf34945d3 100644
--- a/graf/src/TCrown.cxx
+++ b/graf/src/TCrown.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TCrown.cxx,v 1.4 2005/01/13 21:39:40 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TCrown.cxx,v 1.5 2005/11/15 14:04:51 couet Exp $
 // Author: Rene Brun   108/08/2002
 
 /*************************************************************************
@@ -201,7 +201,7 @@ void TCrown::Paint(Option_t *)
 }
 
 //______________________________________________________________________________
-void TCrown::SavePrimitive(ofstream &out, Option_t *)
+void TCrown::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TCurlyArc.cxx b/graf/src/TCurlyArc.cxx
index 627e824931d6d53f1ce4a03a2bb382ea05ccc88f..298fa6730b44c9461a0704ed97354125cc0b69d3 100644
--- a/graf/src/TCurlyArc.cxx
+++ b/graf/src/TCurlyArc.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TCurlyArc.cxx,v 1.9 2005/10/31 21:49:23 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TCurlyArc.cxx,v 1.10 2005/11/15 14:04:51 couet Exp $
 // Author: Otto Schaile   20/11/99
 
 /*************************************************************************
@@ -365,7 +365,7 @@ void TCurlyArc::ExecuteEvent(Int_t event, Int_t px, Int_t py)
 
 
 //______________________________________________________________________________
-void TCurlyArc::SavePrimitive(ofstream &out, Option_t *)
+void TCurlyArc::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TCurlyLine.cxx b/graf/src/TCurlyLine.cxx
index 396fd93f6ac01382c1ff9aad3a77e1bffac83ebb..d6a92ebc1420f0fcf4e5bfd2a38a360f03030f17 100644
--- a/graf/src/TCurlyLine.cxx
+++ b/graf/src/TCurlyLine.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TCurlyLine.cxx,v 1.10 2005/10/31 21:49:23 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TCurlyLine.cxx,v 1.11 2005/11/15 14:04:51 couet Exp $
 // Author: Otto Schaile   20/11/99
 
 /*************************************************************************
@@ -268,7 +268,7 @@ void TCurlyLine::ExecuteEvent(Int_t event, Int_t px, Int_t py)
 
 
 //______________________________________________________________________________
-void TCurlyLine::SavePrimitive(ofstream &out, Option_t *)
+void TCurlyLine::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TCutG.cxx b/graf/src/TCutG.cxx
index 75f3c01b29ebc2e48b866d521a28e4fe2334aa82..c65782898dc69dc61c78804e671ed5db65fbd202 100644
--- a/graf/src/TCutG.cxx
+++ b/graf/src/TCutG.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TCutG.cxx,v 1.18 2005/11/15 14:04:51 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TCutG.cxx,v 1.19 2006/03/20 21:43:42 pcanal Exp $
 // Author: Rene Brun   16/05/97
 
 /*************************************************************************
@@ -296,7 +296,7 @@ Int_t TCutG::IsInside(Double_t x, Double_t y) const
 }
 
 //______________________________________________________________________________
-void TCutG::SavePrimitive(ofstream &out, Option_t *option)
+void TCutG::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out.
 
diff --git a/graf/src/TDiamond.cxx b/graf/src/TDiamond.cxx
index b60bd4f53702f11adf33552a8d89f9fd4f09e891..526d33622c0c3e53af7b5fe179f4b0c551d2efd7 100644
--- a/graf/src/TDiamond.cxx
+++ b/graf/src/TDiamond.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TDiamond.cxx,v 1.9 2005/11/15 14:04:51 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TDiamond.cxx,v 1.10 2006/03/20 21:43:42 pcanal Exp $
 // Author: Rene Brun   22/06/96
 
 /*************************************************************************
@@ -419,7 +419,7 @@ void TDiamond::Paint(Option_t *)
 }
 
 //______________________________________________________________________________
-void TDiamond::SavePrimitive(ofstream &out, Option_t *)
+void TDiamond::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out.
 
diff --git a/graf/src/TEllipse.cxx b/graf/src/TEllipse.cxx
index b30f1a047e0103412b9b43c2a8f868d6d4949058..ed787f3a9975ec595f0f209882f0f1f053ba4893 100644
--- a/graf/src/TEllipse.cxx
+++ b/graf/src/TEllipse.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TEllipse.cxx,v 1.25 2006/04/27 09:26:38 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TEllipse.cxx,v 1.26 2006/04/28 08:43:05 couet Exp $
 // Author: Rene Brun   16/10/95
 
 /*************************************************************************
@@ -519,7 +519,7 @@ void TEllipse::Print(Option_t *) const
 
 
 //______________________________________________________________________________
-void TEllipse::SavePrimitive(ofstream &out, Option_t *)
+void TEllipse::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TFrame.cxx b/graf/src/TFrame.cxx
index 273cf562ed81c0697ab19b8ace96e04427bc386f..a84018a186a14ceafdc85fb1e6616925d380fbf2 100644
--- a/graf/src/TFrame.cxx
+++ b/graf/src/TFrame.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TFrame.cxx,v 1.11 2005/11/15 14:04:51 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TFrame.cxx,v 1.12 2006/01/09 08:34:58 brun Exp $
 // Author: Rene Brun   31/10/96
 
 /*************************************************************************
@@ -133,7 +133,7 @@ void TFrame::Pop()
 }
 
 //______________________________________________________________________________
-void TFrame::SavePrimitive(ofstream &, Option_t *)
+void TFrame::SavePrimitive(ostream &, Option_t * /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TGaxis.cxx b/graf/src/TGaxis.cxx
index 9ca435827f9063eb00b59e30a37cec3c89fccbbe..99d6d511700a0ac247ab14659e1edd1d30ff6d98 100644
--- a/graf/src/TGaxis.cxx
+++ b/graf/src/TGaxis.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGaxis.cxx,v 1.90 2006/05/30 09:13:24 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TGaxis.cxx,v 1.91 2006/05/31 09:13:43 couet Exp $
 // Author: Rene Brun, Olivier Couet   12/12/94
 
 /*************************************************************************
@@ -1928,7 +1928,7 @@ void TGaxis::Rotate(Double_t X,  Double_t Y,  Double_t CFI, Double_t SFI
 }
 
 //______________________________________________________________________________
-void TGaxis::SavePrimitive(ofstream &out, Option_t *)
+void TGaxis::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TGraph.cxx b/graf/src/TGraph.cxx
index 038f2780fa978c4d12a94f2be342a60898d5f9e1..49abc923a2e7406e151f161f114066fddb7f83b4 100644
--- a/graf/src/TGraph.cxx
+++ b/graf/src/TGraph.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGraph.cxx,v 1.189 2006/05/23 04:47:37 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TGraph.cxx,v 1.190 2006/05/24 16:44:33 brun Exp $
 // Author: Rene Brun, Olivier Couet   12/12/94
 
 /*************************************************************************
@@ -3696,7 +3696,7 @@ Int_t TGraph::RemovePoint(Int_t ipoint)
 
 
 //______________________________________________________________________________
-void TGraph::SavePrimitive(ofstream &out, Option_t *option)
+void TGraph::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TGraphAsymmErrors.cxx b/graf/src/TGraphAsymmErrors.cxx
index 4316b1585d1462d177eae98da4882d8a506dab8e..e4fcd4bc70d9f4ce76deee20ec565a73937c0ab1 100644
--- a/graf/src/TGraphAsymmErrors.cxx
+++ b/graf/src/TGraphAsymmErrors.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGraphAsymmErrors.cxx,v 1.57 2006/05/23 04:47:38 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TGraphAsymmErrors.cxx,v 1.58 2006/05/24 16:44:33 brun Exp $
 // Author: Rene Brun   03/03/99
 
 /*************************************************************************
@@ -995,7 +995,7 @@ void TGraphAsymmErrors::Print(Option_t *) const
 }
 
 //______________________________________________________________________________
-void TGraphAsymmErrors::SavePrimitive(ofstream &out, Option_t *option)
+void TGraphAsymmErrors::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TGraphBentErrors.cxx b/graf/src/TGraphBentErrors.cxx
index e3e1bdabf7735750e528fba89e27ff7d45d999a9..bcddbba8b409b89ae0263af2d9223c6eb60aeb5e 100644
--- a/graf/src/TGraphBentErrors.cxx
+++ b/graf/src/TGraphBentErrors.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGraphBentErrors.cxx,v 1.17 2005/11/16 17:38:38 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TGraphBentErrors.cxx,v 1.18 2005/11/17 09:38:55 couet Exp $
 // Author: Dave Morrison  30/06/2003
 
 /*************************************************************************
@@ -655,7 +655,7 @@ void TGraphBentErrors::Print(Option_t *) const
 
 
 //______________________________________________________________________________
-void TGraphBentErrors::SavePrimitive(ofstream &out, Option_t *option)
+void TGraphBentErrors::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TGraphErrors.cxx b/graf/src/TGraphErrors.cxx
index c76465dfe9f227fbcf614e8fe429317cd4ec7fba..382435c88d93c8ca2411fb3bc9ee760c4d92cccc 100644
--- a/graf/src/TGraphErrors.cxx
+++ b/graf/src/TGraphErrors.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TGraphErrors.cxx,v 1.58 2006/05/23 04:47:38 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TGraphErrors.cxx,v 1.59 2006/05/24 16:44:33 brun Exp $
 // Author: Rene Brun   15/09/96
 
 /*************************************************************************
@@ -736,7 +736,7 @@ void TGraphErrors::Print(Option_t *) const
 
 
 //______________________________________________________________________________
-void TGraphErrors::SavePrimitive(ofstream &out, Option_t *option)
+void TGraphErrors::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TLatex.cxx b/graf/src/TLatex.cxx
index 5173263164da1895745926750ba083580b37a8e2..af9fc19bcae70dc043fc26163ba6359c4c06fd05 100644
--- a/graf/src/TLatex.cxx
+++ b/graf/src/TLatex.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TLatex.cxx,v 1.58 2006/05/23 04:47:38 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TLatex.cxx,v 1.59 2006/05/24 16:44:33 brun Exp $
 // Author: Nicolas Brun   07/08/98
 
 /*************************************************************************
@@ -2031,7 +2031,7 @@ void TLatex::Savefs(TLatexFormSize *fs)
 
 
 //______________________________________________________________________________
-void TLatex::SavePrimitive(ofstream &out, Option_t *)
+void TLatex::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TLegend.cxx b/graf/src/TLegend.cxx
index a4ad2c0c3f12597836c5561dd3c6c3bdfa3039f2..ac480564a7f82ace4b72f267bf0929b037daef92 100644
--- a/graf/src/TLegend.cxx
+++ b/graf/src/TLegend.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TLegend.cxx,v 1.28 2006/05/23 04:47:38 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TLegend.cxx,v 1.29 2006/05/24 16:44:33 brun Exp $
 // Author: Matthew.Adam.Dobbs   06/09/99
 
 /*************************************************************************
@@ -556,7 +556,7 @@ void TLegend::RecursiveRemove(TObject *obj)
 
 
 //____________________________________________________________________________
-void TLegend::SavePrimitive( ofstream &out, Option_t* )
+void TLegend::SavePrimitive(ostream &out, Option_t* )
 {
    // Save this legend as C++ statements on output stream out
    //  to be used with the SaveAs .C option
diff --git a/graf/src/TLegendEntry.cxx b/graf/src/TLegendEntry.cxx
index bd703675cfd4f380b2f24a4b9d2ae624db65299a..90d79dfaa49c977ec6dc0020570d53af0d03664e 100644
--- a/graf/src/TLegendEntry.cxx
+++ b/graf/src/TLegendEntry.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TLegendEntry.cxx,v 1.9 2002/10/31 07:27:35 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TLegendEntry.cxx,v 1.10 2005/11/21 08:49:48 couet Exp $
 // Author: Matthew.Adam.Dobbs   06/09/99
 
 /*************************************************************************
@@ -112,7 +112,7 @@ void TLegendEntry::Print( Option_t *) const
 
 
 //____________________________________________________________________________
-void TLegendEntry::SaveEntry( ofstream &out, const char* name )
+void TLegendEntry::SaveEntry(ostream &out, const char* name )
 {
    // Save this TLegendEntry as C++ statements on output stream out
    //  to be used with the SaveAs .C option
diff --git a/graf/src/TLine.cxx b/graf/src/TLine.cxx
index db097949035af9417ee11c2c0954572ed82fdcfd..8135d69b6e2ca252dd3d684d415bfbbdbc7ea738 100644
--- a/graf/src/TLine.cxx
+++ b/graf/src/TLine.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TLine.cxx,v 1.18 2006/04/27 09:26:38 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TLine.cxx,v 1.19 2006/04/28 08:43:05 couet Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -329,7 +329,7 @@ void TLine::Print(Option_t *) const
 
 
 //______________________________________________________________________________
-void TLine::SavePrimitive(ofstream &out, Option_t *)
+void TLine::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TMarker.cxx b/graf/src/TMarker.cxx
index 9cc81fbefe648b91d880f9a998d426c13cf7ede3..12b49caa69545bd04365d4a7edeb826558b5ef12 100644
--- a/graf/src/TMarker.cxx
+++ b/graf/src/TMarker.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TMarker.cxx,v 1.13 2005/11/21 13:57:42 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TMarker.cxx,v 1.14 2006/03/20 21:43:42 pcanal Exp $
 // Author: Rene Brun   12/05/95
 
 /*************************************************************************
@@ -275,7 +275,7 @@ void TMarker::Print(Option_t *) const
 
 
 //______________________________________________________________________________
-void TMarker::SavePrimitive(ofstream &out, Option_t *)
+void TMarker::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TMultiGraph.cxx b/graf/src/TMultiGraph.cxx
index 8c8f87e168ee5fdb724323eb0ee35062d4b4d7cc..3356f4687387e2c9b25f157cc1ab5d9bf7c5582b 100644
--- a/graf/src/TMultiGraph.cxx
+++ b/graf/src/TMultiGraph.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TMultiGraph.cxx,v 1.30 2006/05/23 04:47:38 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TMultiGraph.cxx,v 1.31 2006/05/24 16:44:33 brun Exp $
 // Author: Rene Brun   12/10/2000
 
 /*************************************************************************
@@ -1162,7 +1162,7 @@ void TMultiGraph::RecursiveRemove(TObject *obj)
 
 
 //______________________________________________________________________________
-void TMultiGraph::SavePrimitive(ofstream &out, Option_t *option)
+void TMultiGraph::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TPave.cxx b/graf/src/TPave.cxx
index 88b9d461d975439bf185badd747b48ab93f7c3f0..737e245c9b13dedc1177a0d76c7eef8441992c6f 100644
--- a/graf/src/TPave.cxx
+++ b/graf/src/TPave.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPave.cxx,v 1.20 2006/04/12 13:45:28 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TPave.cxx,v 1.21 2006/05/23 10:49:44 brun Exp $
 // Author: Rene Brun   16/10/95
 
 /*************************************************************************
@@ -610,7 +610,7 @@ void TPave::Print(Option_t *option) const
 
 
 //______________________________________________________________________________
-void TPave::SavePrimitive(ofstream &out, Option_t *)
+void TPave::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TPaveLabel.cxx b/graf/src/TPaveLabel.cxx
index e8d01c6169d655d899f8331b1ed1ad962f6b2ae3..8483c28e8b219d2351cea6c7db18f5c99bbbdab5 100644
--- a/graf/src/TPaveLabel.cxx
+++ b/graf/src/TPaveLabel.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPaveLabel.cxx,v 1.17 2005/11/21 13:57:42 couet Exp $
+// @(#)root/graf:$Name:  $:$Id: TPaveLabel.cxx,v 1.18 2006/05/23 10:49:44 brun Exp $
 // Author: Rene Brun   17/10/95
 
 /*************************************************************************
@@ -187,7 +187,7 @@ void TPaveLabel::PaintPaveLabel(Double_t x1, Double_t y1,Double_t x2, Double_t
 
 
 //______________________________________________________________________________
-void TPaveLabel::SavePrimitive(ofstream &out, Option_t *)
+void TPaveLabel::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TPaveStats.cxx b/graf/src/TPaveStats.cxx
index ad170142bbeb7e99b54c7dfdf4b10822b08b84bc..21f4a19431e6e721f8dbccd75ba7ddd032c7d112 100644
--- a/graf/src/TPaveStats.cxx
+++ b/graf/src/TPaveStats.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPaveStats.cxx,v 1.24 2005/09/19 14:31:31 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TPaveStats.cxx,v 1.25 2005/11/21 13:57:42 couet Exp $
 // Author: Rene Brun   15/03/99
 
 /*************************************************************************
@@ -338,7 +338,7 @@ void TPaveStats::Paint(Option_t *option)
 
 
 //______________________________________________________________________________
-void TPaveStats::SavePrimitive(ofstream &out, Option_t *)
+void TPaveStats::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TPaveText.cxx b/graf/src/TPaveText.cxx
index 2a9805d0dce9261bfff111536d308a726d6e0b5d..ed39e468b1c23a7dc1a3bf324d41ed2704ea1157 100644
--- a/graf/src/TPaveText.cxx
+++ b/graf/src/TPaveText.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPaveText.cxx,v 1.24 2006/05/23 04:47:38 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TPaveText.cxx,v 1.25 2006/05/24 16:44:33 brun Exp $
 // Author: Rene Brun   20/10/95
 
 /*************************************************************************
@@ -664,7 +664,7 @@ void TPaveText::ReadFile(const char *filename, Option_t *option, Int_t nlines, I
 
 
 //______________________________________________________________________________
-void TPaveText::SaveLines(ofstream &out, const char *name)
+void TPaveText::SaveLines(ostream &out, const char *name)
 {
    // Save lines of this pavetext as C++ statements on output stream out
 
@@ -820,7 +820,7 @@ void TPaveText::SaveLines(ofstream &out, const char *name)
 
 
 //______________________________________________________________________________
-void TPaveText::SavePrimitive(ofstream &out, Option_t *)
+void TPaveText::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TPavesText.cxx b/graf/src/TPavesText.cxx
index 2dbe6e47349be6e872e53a954ff7a9d82b0b0572..4c352e871ad39f5f453c8225f7dd738b2317771c 100644
--- a/graf/src/TPavesText.cxx
+++ b/graf/src/TPavesText.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPavesText.cxx,v 1.7 2002/08/05 21:12:12 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TPavesText.cxx,v 1.8 2005/11/21 13:57:42 couet Exp $
 // Author: Rene Brun   19/11/95
 
 /*************************************************************************
@@ -113,7 +113,7 @@ void TPavesText::Paint(Option_t *option)
 
 
 //______________________________________________________________________________
-void TPavesText::SavePrimitive(ofstream &out, Option_t *)
+void TPavesText::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TPolyLine.cxx b/graf/src/TPolyLine.cxx
index d317ed205e7698d2c0aa26906f165d9e4a34b6ad..4f866ce4ae3399dfa98032b12342348089619e54 100644
--- a/graf/src/TPolyLine.cxx
+++ b/graf/src/TPolyLine.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TPolyLine.cxx,v 1.26 2006/05/23 04:47:38 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TPolyLine.cxx,v 1.27 2006/05/24 16:44:33 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -532,7 +532,7 @@ void TPolyLine::Print(Option_t *) const
 
 
 //______________________________________________________________________________
-void TPolyLine::SavePrimitive(ofstream &out, Option_t *option)
+void TPolyLine::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TText.cxx b/graf/src/TText.cxx
index 6066ad78ca989620787009bd8620cbbb5ab819e0..9fd13e1a5c69113169d15e51e0fac9eb693c6e42 100644
--- a/graf/src/TText.cxx
+++ b/graf/src/TText.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TText.cxx,v 1.18 2005/01/13 10:24:10 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TText.cxx,v 1.19 2006/03/20 21:43:42 pcanal Exp $
 // Author: Nicolas Brun   12/12/94
 
 /*************************************************************************
@@ -523,7 +523,7 @@ void TText::Print(Option_t *) const
 }
 
 //______________________________________________________________________________
-void TText::SavePrimitive(ofstream &out, Option_t *)
+void TText::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/graf/src/TWbox.cxx b/graf/src/TWbox.cxx
index 8ecdd92a2479bc834e21adb70e7d89bd39931563..7c671991c1fa235353141fde44854b07c5c56a97 100644
--- a/graf/src/TWbox.cxx
+++ b/graf/src/TWbox.cxx
@@ -1,4 +1,4 @@
-// @(#)root/graf:$Name:  $:$Id: TWbox.cxx,v 1.7 2002/10/31 07:27:35 brun Exp $
+// @(#)root/graf:$Name:  $:$Id: TWbox.cxx,v 1.8 2005/11/21 13:57:42 couet Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -213,7 +213,7 @@ void TWbox::PaintFrame(Double_t x1, Double_t y1,Double_t x2, Double_t  y2,
 
 
 //______________________________________________________________________________
-void TWbox::SavePrimitive(ofstream &out, Option_t *)
+void TWbox::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/gui/inc/TG3DLine.h b/gui/inc/TG3DLine.h
index 2984f4cfce7265e25ebe30baa4f5cded0f62ae46..9953dfe7f2c8fe99a33238ce91ca35de335bea48 100644
--- a/gui/inc/TG3DLine.h
+++ b/gui/inc/TG3DLine.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TG3DLine.h,v 1.6 2004/09/08 08:51:40 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TG3DLine.h,v 1.7 2006/04/24 13:50:29 antcheva Exp $
 // Author: Fons Rademakers   6/09/2000
 
 /*************************************************************************
@@ -41,7 +41,7 @@ public:
       gVirtualX->DrawLine(fId, GetHilightGC()(), 0, 1, fWidth-1, 1);
       gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, 0, fWidth-1, 1);
    }
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGHorizontal3DLine,0)  //A horizontal 3D separator line
 };
@@ -59,7 +59,7 @@ public:
       gVirtualX->DrawLine(fId, GetHilightGC()(), 1, 0, 1, fHeight-1);
       gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, 1, fHeight-1);
    }
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGVertical3DLine,0)  //A vertical 3D separator line
 };
diff --git a/gui/inc/TGButton.h b/gui/inc/TGButton.h
index e2469202d6c18a89718d3bb713c5f19bfa2866e8..a5836dd2ac5bf7f6fef6b27663fd2de1adf2119f 100644
--- a/gui/inc/TGButton.h
+++ b/gui/inc/TGButton.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGButton.h,v 1.41 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGButton.h,v 1.42 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   06/01/98
 
 /*************************************************************************
@@ -122,7 +122,7 @@ public:
    virtual void         Toggle(Bool_t emit = kFALSE) { SetDown(IsDown() ? kFALSE : kTRUE, emit); }
    virtual void         SetEnabled(Bool_t e = kTRUE); //*TOGGLE* *GETTER=IsEnabled
 
-   virtual void         SavePrimitive(ofstream &out, Option_t *option);
+   virtual void         SavePrimitive(ostream &out, Option_t *option = "");
 
    GContext_t GetNormGC() const { return fNormGC; }
 
@@ -191,7 +191,7 @@ public:
 
    FontStruct_t GetFontStruct() const { return fFontStruct; }
 
-   virtual void       SavePrimitive(ofstream &out, Option_t *option);
+   virtual void       SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGTextButton,0)  // A text button widget
 };
@@ -228,7 +228,7 @@ public:
    virtual void     SetDisabledPicture(const TGPicture *pic);
    const TGPicture *GetPicture() const { return fPic; };
    const TGPicture *GetDisabledPicture() const { return fPicD; };
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGPictureButton,0)  // A picture button widget
 };
@@ -275,7 +275,7 @@ public:
    virtual Bool_t IsOn() const { return fState == kButtonDown; }
    virtual Bool_t IsDown() const { return fState == kButtonDown; }
    virtual void   SetState(EButtonState state, Bool_t emit = kFALSE);
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGCheckButton,0)  // A check button widget
 };
@@ -329,7 +329,7 @@ public:
    virtual Bool_t IsExclusiveToggle() const { return kTRUE; }
    virtual Bool_t IsOn() const { return fState == kButtonDown; }
    virtual Bool_t IsDown() const { return fState == kButtonDown; }
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGRadioButton,0)  // A radio button widget
 };
diff --git a/gui/inc/TGButtonGroup.h b/gui/inc/TGButtonGroup.h
index 390c1b673574060c7adbc525c3ec3a43ccae628f..8c88e4a63fdc11c794790ec6229676d7fd58c8a5 100644
--- a/gui/inc/TGButtonGroup.h
+++ b/gui/inc/TGButtonGroup.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGButtonGroup.h,v 1.10 2004/09/08 08:13:11 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGButtonGroup.h,v 1.11 2004/09/15 17:37:29 brun Exp $
 // Author: Valeriy Onuchin & Fons Rademakers   16/10/2000
 
 /*************************************************************************
@@ -91,7 +91,7 @@ public:
    virtual void      Hide();
    virtual void      DrawBorder() { if (fDrawBorder) TGGroupFrame::DrawBorder(); }
    virtual void      SetLayoutHints(TGLayoutHints *l, TGButton *button = 0);
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGButtonGroup,0)  // Organizes TGButtons in a group
 };
@@ -109,7 +109,7 @@ public:
                     norm, font, back) { }
 
    virtual ~TGVButtonGroup() { }
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGVButtonGroup,0)  // A button group with one vertical column
 };
@@ -127,7 +127,7 @@ public:
                     norm, font, back) { }
 
    virtual ~TGHButtonGroup() { }
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGHButtonGroup,0)  // A button group with one horizontal row
 };
diff --git a/gui/inc/TGCanvas.h b/gui/inc/TGCanvas.h
index 31474d8afd52c820548fefe54360e9b3e7baf316..22fc7dcf23c9ac97446101bc28a5c4d1bb1fbd4f 100644
--- a/gui/inc/TGCanvas.h
+++ b/gui/inc/TGCanvas.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGCanvas.h,v 1.28 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGCanvas.h,v 1.29 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   11/01/98
 
 /*************************************************************************
@@ -128,7 +128,7 @@ public:
 
    virtual const TGFrame *GetNextSelected(void **current);
    virtual TGFrame *GetLastActive() const { return fLastActiveEl ? fLastActiveEl->fFrame : 0; }
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    virtual Bool_t HandleExpose(Event_t *event);
    virtual Bool_t HandleButton(Event_t *event);
@@ -233,7 +233,7 @@ public:
    virtual TGDimension GetDefaultSize() const { return TGDimension(fWidth, fHeight); }
    virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGCanvas,0)  // A canvas with two scrollbars and a viewport
 };
diff --git a/gui/inc/TGColorSelect.h b/gui/inc/TGColorSelect.h
index 40b0b0b914942b4565df9d11bb5dc7b290d462f7..220b7a0051d139915c5699e43abd38a27be41d70 100644
--- a/gui/inc/TGColorSelect.h
+++ b/gui/inc/TGColorSelect.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGColorSelect.h,v 1.10 2006/05/14 10:23:26 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGColorSelect.h,v 1.11 2006/05/23 04:47:38 brun Exp $
 // Author: Bertrand Bellenot + Fons Rademakers   22/08/02
 
 /*************************************************************************
@@ -157,7 +157,7 @@ public:
    void SetEnabled(Bool_t e = kTRUE) {TGButton::SetEnabled(e); }
 
    virtual TGDimension GetDefaultSize() const { return TGDimension(43, 21); }
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    virtual void ColorSelected(Pixel_t color = 0)
             { Emit("ColorSelected(Pixel_t)", color ? color : GetColor()); }  //*SIGNAL*
diff --git a/gui/inc/TGComboBox.h b/gui/inc/TGComboBox.h
index db182d628138390747766dc9f9e412bbf49ba492..28f5dfc5664dc4678ca6a7c8356315958108c711 100644
--- a/gui/inc/TGComboBox.h
+++ b/gui/inc/TGComboBox.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGComboBox.h,v 1.24 2006/05/30 11:45:59 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGComboBox.h,v 1.25 2006/06/01 09:13:17 antcheva Exp $
 // Author: Fons Rademakers   13/01/98
 
 /*************************************************************************
@@ -131,7 +131,7 @@ public:
    virtual void Selected(Int_t id) { Emit("Selected(Int_t)", id); }  // *SIGNAL*
    virtual void Selected(const char *txt) { Emit("Selected(char*)", txt); } // *SIGNAL*
    virtual void ReturnPressed();                                     // *SIGNAL*
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGComboBox,0)  // Combo box widget
 };
@@ -151,7 +151,7 @@ public:
               UInt_t options = kHorizontalFrame | kSunkenFrame | kDoubleBorder,
               Pixel_t back = GetWhitePixel());
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
       
    ClassDef(TGLineStyleComboBox, 0)  // Line style combobox widget
     
@@ -173,7 +173,7 @@ public:
               UInt_t options = kHorizontalFrame | kSunkenFrame | kDoubleBorder,
               Pixel_t back = GetWhitePixel(), Bool_t none=kFALSE);
    
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGLineWidthComboBox, 0)  // Line width combobox widget
 
diff --git a/gui/inc/TGDockableFrame.h b/gui/inc/TGDockableFrame.h
index 1d0bda264295867bcc5d92b0fdfdc9c1b53fec2f..0edc44d9965c39ec6db2d2c290dcab7faec45018 100644
--- a/gui/inc/TGDockableFrame.h
+++ b/gui/inc/TGDockableFrame.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGDockableFrame.h,v 1.6 2005/11/17 19:09:28 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGDockableFrame.h,v 1.7 2006/05/28 20:07:59 brun Exp $
 // Author: Abdelhalim Ssadik   07/07/04
 
 /*************************************************************************
@@ -143,7 +143,7 @@ public:
    TGCompositeFrame *GetContainer() const { return fContainer; }
    TGUndockedFrame  *GetUndocked() const { return fFrame; }
 
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGDockableFrame,0)  // Dockable widget
 };
diff --git a/gui/inc/TGDoubleSlider.h b/gui/inc/TGDoubleSlider.h
index e7cd79e39e77ec2a254bfc290480ae547b91a076..ffdaf45e6c063b5549fab5c64cbe95172f0ea85f 100644
--- a/gui/inc/TGDoubleSlider.h
+++ b/gui/inc/TGDoubleSlider.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGDoubleSlider.h,v 1.9 2004/08/25 13:31:16 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGDoubleSlider.h,v 1.10 2004/09/08 08:13:11 brun Exp $
 // Author: Reiner Rohlfs   30/09/98
 
 /*************************************************************************
@@ -166,7 +166,7 @@ public:
    virtual Bool_t HandleMotion(Event_t *event);
    virtual TGDimension GetDefaultSize() const
                      { return TGDimension(kDoubleSliderWidth, fHeight); }
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGDoubleVSlider,0)  // Vertical double slider widget
 };
@@ -192,7 +192,7 @@ public:
    virtual Bool_t HandleMotion(Event_t *event);
    virtual TGDimension GetDefaultSize() const
                      { return TGDimension(fWidth, kDoubleSliderHeight); }
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGDoubleHSlider,0)  // Horizontal double slider widget
 };
diff --git a/gui/inc/TGFSComboBox.h b/gui/inc/TGFSComboBox.h
index adc60913c6fcb02a9ff75e33ad9963fd787d2987..7800568e873e268f982c5a79b52209777a7efae6 100644
--- a/gui/inc/TGFSComboBox.h
+++ b/gui/inc/TGFSComboBox.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGFSComboBox.h,v 1.8 2004/12/08 11:41:51 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGFSComboBox.h,v 1.9 2005/11/17 19:09:28 rdm Exp $
 // Author: Fons Rademakers   19/01/98
 
 /*************************************************************************
@@ -82,7 +82,7 @@ public:
                 kDoubleBorder, Pixel_t back = GetWhitePixel());
 
    virtual void Update(const char *path);
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGFSComboBox,0)  // Combo box widget for file system path
 };
diff --git a/gui/inc/TGFSContainer.h b/gui/inc/TGFSContainer.h
index 75cb8e587b0655bd671f71e75818343930bfbc29..f0bd5a49bcbd84579081a148d6edd5c636c8bcc0 100644
--- a/gui/inc/TGFSContainer.h
+++ b/gui/inc/TGFSContainer.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGFSContainer.h,v 1.13 2005/05/24 20:05:10 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGFSContainer.h,v 1.14 2005/05/25 16:20:54 brun Exp $
 // Author: Fons Rademakers   19/01/98
 
 /*************************************************************************
@@ -133,7 +133,7 @@ public:
                                 Int_t file_type, Bool_t is_link, const char *ext,
                                 Bool_t small);
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGFileContainer,0)  // Container containing file system objects
 };
diff --git a/gui/inc/TGFont.h b/gui/inc/TGFont.h
index 0e95e6b8d5474e5fc12c1efac95e7551f3bf292d..9afe9393b23d016442b8a2d2d6a3e915978e0e09 100644
--- a/gui/inc/TGFont.h
+++ b/gui/inc/TGFont.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGFont.h,v 1.6 2006/05/15 11:01:14 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGFont.h,v 1.7 2006/05/23 04:47:38 brun Exp $
 // Author: Fons Rademakers   20/5/2003
 
 /*************************************************************************
@@ -75,7 +75,7 @@ public:
 
    void         Print(Option_t *option="") const;
 
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGFont,0)   // GUI font description
 };
diff --git a/gui/inc/TGFrame.h b/gui/inc/TGFrame.h
index d7a937e42a07f566842cd5c415b0f4377579ca68..f58a11f9dbf936daa72134e59913ed702c83344c 100644
--- a/gui/inc/TGFrame.h
+++ b/gui/inc/TGFrame.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGFrame.h,v 1.75 2006/05/28 20:07:59 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGFrame.h,v 1.76 2006/05/30 16:35:00 brun Exp $
 // Author: Fons Rademakers   03/01/98
 
 /*************************************************************************
@@ -298,8 +298,8 @@ public:
 
    // Printing and saving
    virtual void Print(Option_t *option="") const;
-   void SaveUserColor(ofstream &out, Option_t *);
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   void SaveUserColor(ostream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    // dummy to remove from context menu
    virtual void        Delete(Option_t * /*option*/ ="") { }
@@ -402,8 +402,8 @@ public:
 
    virtual void   Print(Option_t *option="") const;
    virtual void   ChangeSubframesBackground(Pixel_t back);
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
-   virtual void   SavePrimitiveSubframes(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
+   virtual void   SavePrimitiveSubframes(ostream &out, Option_t *option = "");
 
    ClassDef(TGCompositeFrame,0)  // Base class for composite widgets (menubars, etc.)
 };
@@ -415,7 +415,7 @@ public:
                    UInt_t options = kChildFrame,
                    Pixel_t back = GetDefaultFrameBackground()) :
       TGCompositeFrame(p, w, h, options | kVerticalFrame, back) { SetWindowName(); }
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGVerticalFrame,0)  // Composite frame with vertical child layout
 };
@@ -426,7 +426,7 @@ public:
                      UInt_t options = kChildFrame,
                      Pixel_t back = GetDefaultFrameBackground()) :
       TGCompositeFrame(p, w, h, options | kHorizontalFrame, back) { SetWindowName(); }
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGHorizontalFrame,0)  // Composite frame with horizontal child layout
 };
@@ -527,7 +527,7 @@ public:
         hmax = fWMMaxHeight; winc = fWMWidthInc; hinc = fWMHeightInc; }
    EInitialState GetWMState() const { return fWMInitState; }
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
    virtual void SaveSource(const char *filename = "Rootappl.C", Option_t *option = ""); // *MENU*icon=bld_save.png*
 
    ClassDef(TGMainFrame,0)  // Top level window frame
@@ -562,7 +562,7 @@ public:
                      kBottomLeft, kBottomRight };
    virtual void    CenterOnParent(Bool_t croot = kTRUE, EPlacement pos = kCenter);
    const TGWindow *GetMain() const { return fMain; }
-   virtual void    SavePrimitive(ofstream &out, Option_t *option);
+   virtual void    SavePrimitive(ostream &out, Option_t *option = "");
    virtual void    SaveSource(const char *filename = "Rootdlog.C", Option_t *option = ""); // *MENU*icon=bld_save.png*
 
    ClassDef(TGTransientFrame,0)  // Frame for dialog (transient) windows
@@ -634,7 +634,7 @@ public:
    virtual const char *GetTitle() const { return fText->GetString(); }
    Bool_t HasOwnFont() const;
 
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGGroupFrame,0)  // A composite frame with border and title
 };
diff --git a/gui/inc/TGGC.h b/gui/inc/TGGC.h
index 22a1e606fd215d0e52d7b60c01f632505fd2db42..47f59c7e7124fda33bbb2a28b20516ad14499996 100644
--- a/gui/inc/TGGC.h
+++ b/gui/inc/TGGC.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGGC.h,v 1.9 2006/05/15 11:01:14 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGGC.h,v 1.10 2006/05/23 04:47:38 brun Exp $
 // Author: Fons Rademakers   20/9/2000
 
 /*************************************************************************
@@ -107,7 +107,7 @@ public:
    Int_t             GetArcMode() const { return fValues.fArcMode; }
 
    void Print(Option_t *option="") const;
-   void SavePrimitive(ofstream &out, Option_t *option);
+   void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGGC,0)  // Graphics context
 };
diff --git a/gui/inc/TGIcon.h b/gui/inc/TGIcon.h
index c9902339ada467936a6b2744979ad64f7c2c12ed..ba33fe0c833dbcacd6c956812d0f8fbd11b005f1 100644
--- a/gui/inc/TGIcon.h
+++ b/gui/inc/TGIcon.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGIcon.h,v 1.9 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGIcon.h,v 1.10 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   05/01/98
 
 /*************************************************************************
@@ -67,7 +67,7 @@ public:
    virtual void ChangeBackgroundColor() { }
 
    virtual TGDimension GetDefaultSize() const;
-   virtual void SavePrimitive(ofstream &out, Option_t *option); 
+   virtual void SavePrimitive(ostream &out, Option_t *option = ""); 
 
    ClassDef(TGIcon,0)  // Icon GUI class
 };
diff --git a/gui/inc/TGLabel.h b/gui/inc/TGLabel.h
index 8b07add763a3e736fae3e508f81a9c6fa2d54fd3..c11b19211ca8d155fcae7de04162ed90e923e47c 100644
--- a/gui/inc/TGLabel.h
+++ b/gui/inc/TGLabel.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGLabel.h,v 1.20 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGLabel.h,v 1.21 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   06/01/98
 
 /*************************************************************************
@@ -96,7 +96,7 @@ public:
    GContext_t GetNormGC() const { return fNormGC; }
    FontStruct_t GetFontStruct() const { return fFontStruct; }
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGLabel,0)  // A label GUI element
 };
diff --git a/gui/inc/TGLayout.h b/gui/inc/TGLayout.h
index 5cedf45c877d369702feeaaac7272a429c8331e7..cac13a5e621296df60fc254a17575a21f1651e1c 100644
--- a/gui/inc/TGLayout.h
+++ b/gui/inc/TGLayout.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGLayout.h,v 1.13 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGLayout.h,v 1.14 2006/05/26 15:13:01 rdm Exp $
 // Author: Fons Rademakers   02/01/98
 
 /*************************************************************************
@@ -107,7 +107,7 @@ public:
    void Print(Option_t* option = "") const;
    void ls(Option_t* option = "") const { Print(option); }
 
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGLayoutHints,0)  // Class describing GUI layout hints
 };
@@ -179,7 +179,7 @@ public:
 
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const;
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGVerticalLayout,0)  // Vertical layout manager
 };
@@ -190,7 +190,7 @@ public:
 
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const;
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGHorizontalLayout,0)  // Horizontal layout manager
 };
@@ -213,7 +213,7 @@ public:
 
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const;
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGRowLayout,0)  // Row layout manager
 };
@@ -224,7 +224,7 @@ public:
 
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const;
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGColumnLayout,0)  // Column layout manager
 };
@@ -258,7 +258,7 @@ public:
 
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const;
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGMatrixLayout,0)  // Matrix layout manager
 };
@@ -288,7 +288,7 @@ public:
 
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const;
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGTileLayout,0)  // Tile layout manager
 };
@@ -300,7 +300,7 @@ public:
 
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const;
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGListLayout,0)  // Layout manager for TGListView widget
 };
@@ -316,7 +316,7 @@ public:
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const;
    virtual void SetDefaultWidth(UInt_t w) { fWidth = w; }
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGListDetailsLayout,0)  // Layout manager for TGListView details
 };
diff --git a/gui/inc/TGListBox.h b/gui/inc/TGListBox.h
index a13d5c3361ed263532a4a80b6224f1e79ce36458..791e5ae31da2c7257a20f0ce9f79a1b68d2cdff1 100644
--- a/gui/inc/TGListBox.h
+++ b/gui/inc/TGListBox.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGListBox.h,v 1.31 2006/05/30 11:29:42 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGListBox.h,v 1.32 2006/06/01 09:12:48 antcheva Exp $
 // Author: Fons Rademakers   12/01/98
 
 /*************************************************************************
@@ -128,7 +128,7 @@ public:
    GContext_t     GetNormGC() const { return fNormGC; }
    FontStruct_t   GetFontStruct() const { return fFontStruct; }
 
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGTextLBEntry,0)  // Text listbox entry
 };
@@ -341,7 +341,7 @@ public:
    virtual TGLBEntry *GetSelectedEntry() const { return fLbc->GetSelectedEntry(); }
    virtual void GetSelectedEntries(TList *selected);
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    virtual void Selected(Int_t widgetId, Int_t id);   //*SIGNAL*
    virtual void Selected(Int_t id) { Emit("Selected(Int_t)", id); } //*SIGNAL*
diff --git a/gui/inc/TGListTree.h b/gui/inc/TGListTree.h
index 26569e702b31fc2a8638f7b265d0eb4caceca5d7..e751cf73bd081c036f00c1f1f49e9ac1002e287f 100644
--- a/gui/inc/TGListTree.h
+++ b/gui/inc/TGListTree.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGListTree.h,v 1.27 2006/05/28 20:07:59 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGListTree.h,v 1.28 2006/06/19 14:02:27 antcheva Exp $
 // Author: Fons Rademakers   25/02/98
 
 /*************************************************************************
@@ -108,7 +108,7 @@ public:
    void            SetColor(Color_t color) { fHasColor = true;fColor = color; }
    void            ClearColor() { fHasColor = false; }
 
-   void            SavePrimitive(ofstream &out, Option_t *option, Int_t n);
+   void            SavePrimitive(ostream &out, Option_t *option, Int_t n);
 
    ClassDef(TGListTreeItem,0)  //Item that goes into a TGListTree container
 };
@@ -176,7 +176,7 @@ protected:
    void  DrawNode(TGListTreeItem *item, Int_t x, Int_t y);
    void  UpdateChecked(TGListTreeItem *item, Bool_t redraw = kFALSE);
 
-   void  SaveChildren(ofstream &out, TGListTreeItem *item, Int_t &n);
+   void  SaveChildren(ostream &out, TGListTreeItem *item, Int_t &n);
    void  RemoveReference(TGListTreeItem *item);
    void  PDeleteChildren(TGListTreeItem *item);
    void  InsertChild(TGListTreeItem *parent, TGListTreeItem *item);
@@ -295,7 +295,7 @@ public:
    EColorMarkupMode GetColorMode() const { return fColorMode; }
    void SetColorMode(EColorMarkupMode colorMode) { fColorMode = colorMode; }
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGListTree,0)  //Show items in a tree structured list
 };
diff --git a/gui/inc/TGListView.h b/gui/inc/TGListView.h
index 1d8f61b07e88c8d71538ddc8bbc417c321bdb708..26713219d5ff4ecf183703fa993f75793d8cca4b 100644
--- a/gui/inc/TGListView.h
+++ b/gui/inc/TGListView.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGListView.h,v 1.27 2005/11/17 19:09:28 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGListView.h,v 1.28 2006/06/06 14:44:59 antcheva Exp $
 // Author: Fons Rademakers   17/01/98
 
 /*************************************************************************
@@ -161,7 +161,7 @@ public:
    virtual void   SetViewMode(EListViewMode viewMode);
    EListViewMode  GetViewMode() const { return fViewMode; }
    virtual const char *GetHeader(Int_t idx) const;
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    virtual void SelectionChanged() { Emit("SelectionChanged()"); }  //*SIGNAL*
    virtual void Clicked(TGLVEntry *entry, Int_t btn);  //*SIGNAL*
@@ -217,7 +217,7 @@ public:
                               { fListView->SetHeader(s,hmode,cmode,idx); }
    void   SetDefaultHeaders() { fListView->SetDefaultHeaders(); }
    const char *GetHeader(Int_t idx) const { return fListView->GetHeader(idx); }
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGLVContainer,0)  // Listview container
 };
diff --git a/gui/inc/TGMdiFrame.h b/gui/inc/TGMdiFrame.h
index 0fe2729c6fc9889cf7d0ac40372c077a7aea54ab..313081350ecaeb504d4bfa97679752ec56447bd6 100644
--- a/gui/inc/TGMdiFrame.h
+++ b/gui/inc/TGMdiFrame.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGMdiFrame.h,v 1.5 2004/10/25 12:06:50 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGMdiFrame.h,v 1.6 2005/11/21 00:25:37 rdm Exp $
 // Author: Bertrand Bellenot   20/08/2004
 
 /*************************************************************************
@@ -82,7 +82,7 @@ public:
    const char       *GetWindowName();
    const TGPicture  *GetWindowIcon();
 
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGMdiFrame, 0) // MDI Frame
 };
diff --git a/gui/inc/TGMdiMainFrame.h b/gui/inc/TGMdiMainFrame.h
index dcccf7a2a79f1993260f84558e6ef24d324368fe..8386047e26bf076d109ec2e19b1e09993f777436 100644
--- a/gui/inc/TGMdiMainFrame.h
+++ b/gui/inc/TGMdiMainFrame.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGMdiMainFrame.h,v 1.8 2005/07/05 12:36:06 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGMdiMainFrame.h,v 1.9 2005/11/21 00:25:37 rdm Exp $
 // Author: Bertrand Bellenot   20/08/2004
 
 /*************************************************************************
@@ -236,7 +236,7 @@ public:
    virtual void     FrameRestored(Int_t id) { Emit("FrameRestored(Int_t)", id); } //*SIGNAL*
    virtual void     FramesArranged(Int_t mode) { Emit("FramesArranged(Int_t)", mode); } //*SIGNAL*
 
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGMdiMainFrame, 0) // MDI main frame
 };
diff --git a/gui/inc/TGMdiMenu.h b/gui/inc/TGMdiMenu.h
index 27dcc9cac32a911a815ad87da866c60e31f06712..de39d5ba4401ca2d7e25918a0e3381847efd12dd 100644
--- a/gui/inc/TGMdiMenu.h
+++ b/gui/inc/TGMdiMenu.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGMdiMenu.h,v 1.5 2005/11/24 17:08:35 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGMdiMenu.h,v 1.6 2006/03/20 13:34:03 antcheva Exp $
 // Author: Bertrand Bellenot   20/08/2004
 
 /*************************************************************************
@@ -75,7 +75,7 @@ public:
 
    void AddPopup(TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l);
    TGMenuBar *GetMenuBar() const { return fBar;}
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGMdiMenuBar, 0) // MDI menu bar
 };
diff --git a/gui/inc/TGMenu.h b/gui/inc/TGMenu.h
index 0d05d9e362c9715709feb948e55f036928f57e98..406b7333e465423e652afdf95ce2f56c135dc810 100644
--- a/gui/inc/TGMenu.h
+++ b/gui/inc/TGMenu.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGMenu.h,v 1.35 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGMenu.h,v 1.36 2006/05/26 15:13:01 rdm Exp $
 // Author: Fons Rademakers   09/01/98
 
 /*************************************************************************
@@ -226,7 +226,7 @@ public:
    virtual void Activated(Int_t id) { Emit("Activated(Int_t)", id); }  //*SIGNAL*
    virtual void Activate(Bool_t) { }
    virtual void Activate(TGMenuEntry *entry);
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    UInt_t GetEntrySep()  const { return fEntrySep; }
    virtual void SetEntrySep(UInt_t sep)  { fEntrySep = sep; }
@@ -283,7 +283,7 @@ public:
    TGPopupMenu *GetMenu() const { return fMenu; }
    const char  *GetName() const { return fLabel ? fLabel->GetString() : 0; }
    virtual void DoSendMessage();
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGMenuTitle,0)  // Menu title class
 };
@@ -337,7 +337,7 @@ public:
    virtual Bool_t HandleButton(Event_t *event);
    virtual Bool_t HandleMotion(Event_t *event);
    virtual Bool_t HandleKey(Event_t *event);
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGMenuBar,0)  // Menu bar class
 };
diff --git a/gui/inc/TGNumberEntry.h b/gui/inc/TGNumberEntry.h
index 656d7a000b1f32eee45f0a7c07ced0bcb5b0fc7e..ee49cd8f801cca9d054a8f7aae10e7327669b741 100644
--- a/gui/inc/TGNumberEntry.h
+++ b/gui/inc/TGNumberEntry.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGNumberEntry.h,v 1.14 2006/05/28 20:07:59 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGNumberEntry.h,v 1.15 2006/06/28 17:24:34 antcheva Exp $
 // Author: Daniel Sigg   03/09/2001
 
 /*************************************************************************
@@ -152,7 +152,7 @@ public:
    virtual void   Layout();
    virtual Bool_t IsEditable() const { return kFALSE; }
    virtual void   InvalidInput(const char *instr) { Emit("InvalidInput(char*)", instr); }   //*SIGNAL*
-   virtual void   SavePrimitive(ofstream &out, Option_t *);
+   virtual void   SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGNumberEntryField,0)  // A text entry field used by a TGNumberEntry
 };
@@ -284,7 +284,7 @@ public:
    virtual Bool_t IsEditable() const { return kFALSE; }
 
    UInt_t GetDefaultHeight() const { return fNumericEntry->GetDefaultHeight(); }
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
    virtual TGLayoutManager *GetLayoutManager() const;
 
    ClassDef(TGNumberEntry,0)  // Entry field widget for several numeric formats
diff --git a/gui/inc/TGProgressBar.h b/gui/inc/TGProgressBar.h
index 128b3ae8e24fd6f45d8bd9504cc9e582c0b79a78..eb550e0790fb9ba5a25978497a41002a0ada1339 100644
--- a/gui/inc/TGProgressBar.h
+++ b/gui/inc/TGProgressBar.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGProgressBar.h,v 1.11 2006/04/24 13:52:12 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGProgressBar.h,v 1.12 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   10/10/2000
 
 /*************************************************************************
@@ -99,7 +99,7 @@ public:
    virtual void Reset();                                 //*MENU*
    virtual void SetForegroundColor(Pixel_t pixel);
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGProgressBar,0)  // Progress bar abstract base class
 };
@@ -127,7 +127,7 @@ public:
    void ShowPosition(Bool_t set = kTRUE, Bool_t percent = kTRUE,
                      const char *format = "%.2f");
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGHProgressBar,0)  // Horizontal progress bar widget
 };
@@ -151,7 +151,7 @@ public:
 
    virtual TGDimension GetDefaultSize() const
                      { return TGDimension(fBarWidth, fHeight); }
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
    void ShowPos(Bool_t) { }
    void Percent(Bool_t) { }
 
diff --git a/gui/inc/TGScrollBar.h b/gui/inc/TGScrollBar.h
index f84912d19d77b8bad6061c4e182f0cf747a14096..7bf2ac679c92d58a2a43966d771d9c22313fca28 100644
--- a/gui/inc/TGScrollBar.h
+++ b/gui/inc/TGScrollBar.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGScrollBar.h,v 1.13 2006/04/24 13:53:04 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGScrollBar.h,v 1.14 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   10/01/98
 
 /*************************************************************************
@@ -155,7 +155,7 @@ public:
 
    virtual void SetRange(Int_t range, Int_t page_size);  //*MENU*
    virtual void SetPosition(Int_t pos);                  //*MENU* *GETTER=GetPosition
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGHScrollBar,0)  // Horizontal scrollbar widget
 };
@@ -178,7 +178,7 @@ public:
 
    virtual void SetRange(Int_t range, Int_t page_size);  //*MENU*
    virtual void SetPosition(Int_t pos);                  //*MENU*  *GETTER=GetPosition
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGVScrollBar,0)  // Vertical scrollbar widget
 };
diff --git a/gui/inc/TGShutter.h b/gui/inc/TGShutter.h
index 481b84f693f1416252eef92eb22e83dbdbd4b5da..8790f44fcd747349c8a8fc770f798fef2280955b 100644
--- a/gui/inc/TGShutter.h
+++ b/gui/inc/TGShutter.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGShutter.h,v 1.10 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGShutter.h,v 1.11 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   18/9/2000
 
 /*************************************************************************
@@ -64,7 +64,7 @@ public:
    TGFrame  *GetContainer() const { return fCanvas->GetContainer(); }
    virtual void Selected()  { Emit(" Selected()"); } //*SIGNAL*
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGShutterItem,0)  // Shutter widget item
 };
@@ -100,7 +100,7 @@ public:
    TGShutterItem *GetSelectedItem() const { return fSelectedItem; }
    TGShutterItem *GetItem(const char *name);
    virtual void   SetSelectedItem(TGShutterItem *item);
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    virtual Bool_t ProcessMessage(Long_t cmd, Long_t parm1, Long_t parm2);
    virtual void   Selected(TGShutterItem *item) { Emit(" Selected(TGShutterItem*)", item); } //*SIGNAL*
diff --git a/gui/inc/TGSlider.h b/gui/inc/TGSlider.h
index 4f333744c2d8dbe631cf1a1108255f70a157f691..279e48392e2eb806a497721cce1747457c2c5d08 100644
--- a/gui/inc/TGSlider.h
+++ b/gui/inc/TGSlider.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGSlider.h,v 1.11 2006/05/15 07:43:34 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGSlider.h,v 1.12 2006/05/23 04:47:38 brun Exp $
 // Author: Fons Rademakers   14/01/98
 
 /*************************************************************************
@@ -132,7 +132,7 @@ public:
                      { return TGDimension(kSliderWidth, fHeight); }
    virtual void   Resize(UInt_t w, UInt_t h) { TGFrame::Resize(w, h ? h+16 : fHeight + 16); }
    virtual void   Resize(TGDimension size) { Resize(size.fWidth, size.fHeight); }
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGVSlider,0)  // Vertical slider widget
 };
@@ -158,7 +158,7 @@ public:
                      { return TGDimension(fWidth, kSliderHeight); }
    virtual void   Resize(UInt_t w, UInt_t h) { TGFrame::Resize(w ? w+16 : fWidth + 16, h); }
    virtual void   Resize(TGDimension size) { Resize(size.fWidth, size.fHeight); }
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGHSlider,0)  // Horizontal slider widget
 };
diff --git a/gui/inc/TGSplitter.h b/gui/inc/TGSplitter.h
index c7fc06df5b0e228f80bb0d4028687d319233a1ba..c08ede0bc793e79351af0019786d3434eeb59ba0 100644
--- a/gui/inc/TGSplitter.h
+++ b/gui/inc/TGSplitter.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGSplitter.h,v 1.13 2006/05/15 07:43:34 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGSplitter.h,v 1.14 2006/05/23 04:47:38 brun Exp $
 // Author: Fons Rademakers   6/09/2000
 
 /*************************************************************************
@@ -83,7 +83,7 @@ public:
    const TGFrame *GetFrame() const { return fFrame; }
    Bool_t         GetLeft() const { return fLeft; }
    Bool_t         IsLeft() const { return fLeft; }
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    virtual Bool_t HandleButton(Event_t *event);
    virtual Bool_t HandleMotion(Event_t *event);
@@ -119,7 +119,7 @@ public:
    const TGFrame *GetFrame() const { return fFrame; }
    Bool_t         GetAbove() const { return fAbove; }
    Bool_t         IsAbove() const { return fAbove; }
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    virtual Bool_t HandleButton(Event_t *event);
    virtual Bool_t HandleMotion(Event_t *event);
diff --git a/gui/inc/TGStatusBar.h b/gui/inc/TGStatusBar.h
index 393a70139545017f762569c653a267d528acec32..6ef8602aeea5b0561323e266248db49ec8495149 100644
--- a/gui/inc/TGStatusBar.h
+++ b/gui/inc/TGStatusBar.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name: v5-11-02 $:$Id: TGStatusBar.h,v 1.13 2006/04/13 15:32:35 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGStatusBar.h,v 1.14 2006/05/23 04:47:38 brun Exp $
 // Author: Fons Rademakers   23/01/98
 
 /*************************************************************************
@@ -70,7 +70,7 @@ public:
    TGCompositeFrame *GetBarPart(Int_t npart) const;
    TGDimension GetDefaultSize() const;
 
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGStatusBar,0)  // Status bar widget
 };
diff --git a/gui/inc/TGTab.h b/gui/inc/TGTab.h
index 1694ffa2ab4dab5f05f739978b18c7e2bd801537..17d339b353e22c1a9b507a5451cc521b065f3bc9 100644
--- a/gui/inc/TGTab.h
+++ b/gui/inc/TGTab.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTab.h,v 1.19 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTab.h,v 1.20 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   13/01/98
 
 /*************************************************************************
@@ -54,7 +54,7 @@ public:
 
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const;
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGTabLayout,0)  // Layout manager for TGTab widget
 };
@@ -112,7 +112,7 @@ public:
    virtual void      SetText(const char *text = "tab");              //*MENU*icon=bld_rename.png*
    Bool_t            IsEnabled(Int_t tabIndex) const;
 
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
 
    virtual void Selected(Int_t id) { Emit("Selected(Int_t)", id); }  //*SIGNAL*
    virtual TGLayoutManager *GetLayoutManager() const;
diff --git a/gui/inc/TGTableLayout.h b/gui/inc/TGTableLayout.h
index 1f5b88b59edafe9921d0c034fd37e01bb7552a57..e0d3ea2179fe3aec7580156118d45f544337dff3 100644
--- a/gui/inc/TGTableLayout.h
+++ b/gui/inc/TGTableLayout.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTableLayout.h,v 1.3 2003/11/10 15:44:32 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTableLayout.h,v 1.4 2005/09/05 07:33:37 rdm Exp $
 // Author: Brett Viren   04/15/2001
 
 /*************************************************************************
@@ -59,7 +59,7 @@ public:
    UInt_t GetAttachRight() const { return fAttachRight; }
    UInt_t GetAttachTop() const { return fAttachTop; }
    UInt_t GetAttachBottom() const { return fAttachBottom; }
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGTableLayoutHints,0)  // Class describing GUI table layout hints
 };
@@ -125,7 +125,7 @@ public:
 
    virtual void Layout();
    virtual TGDimension GetDefaultSize() const; // return sum of all child sizes
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGTableLayout,0)  // Table layout manager
 };
diff --git a/gui/inc/TGTextEdit.h b/gui/inc/TGTextEdit.h
index 5cb9d4a2869df6896edf441f8de61e4eae772c99..2d3963280f968a2e268d4aed4731f33d9192a9c4 100644
--- a/gui/inc/TGTextEdit.h
+++ b/gui/inc/TGTextEdit.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTextEdit.h,v 1.16 2005/07/05 12:36:06 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTextEdit.h,v 1.17 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   1/7/2000
 
 /*************************************************************************
@@ -131,7 +131,7 @@ public:
    virtual void   Saved() { Emit("Saved()"); }          //*SIGNAL*
    virtual void   SavedAs() { Emit("SavedAs()"); }      //*SIGNAL*
 
-   virtual void   SavePrimitive(ofstream &out, Option_t *);
+   virtual void   SavePrimitive(ostream &out, Option_t * = "");
 
    ClassDef(TGTextEdit,0)  // Text edit widget
 };
diff --git a/gui/inc/TGTextEntry.h b/gui/inc/TGTextEntry.h
index 5121c7302fc18d1e744fc6ad1b8af682918ec8f6..3f58a3095be597dd0ac953d3398628c233c4a073 100644
--- a/gui/inc/TGTextEntry.h
+++ b/gui/inc/TGTextEntry.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTextEntry.h,v 1.29 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTextEntry.h,v 1.30 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   08/01/98
 
 /*************************************************************************
@@ -172,7 +172,7 @@ public:
    Pixel_t              GetForeground() const { return fNormGC.GetForeground(); }
    Bool_t               HasOwnFont() const { return fHasOwnFont; }
 
-   virtual  void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual  void        SavePrimitive(ostream &out, Option_t *option = "");
 
    virtual  Bool_t      HandleButton(Event_t *event);
    virtual  Bool_t      HandleDoubleClick(Event_t *event);
diff --git a/gui/inc/TGTextView.h b/gui/inc/TGTextView.h
index 448ed0acbb2ee4bd32dfa364cc78f082d061dee7..050d4805cd4e84cb14ca1e788b35e3e4774ec904 100644
--- a/gui/inc/TGTextView.h
+++ b/gui/inc/TGTextView.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTextView.h,v 1.15 2006/06/06 07:44:28 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTextView.h,v 1.16 2006/06/09 15:33:05 antcheva Exp $
 // Author: Fons Rademakers   1/7/2000
 
 /*************************************************************************
@@ -98,7 +98,7 @@ public:
    virtual Bool_t HandleButton(Event_t *event);
    virtual Bool_t HandleSelectionRequest(Event_t *event);
 
-   virtual void SavePrimitive(ofstream &out, Option_t *);
+   virtual void SavePrimitive(ostream &out, Option_t * = "");
    virtual void SetText(TGText *text);
    virtual void AddText(TGText *text);
    virtual void AddLine(const char *string);
diff --git a/gui/inc/TGToolBar.h b/gui/inc/TGToolBar.h
index d2c1f3c221ab118977961c393c2976d0eb5af1ae..f46ddda3cbb323320acaecb22de0116ba7d0eb72 100644
--- a/gui/inc/TGToolBar.h
+++ b/gui/inc/TGToolBar.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name: v5-11-02 $:$Id: TGToolBar.h,v 1.14 2006/04/06 11:15:38 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGToolBar.h,v 1.15 2006/05/23 04:47:38 brun Exp $
 // Author: Fons Rademakers   25/02/98
 
 /*************************************************************************
@@ -79,7 +79,7 @@ public:
    virtual void Released(Int_t id) { Emit("Released(Int_t)",id);}   //*SIGNAL*
    virtual void Clicked(Int_t id)  { Emit("Clicked(Int_t)",id); }   //*SIGNAL*
 
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGToolBar,0)  //A bar containing picture buttons
 };
diff --git a/gui/inc/TGTripleSlider.h b/gui/inc/TGTripleSlider.h
index 1a52b9454526770bf04ae5c543c64deeceb29c4b..cc3cdd2def8abfecffdd615af13f6928abfcb0da 100644
--- a/gui/inc/TGTripleSlider.h
+++ b/gui/inc/TGTripleSlider.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTripleSlider.h,v 1.2 2006/02/23 15:40:30 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTripleSlider.h,v 1.3 2006/03/06 12:43:04 antcheva Exp $
 // Author: Bertrand Bellenot   20/01/06
 
 /*************************************************************************
@@ -97,7 +97,7 @@ public:
    virtual void      SetConstrained(Bool_t on = kTRUE);
    virtual void      SetPointerPosition(Float_t pos);
    virtual void      SetRelative(Bool_t rel = kTRUE) { fRelative = rel; }
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGTripleVSlider,0)  // Vertical triple slider widget
 };
@@ -137,7 +137,7 @@ public:
    virtual void      SetConstrained(Bool_t on = kTRUE);
    virtual void      SetPointerPosition(Float_t pos);
    virtual void      SetRelative(Bool_t rel = kTRUE) { fRelative = rel; }
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TGTripleHSlider,0)  // Horizontal triple slider widget
 };
diff --git a/gui/inc/TRootEmbeddedCanvas.h b/gui/inc/TRootEmbeddedCanvas.h
index c5722d0959b96d8674af084a730f846a21df4b56..311ee0b1ac99f02b7251007d8add414a285f6179 100644
--- a/gui/inc/TRootEmbeddedCanvas.h
+++ b/gui/inc/TRootEmbeddedCanvas.h
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TRootEmbeddedCanvas.h,v 1.10 2005/08/10 14:00:34 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TRootEmbeddedCanvas.h,v 1.11 2006/05/23 04:47:38 brun Exp $
 // Author: Fons Rademakers   15/07/98
 
 /*************************************************************************
@@ -64,7 +64,7 @@ public:
    Int_t      GetCanvasWindowId() const { return fCWinId; }
    Bool_t     GetAutoFit() const { return fAutoFit; }
    void       SetAutoFit(Bool_t fit = kTRUE) { fAutoFit = fit; }
-   virtual void SavePrimitive(ofstream &out, Option_t *option);
+   virtual void SavePrimitive(ostream &out, Option_t *option = "");
 
    ClassDef(TRootEmbeddedCanvas,0)  //A ROOT TCanvas that can be embedded in a TGFrame
 };
diff --git a/gui/src/TG3DLine.cxx b/gui/src/TG3DLine.cxx
index 277a1f71cb67b23b1c1a066789dfe5d51bc10897..ac731ca828e017ac454eb8b7bfe305480fd106aa 100644
--- a/gui/src/TG3DLine.cxx
+++ b/gui/src/TG3DLine.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TG3DLine.cxx,v 1.5 2006/05/26 09:16:29 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TG3DLine.cxx,v 1.6 2006/06/01 11:38:15 antcheva Exp $
 // Author: Fons Rademakers   6/09/2000
 
 /*************************************************************************
@@ -50,7 +50,7 @@ TGVertical3DLine::TGVertical3DLine(const TGWindow *p, UInt_t w, UInt_t h,
 }
 
 //______________________________________________________________________________
-void TGHorizontal3DLine::SavePrimitive(ofstream &out, Option_t *option)
+void TGHorizontal3DLine::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an vertical 3D line as a C++ statement(s) on output stream out.
 
@@ -72,7 +72,7 @@ void TGHorizontal3DLine::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGVertical3DLine::SavePrimitive(ofstream &out, Option_t *option)
+void TGVertical3DLine::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an vertical 3D line as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGButton.cxx b/gui/src/TGButton.cxx
index ba3015ec05c6543d826fe90d24a8d6ef0f326e2f..7e0ecea51143e1cb3f24360cfa2578dec47ef5a4 100644
--- a/gui/src/TGButton.cxx
+++ b/gui/src/TGButton.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGButton.cxx,v 1.68 2006/05/26 09:16:29 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGButton.cxx,v 1.69 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   06/01/98
 
 /*************************************************************************
@@ -1415,7 +1415,7 @@ const TGGC &TGRadioButton::GetDefaultGC()
 }
 
 //______________________________________________________________________________
-void TGButton::SavePrimitive(ofstream &out, Option_t *option)
+void TGButton::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a button widget as a C++ statement(s) on output stream out
 
@@ -1447,7 +1447,7 @@ void TGButton::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGTextButton::SavePrimitive(ofstream &out, Option_t *option)
+void TGTextButton::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a text button widget as a C++ statement(s) on output stream out
 
@@ -1524,7 +1524,7 @@ void TGTextButton::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGPictureButton::SavePrimitive(ofstream &out, Option_t *option)
+void TGPictureButton::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a picture button widget as a C++ statement(s) on output stream out
 
@@ -1574,7 +1574,7 @@ void TGPictureButton::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGCheckButton::SavePrimitive(ofstream &out, Option_t *option)
+void TGCheckButton::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a check button widget as a C++ statement(s) on output stream out
 
@@ -1647,7 +1647,7 @@ void TGCheckButton::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGRadioButton::SavePrimitive(ofstream &out, Option_t *option)
+void TGRadioButton::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a radio button widget as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGButtonGroup.cxx b/gui/src/TGButtonGroup.cxx
index 09bbb22546ba9aeab3786e337b2adfe04c539178..d088f74423ba56450db426f6c0299b7f18559e2f 100644
--- a/gui/src/TGButtonGroup.cxx
+++ b/gui/src/TGButtonGroup.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGButtonGroup.cxx,v 1.24 2005/09/05 13:33:08 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGButtonGroup.cxx,v 1.25 2005/11/17 19:09:28 rdm Exp $
 // Author: Valeriy Onuchin & Fons Rademakers   16/10/2000
 
 /*************************************************************************
@@ -464,7 +464,7 @@ void TGButtonGroup::SetLayoutHints(TGLayoutHints *l, TGButton *button)
 }
 
 //______________________________________________________________________________
-void TGButtonGroup::SavePrimitive(ofstream &out, Option_t *option)
+void TGButtonGroup::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a button group widget as a C++ statement(s) on output stream out
 
@@ -550,7 +550,7 @@ void TGButtonGroup::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGHButtonGroup::SavePrimitive(ofstream &out, Option_t *option)
+void TGHButtonGroup::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a button group widget as a C++ statement(s) on output stream out
 
@@ -627,7 +627,7 @@ void TGHButtonGroup::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGVButtonGroup::SavePrimitive(ofstream &out, Option_t *option)
+void TGVButtonGroup::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a button group widget as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGCanvas.cxx b/gui/src/TGCanvas.cxx
index 04385f796e6e99f90a20bdf70fec8f3f0df2e57a..6b1f273a22c57bc2c6f47d31eddb8ebcc08fbe95 100644
--- a/gui/src/TGCanvas.cxx
+++ b/gui/src/TGCanvas.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGCanvas.cxx,v 1.44 2006/05/24 18:20:12 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGCanvas.cxx,v 1.45 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   11/01/98
 
 /*************************************************************************
@@ -2231,7 +2231,7 @@ void TGCanvas::SetScrolling(Int_t scrolling)
 }
 
 //______________________________________________________________________________
-void TGCanvas::SavePrimitive(ofstream &out, Option_t *option)
+void TGCanvas::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a canvas widget as a C++ statement(s) on output stream out.
 
@@ -2287,7 +2287,7 @@ void TGCanvas::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGContainer::SavePrimitive(ofstream &out, Option_t *option)
+void TGContainer::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a canvas container as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGColorSelect.cxx b/gui/src/TGColorSelect.cxx
index 1c8beb017601049c5c135373464eb1b08b772ec8..0686207cfb5f411660c7f4d05a4f7a7bf5917346 100644
--- a/gui/src/TGColorSelect.cxx
+++ b/gui/src/TGColorSelect.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGColorSelect.cxx,v 1.18 2006/05/24 18:20:12 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGColorSelect.cxx,v 1.19 2006/05/28 20:07:59 brun Exp $
 // Author: Bertrand Bellenot + Fons Rademakers   22/08/02
 
 /*************************************************************************
@@ -683,7 +683,7 @@ void TGColorSelect::SetColor(ULong_t color, Bool_t emit)
 }
 
 //______________________________________________________________________________
-void TGColorSelect::SavePrimitive(ofstream &out, Option_t *)
+void TGColorSelect::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
     // Save a color select widget as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGComboBox.cxx b/gui/src/TGComboBox.cxx
index 3191afab04b4b4a5cf930d3db2664f2d2eec432c..168321765d3fc078c79cd3208e00c50c2b9eb572 100644
--- a/gui/src/TGComboBox.cxx
+++ b/gui/src/TGComboBox.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGComboBox.cxx,v 1.44 2006/05/30 11:45:59 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGComboBox.cxx,v 1.45 2006/06/01 09:13:17 antcheva Exp $
 // Author: Fons Rademakers   13/01/98
 
 /*************************************************************************
@@ -561,7 +561,7 @@ void TGComboBox::RemoveAll()
 }
 
 //______________________________________________________________________________
-void TGComboBox::SavePrimitive(ofstream &out, Option_t *option)
+void TGComboBox::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a combo box widget as a C++ statement(s) on output stream out.
 
@@ -626,7 +626,7 @@ TGLineStyleComboBox::TGLineStyleComboBox(const TGWindow *p, Int_t id,
 }
 
 //______________________________________________________________________________
-void TGLineStyleComboBox::SavePrimitive(ofstream &out, Option_t *)
+void TGLineStyleComboBox::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save a line style combo box widget as a C++ statement(s).
 
@@ -665,7 +665,7 @@ TGLineWidthComboBox::TGLineWidthComboBox(const TGWindow *p, Int_t id,
 }
 
 //______________________________________________________________________________
-void TGLineWidthComboBox::SavePrimitive(ofstream &out, Option_t *)
+void TGLineWidthComboBox::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save a line width combo box widget as a C++ statement(s).
 
diff --git a/gui/src/TGDockableFrame.cxx b/gui/src/TGDockableFrame.cxx
index 5e659e597468f9c40f2bef4fe3112be6ae8ea37a..acef472a68aa0db19ae93de7204557ef53d2a1cf 100644
--- a/gui/src/TGDockableFrame.cxx
+++ b/gui/src/TGDockableFrame.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGDockableFrame.cxx,v 1.12 2005/11/25 15:58:16 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGDockableFrame.cxx,v 1.13 2006/05/18 16:32:01 antcheva Exp $
 // Author: Abdelhalim Ssadik   07/07/04
 
 /*************************************************************************
@@ -448,7 +448,7 @@ void TGDockableFrame::SetWindowName(const char *name)
 }
 
 //______________________________________________________________________________
-void TGDockableFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGDockableFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a dockable frame widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGDoubleSlider.cxx b/gui/src/TGDoubleSlider.cxx
index c5d236ae56c3929efaf74f1bb34fb379086730e5..c48f19e05bf977d2574f4fec700eeb588b2cbb40 100644
--- a/gui/src/TGDoubleSlider.cxx
+++ b/gui/src/TGDoubleSlider.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGDoubleSlider.cxx,v 1.13 2005/11/17 19:09:28 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGDoubleSlider.cxx,v 1.14 2006/01/25 10:34:42 antcheva Exp $
 // Author: Reiner Rohlfs   30/09/98
 
 /*************************************************************************
@@ -483,7 +483,7 @@ Bool_t TGDoubleHSlider::HandleMotion(Event_t *event)
 }
 
 //______________________________________________________________________________
-void TGDoubleHSlider::SavePrimitive(ofstream &out, Option_t *option)
+void TGDoubleHSlider::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an horizontal slider as a C++ statement(s) on output stream out.
 
@@ -523,7 +523,7 @@ void TGDoubleHSlider::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGDoubleVSlider::SavePrimitive(ofstream &out, Option_t *option)
+void TGDoubleVSlider::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an horizontal slider as a C++ statement(s) on output stream out.
    
diff --git a/gui/src/TGFSComboBox.cxx b/gui/src/TGFSComboBox.cxx
index 9004cbd88d65ce5d9ec6a36c2864a4f41105b590..4be954a4e8fd7cce39b1669a329f520c3bdf8901 100644
--- a/gui/src/TGFSComboBox.cxx
+++ b/gui/src/TGFSComboBox.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGFSComboBox.cxx,v 1.17 2005/11/17 19:09:28 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGFSComboBox.cxx,v 1.18 2006/05/10 14:06:06 rdm Exp $
 // Author: Fons Rademakers   19/01/98
 
 /*************************************************************************
@@ -356,7 +356,7 @@ void TGFSComboBox::Update(const char *path)
 }
 
 //______________________________________________________________________________
-void TGFSComboBox::SavePrimitive(ofstream &out, Option_t *option)
+void TGFSComboBox::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a file system combo box as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGFSContainer.cxx b/gui/src/TGFSContainer.cxx
index 129c376c50fd7e11356217c2f1c9fdb0af3513c4..30e15a90fa744749b6a117cfd9fda1dfe98d8475 100644
--- a/gui/src/TGFSContainer.cxx
+++ b/gui/src/TGFSContainer.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGFSContainer.cxx,v 1.27 2005/05/25 16:20:54 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGFSContainer.cxx,v 1.28 2005/11/17 19:09:28 rdm Exp $
 // Author: Fons Rademakers   19/01/98
 
 /*************************************************************************
@@ -618,7 +618,7 @@ void TGFileContainer::StartRefreshTimer(ULong_t msec)
 }
 
 //______________________________________________________________________________
-void TGFileContainer::SavePrimitive(ofstream &out, Option_t *option)
+void TGFileContainer::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a file container widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGFont.cxx b/gui/src/TGFont.cxx
index cacc6f4a1fb02bff5faecdde8eca9cf080795f05..765f7ca64ffb791d19041d1d9c6828670ea840c2 100644
--- a/gui/src/TGFont.cxx
+++ b/gui/src/TGFont.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGFont.cxx,v 1.5 2005/11/17 19:09:28 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGFont.cxx,v 1.6 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   20/5/2003
 
 /*************************************************************************
@@ -229,7 +229,7 @@ void TGFontPool::Print(Option_t *) const
 }
 
 //______________________________________________________________________________
-void TGFont::SavePrimitive(ofstream &out, Option_t *)
+void TGFont::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
     // Save the used font as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGFrame.cxx b/gui/src/TGFrame.cxx
index 8340e8d324b5afad97d796bdef2f7f8a18672736..a7e4877e854c937ac272d5a77597de76544ea42a 100644
--- a/gui/src/TGFrame.cxx
+++ b/gui/src/TGFrame.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGFrame.cxx,v 1.134 2006/05/31 09:02:00 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGFrame.cxx,v 1.135 2006/06/01 11:38:15 antcheva Exp $
 // Author: Fons Rademakers   03/01/98
 
 /*************************************************************************
@@ -2214,7 +2214,7 @@ const TGGC &TGGroupFrame::GetDefaultGC()
 }
 
 //______________________________________________________________________________
-void TGFrame::SaveUserColor(ofstream &out, Option_t *)
+void TGFrame::SaveUserColor(ostream &out, Option_t *)
 {
    // Save a user color in a C++ macro file - used in SavePrimitive().
 
@@ -2398,7 +2398,7 @@ TString TGMainFrame::GetMWMinpString() const
 }
 
 //______________________________________________________________________________
-void TGCompositeFrame::SavePrimitiveSubframes(ofstream &out, Option_t *option)
+void TGCompositeFrame::SavePrimitiveSubframes(ostream &out, Option_t *option /*= ""*/)
 {
    // Auxilary protected method  used to save subframes.
 
@@ -2460,7 +2460,7 @@ void TGCompositeFrame::SavePrimitiveSubframes(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGCompositeFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGCompositeFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a composite frame widget as a C++ statement(s) on output stream out.
 
@@ -2759,7 +2759,7 @@ void TGMainFrame::SaveSource(const char *filename, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGMainFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGMainFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a main frame widget as a C++ statement(s) on output stream out.
 
@@ -2807,7 +2807,7 @@ void TGMainFrame::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGHorizontalFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGHorizontalFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a horizontal frame widget as a C++ statement(s) on output stream out.
 
@@ -2846,7 +2846,7 @@ void TGHorizontalFrame::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGVerticalFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGVerticalFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save a vertical frame widget as a C++ statement(s) on output stream out.
 
@@ -2885,7 +2885,7 @@ void TGVerticalFrame::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a frame widget as a C++ statement(s) on output stream out.
 
@@ -2907,7 +2907,7 @@ void TGFrame::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGGroupFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGGroupFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a group frame widget as a C++ statement(s) on output stream out.
 
@@ -3238,7 +3238,7 @@ void TGTransientFrame::SaveSource(const char *filename, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGTransientFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGTransientFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a transient frame widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGGC.cxx b/gui/src/TGGC.cxx
index d8d0e02e98a7ed3cb9a912ebe189df8b51f82c91..6712fbf9bb1a1d68bd5f6b7c95f53d145554dc67 100644
--- a/gui/src/TGGC.cxx
+++ b/gui/src/TGGC.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGGC.cxx,v 1.12 2005/11/17 19:09:28 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGGC.cxx,v 1.13 2006/05/18 16:32:01 antcheva Exp $
 // Author: Fons Rademakers   20/9/2000
 
 /*************************************************************************
@@ -618,7 +618,7 @@ TString TGGC::GetMaskString() const
 }
 
 //______________________________________________________________________________
-void TGGC::SavePrimitive(ofstream &out, Option_t *option)
+void TGGC::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save graphics context info as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGIcon.cxx b/gui/src/TGIcon.cxx
index 95305c09ce87020a6beae937918cb2cec9423fa8..affdf26299565705eaa8269e6ec9a2b14073b61e 100644
--- a/gui/src/TGIcon.cxx
+++ b/gui/src/TGIcon.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGIcon.cxx,v 1.16 2006/05/24 18:20:12 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGIcon.cxx,v 1.17 2006/05/28 20:07:59 brun Exp $
 // Author: Fons Rademakers   05/01/98
 
 /*************************************************************************
@@ -219,7 +219,7 @@ void TGIcon::SetImagePath(const char *path)
 }
 
 //______________________________________________________________________________
-void TGIcon::SavePrimitive(ofstream &out, Option_t *option)
+void TGIcon::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an icon widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGLabel.cxx b/gui/src/TGLabel.cxx
index bb2072fa3273388541519d4f4a083c97a20cea08..e5074eb73e417b33f42faa83f17fba4bb6a53062 100644
--- a/gui/src/TGLabel.cxx
+++ b/gui/src/TGLabel.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGLabel.cxx,v 1.25 2006/05/28 20:07:59 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGLabel.cxx,v 1.26 2006/06/01 11:38:15 antcheva Exp $
 // Author: Fons Rademakers   06/01/98
 
 /*************************************************************************
@@ -331,7 +331,7 @@ Bool_t TGLabel::HasOwnFont() const
 }
 
 //______________________________________________________________________________
-void TGLabel::SavePrimitive(ofstream &out, Option_t *option)
+void TGLabel::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a label widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGLayout.cxx b/gui/src/TGLayout.cxx
index c7244518c5674edbfebd8817a8652ef6e4559bcc..655e7b7bacc8c1ca182a0a0d2bbe4775a11e4f2c 100644
--- a/gui/src/TGLayout.cxx
+++ b/gui/src/TGLayout.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGLayout.cxx,v 1.21 2006/04/18 12:32:43 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGLayout.cxx,v 1.22 2006/05/31 09:02:00 antcheva Exp $
 // Author: Fons Rademakers   02/01/98
 
 /*************************************************************************
@@ -950,7 +950,7 @@ TGDimension TGListDetailsLayout::GetDefaultSize() const
 }
 
 // ________________________________________________________________________
-void TGLayoutHints::SavePrimitive(ofstream &out, Option_t *)
+void TGLayoutHints::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save layout hints as a C++ statement(s) on output stream out
@@ -1007,7 +1007,7 @@ void TGLayoutHints::SavePrimitive(ofstream &out, Option_t *)
 }
 
 // __________________________________________________________________________
-void TGVerticalLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGVerticalLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save vertical layout manager as a C++ statement(s) on output stream
@@ -1017,7 +1017,7 @@ void TGVerticalLayout::SavePrimitive(ofstream &out, Option_t *)
 }
 
 // __________________________________________________________________________
-void TGHorizontalLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGHorizontalLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save horizontal layout manager as a C++ statement(s) on output stream
@@ -1026,7 +1026,7 @@ void TGHorizontalLayout::SavePrimitive(ofstream &out, Option_t *)
 }
 
 // __________________________________________________________________________
-void TGRowLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGRowLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save row layout manager as a C++ statement(s) on output stream
@@ -1036,7 +1036,7 @@ void TGRowLayout::SavePrimitive(ofstream &out, Option_t *)
 }
 
 // __________________________________________________________________________
-void TGColumnLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGColumnLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save column layout manager as a C++ statement(s) on output stream
@@ -1047,7 +1047,7 @@ void TGColumnLayout::SavePrimitive(ofstream &out, Option_t *)
 }
 
 // __________________________________________________________________________
-void TGMatrixLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGMatrixLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save matrix layout manager as a C++ statement(s) on output stream
@@ -1061,7 +1061,7 @@ void TGMatrixLayout::SavePrimitive(ofstream &out, Option_t *)
 }
 
 // __________________________________________________________________________
-void TGTileLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGTileLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save tile layout manager as a C++ statement(s) on output stream
@@ -1072,7 +1072,7 @@ void TGTileLayout::SavePrimitive(ofstream &out, Option_t *)
 }
 
 // __________________________________________________________________________
-void TGListLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGListLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save list layout manager as a C++ statement(s) on output stream
@@ -1083,7 +1083,7 @@ void TGListLayout::SavePrimitive(ofstream &out, Option_t *)
 }
 
 // __________________________________________________________________________
-void TGListDetailsLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGListDetailsLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save list details layout manager as a C++ statement(s) on out stream
diff --git a/gui/src/TGListBox.cxx b/gui/src/TGListBox.cxx
index b0bf5bc5a1c185208ac26b3e877226c876402a7a..564b0ad42e1be2f49dc089b162a3281c448e70d8 100644
--- a/gui/src/TGListBox.cxx
+++ b/gui/src/TGListBox.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGListBox.cxx,v 1.55 2006/05/30 06:40:10 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGListBox.cxx,v 1.56 2006/05/30 11:29:42 antcheva Exp $
 // Author: Fons Rademakers   12/01/98
 
 /*************************************************************************
@@ -1568,7 +1568,7 @@ TGLBEntry *TGListBox::FindEntry(const char *name) const
 }
 
 //______________________________________________________________________________
-void TGListBox::SavePrimitive(ofstream &out, Option_t *option)
+void TGListBox::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save a list box widget as a C++ statement(s) on output stream out.
 
@@ -1608,7 +1608,7 @@ void TGListBox::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGTextLBEntry::SavePrimitive(ofstream &out, Option_t *)
+void TGTextLBEntry::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save a list box entry widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGListTree.cxx b/gui/src/TGListTree.cxx
index bea64c2a789eb5c786a9ceb2c873bf85a0c4a225..a5b68b6b2cfaaa3ba5239b708a39dd6d311a0b62 100644
--- a/gui/src/TGListTree.cxx
+++ b/gui/src/TGListTree.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGListTree.cxx,v 1.54 2006/06/19 14:02:27 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGListTree.cxx,v 1.55 2006/06/19 14:08:33 antcheva Exp $
 // Author: Fons Rademakers   25/02/98
 
 /*************************************************************************
@@ -2159,7 +2159,7 @@ const TGGC &TGListTree::GetColorGC()
 }
 
 //______________________________________________________________________________
-void TGListTree::SavePrimitive(ofstream &out, Option_t *option)
+void TGListTree::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a list tree widget as a C++ statements on output stream out.
 
@@ -2220,7 +2220,7 @@ void TGListTree::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGListTree::SaveChildren(ofstream &out, TGListTreeItem *item, Int_t &n)
+void TGListTree::SaveChildren(ostream &out, TGListTreeItem *item, Int_t &n)
 {
    // Save child items as a C++ statements on output stream out.
    
@@ -2237,7 +2237,7 @@ void TGListTree::SaveChildren(ofstream &out, TGListTreeItem *item, Int_t &n)
 }
 
 //______________________________________________________________________________
-void TGListTreeItem::SavePrimitive(ofstream &out, Option_t *option, Int_t n)
+void TGListTreeItem::SavePrimitive(ostream &out, Option_t *option, Int_t n)
 {
    // Save a list tree item attributes as a C++ statements on output stream.
 
diff --git a/gui/src/TGListView.cxx b/gui/src/TGListView.cxx
index 8d288204b3c854957af1b0f8cce9ec61e4910cfb..b16077501ef1ce2fee5d87a76d3ab59e1dd27f9e 100644
--- a/gui/src/TGListView.cxx
+++ b/gui/src/TGListView.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGListView.cxx,v 1.36 2006/06/06 14:44:59 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGListView.cxx,v 1.37 2006/06/09 15:01:10 antcheva Exp $
 // Author: Fons Rademakers   17/01/98
 
 /*************************************************************************
@@ -1036,7 +1036,7 @@ const TGGC &TGListView::GetDefaultGC()
 }
 
 //______________________________________________________________________________
-void TGListView::SavePrimitive(ofstream &out, Option_t *option)
+void TGListView::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a list view widget as a C++ statement(s) on output stream out.
 
@@ -1093,7 +1093,7 @@ void TGListView::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGLVContainer::SavePrimitive(ofstream &out, Option_t *option)
+void TGLVContainer::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a list view container as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGMdiFrame.cxx b/gui/src/TGMdiFrame.cxx
index 79a6575d4f5f777d999469363a3fc3aec79442de..e0131aee3f4debeb256b944a7aa027659a7356c5 100644
--- a/gui/src/TGMdiFrame.cxx
+++ b/gui/src/TGMdiFrame.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGMdiFrame.cxx,v 1.8 2005/11/24 17:08:35 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGMdiFrame.cxx,v 1.9 2006/03/29 08:09:43 antcheva Exp $
 // Author: Bertrand Bellenot   20/08/2004
 
 /*************************************************************************
@@ -185,7 +185,7 @@ TString TGMdiFrame::GetMdiHintsString() const
 }
 
 //______________________________________________________________________________
-void TGMdiFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGMdiFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a MDIframe as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGMdiMainFrame.cxx b/gui/src/TGMdiMainFrame.cxx
index f6bf0e44889ae1e1abf76b039e0261621628960c..2eca98bd31dea4c69aca4c1dedaff74a21074367 100644
--- a/gui/src/TGMdiMainFrame.cxx
+++ b/gui/src/TGMdiMainFrame.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGMdiMainFrame.cxx,v 1.20 2006/03/23 09:40:01 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGMdiMainFrame.cxx,v 1.21 2006/05/11 12:50:07 antcheva Exp $
 // Author: Bertrand Bellenot   20/08/2004
 
 /*************************************************************************
@@ -1191,7 +1191,7 @@ Bool_t TGMdiContainer::HandleConfigureNotify(Event_t *event)
 }
 
 //______________________________________________________________________________
-void TGMdiMainFrame::SavePrimitive(ofstream &out, Option_t *option)
+void TGMdiMainFrame::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a MDI main frame as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGMdiMenu.cxx b/gui/src/TGMdiMenu.cxx
index 9b32cb7f73f696f9c0ddda12ab5b2085759ad77a..0a6fc0ca4364f288fd57cf12fba8769edcd4c17c 100644
--- a/gui/src/TGMdiMenu.cxx
+++ b/gui/src/TGMdiMenu.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGMdiMenu.cxx,v 1.6 2005/11/21 00:25:38 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGMdiMenu.cxx,v 1.7 2006/03/20 13:34:03 antcheva Exp $
 // Author: Bertrand Bellenot   20/08/2004
 
 /*************************************************************************
@@ -167,7 +167,7 @@ void TGMdiMenuBar::HideFrames(TGMdiTitleIcon *icon, TGMdiButtons *buttons)
 }
 
 //______________________________________________________________________________
-void TGMdiMenuBar::SavePrimitive(ofstream &out, Option_t *option)
+void TGMdiMenuBar::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a MDI menu as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGMenu.cxx b/gui/src/TGMenu.cxx
index b4da71b7200d596a51004db181645d1f9d098c8c..c43e6496cd24588c2a815d3e097b48f35995f06b 100644
--- a/gui/src/TGMenu.cxx
+++ b/gui/src/TGMenu.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGMenu.cxx,v 1.64 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGMenu.cxx,v 1.65 2006/05/24 18:20:12 brun Exp $
 // Author: Fons Rademakers   09/01/98
 
 /*************************************************************************
@@ -1954,7 +1954,7 @@ const TGGC &TGMenuTitle::GetDefaultSelectedGC()
 }
 
 //______________________________________________________________________________
-void TGPopupMenu::SavePrimitive(ofstream &out, Option_t *option)
+void TGPopupMenu::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a popup menu widget as a C++ statement(s) on output stream out.
 
@@ -2084,7 +2084,7 @@ void TGPopupMenu::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGMenuTitle::SavePrimitive(ofstream &out, Option_t *option)
+void TGMenuTitle::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save a title menu widget as a C++ statement(s) on output stream out.
 
@@ -2116,7 +2116,7 @@ void TGMenuTitle::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGMenuBar::SavePrimitive(ofstream &out, Option_t *option)
+void TGMenuBar::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save a menu bar widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGNumberEntry.cxx b/gui/src/TGNumberEntry.cxx
index 1be2e0dea994881f79468d9948901384dc0bb20a..e806672b0a8171b694b91c048a9ecccfaf13c4e8 100644
--- a/gui/src/TGNumberEntry.cxx
+++ b/gui/src/TGNumberEntry.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGNumberEntry.cxx,v 1.25 2006/05/24 18:20:12 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGNumberEntry.cxx,v 1.26 2006/06/28 17:24:34 antcheva Exp $
 // Author: Daniel Sigg   03/09/2001
 
 /*************************************************************************
@@ -2127,7 +2127,7 @@ void TGNumberEntry::ValueSet(Long_t val)
 }
 
 //______________________________________________________________________________
-void TGNumberEntry::SavePrimitive(ofstream &out, Option_t *)
+void TGNumberEntry::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save a number entry widget as a C++ statement(s) on output stream out.
 
@@ -2241,7 +2241,7 @@ void TGNumberEntry::SavePrimitive(ofstream &out, Option_t *)
 }
 
 //______________________________________________________________________________
-void TGNumberEntryField::SavePrimitive(ofstream &out, Option_t *)
+void TGNumberEntryField::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save a number entry widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGProgressBar.cxx b/gui/src/TGProgressBar.cxx
index 60c39f65c562e1f76a87870231f92f8f9d5046d3..c935e12dec5eb2b7d5566d2ea7b82e40b3f21ae8 100644
--- a/gui/src/TGProgressBar.cxx
+++ b/gui/src/TGProgressBar.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGProgressBar.cxx,v 1.15 2006/05/28 20:08:00 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGProgressBar.cxx,v 1.16 2006/06/14 10:22:36 antcheva Exp $
 // Author: Fons Rademakers   10/10/2000
 
 /*************************************************************************
@@ -395,7 +395,7 @@ void TGVProgressBar::DoRedraw()
 }
 
 //______________________________________________________________________________
-void TGProgressBar::SavePrimitive(ofstream &out, Option_t *option)
+void TGProgressBar::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save progress bar parameters as a C++ statement(s) on output stream out.
 
@@ -437,7 +437,7 @@ void TGProgressBar::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGVProgressBar::SavePrimitive(ofstream &out, Option_t *option)
+void TGVProgressBar::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a vertical progress bar as a C++ statement(s) on output stream out.
 
@@ -460,7 +460,7 @@ void TGVProgressBar::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGHProgressBar::SavePrimitive(ofstream &out, Option_t *option)
+void TGHProgressBar::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save a horizontal progress bar as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGScrollBar.cxx b/gui/src/TGScrollBar.cxx
index 5f7cd1948950e6b0b998cae635600b9c7c0f8f5c..0573cfaeaeb587e3bf7f3a4f35f859edd4aed0b8 100644
--- a/gui/src/TGScrollBar.cxx
+++ b/gui/src/TGScrollBar.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGScrollBar.cxx,v 1.17 2006/05/29 12:04:45 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGScrollBar.cxx,v 1.18 2006/06/14 07:52:55 antcheva Exp $
 // Author: Fons Rademakers   10/01/98
 
 /*************************************************************************
@@ -766,7 +766,7 @@ void TGVScrollBar::SetPosition(Int_t pos)
 }
 
 //______________________________________________________________________________
-void TGHScrollBar::SavePrimitive(ofstream &out, Option_t *option)
+void TGHScrollBar::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an horizontal scrollbar as a C++ statement(s) on output stream out.
 
@@ -791,7 +791,7 @@ void TGHScrollBar::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGVScrollBar::SavePrimitive(ofstream &out, Option_t *option)
+void TGVScrollBar::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an vertical scrollbar as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGShutter.cxx b/gui/src/TGShutter.cxx
index ec2bfb93cd24fa42d2a3dbfeb078e48764ac0f0e..a6c92b3d40db4390f70b8e9103b156e938c543fe 100644
--- a/gui/src/TGShutter.cxx
+++ b/gui/src/TGShutter.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGShutter.cxx,v 1.15 2006/05/28 20:08:00 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGShutter.cxx,v 1.16 2006/05/30 06:40:10 antcheva Exp $
 // Author: Fons Rademakers   18/9/2000
 
 /*************************************************************************
@@ -390,7 +390,7 @@ TGShutterItem::~TGShutterItem()
 }
 
 //______________________________________________________________________________
-void TGShutterItem::SavePrimitive(ofstream &out, Option_t *option)
+void TGShutterItem::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a shutter item widget as a C++ statement(s) on output stream out
 
@@ -442,7 +442,7 @@ void TGShutterItem::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGShutter::SavePrimitive(ofstream &out, Option_t *option)
+void TGShutter::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a shutter widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGSlider.cxx b/gui/src/TGSlider.cxx
index 38b41df8c4839103403d5a8af49ad6a1a4338e45..acbad27ac4b4da7e346320be7f2049bf13793d81 100644
--- a/gui/src/TGSlider.cxx
+++ b/gui/src/TGSlider.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGSlider.cxx,v 1.17 2006/05/23 04:47:38 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGSlider.cxx,v 1.18 2006/05/24 18:20:12 brun Exp $
 // Author: Fons Rademakers   14/01/98
 
 /*************************************************************************
@@ -432,7 +432,7 @@ TString TGSlider::GetTypeString() const
 }
 
 //______________________________________________________________________________
-void TGHSlider::SavePrimitive(ofstream &out, Option_t *option)
+void TGHSlider::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an horizontal slider as a C++ statement(s) on output stream out.
 
@@ -464,7 +464,7 @@ void TGHSlider::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGVSlider::SavePrimitive(ofstream &out, Option_t *option)
+void TGVSlider::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an horizontal slider as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGSplitter.cxx b/gui/src/TGSplitter.cxx
index 51476ed10773a9776320b36e44914a2496b00861..aaa74913942ae1ed0d3d463f4279be12a242b3ab 100644
--- a/gui/src/TGSplitter.cxx
+++ b/gui/src/TGSplitter.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGSplitter.cxx,v 1.11 2006/04/12 11:11:43 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGSplitter.cxx,v 1.12 2006/06/13 14:50:35 antcheva Exp $
 // Author: Fons Rademakers   6/09/2000
 
 /*************************************************************************
@@ -337,7 +337,7 @@ void TGHSplitter::DrawBorder()
 }
 
 //______________________________________________________________________________
-void TGVSplitter::SavePrimitive(ofstream &out, Option_t *option)
+void TGVSplitter::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save a splitter widget as a C++ statement(s) on output stream out.
 
@@ -363,7 +363,7 @@ void TGVSplitter::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGHSplitter::SavePrimitive(ofstream &out, Option_t *option)
+void TGHSplitter::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save a splitter widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGStatusBar.cxx b/gui/src/TGStatusBar.cxx
index 1bd36baa0b68bcfba7dd31e19a9405382ad5aa17..e708afdbd925c09d07fcdf015559d542ae6406c9 100644
--- a/gui/src/TGStatusBar.cxx
+++ b/gui/src/TGStatusBar.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGStatusBar.cxx,v 1.18 2006/05/24 18:20:12 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGStatusBar.cxx,v 1.19 2006/05/31 09:02:00 antcheva Exp $
 // Author: Fons Rademakers   23/01/98
 
 /*************************************************************************
@@ -386,7 +386,7 @@ TGDimension TGStatusBar::GetDefaultSize() const
 }
 
 //______________________________________________________________________________
-void TGStatusBar::SavePrimitive(ofstream &out, Option_t *option)
+void TGStatusBar::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save a status bar widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGTab.cxx b/gui/src/TGTab.cxx
index 200fddadc6d8d84a08c6e2805a95c89fbad567b8..74154b3b837b124a454c6c590c1b852df988844d 100644
--- a/gui/src/TGTab.cxx
+++ b/gui/src/TGTab.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTab.cxx,v 1.34 2006/05/28 20:08:00 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTab.cxx,v 1.35 2006/05/30 06:40:10 antcheva Exp $
 // Author: Fons Rademakers   13/01/98
 
 /*************************************************************************
@@ -714,7 +714,7 @@ TGLayoutManager *TGTab::GetLayoutManager() const
 }
 
 //______________________________________________________________________________
-void TGTab::SavePrimitive(ofstream &out, Option_t *option)
+void TGTab::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a tab widget as a C++ statement(s) on output stream out.
 
@@ -806,7 +806,7 @@ void TGTab::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 // __________________________________________________________________________
-void TGTabLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGTabLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save tab layout manager as a C++ statement(s) on out stream
diff --git a/gui/src/TGTableLayout.cxx b/gui/src/TGTableLayout.cxx
index b0ac30c844369651f2f497fae0bce8079efb44be..2826b7dc70d24a108d23f3ce3f41cb91e624ff2c 100644
--- a/gui/src/TGTableLayout.cxx
+++ b/gui/src/TGTableLayout.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTableLayout.cxx,v 1.9 2005/11/17 19:09:28 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTableLayout.cxx,v 1.10 2006/04/18 12:31:41 antcheva Exp $
 // Author: Brett Viren   04/15/2001
 
 /*************************************************************************
@@ -612,7 +612,7 @@ TGDimension TGTableLayout::GetDefaultSize() const
 }
 
 // ________________________________________________________________________
-void TGTableLayoutHints::SavePrimitive(ofstream &out, Option_t *)
+void TGTableLayoutHints::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save table layout hints as a C++ statement(s) on output stream out.
@@ -684,7 +684,7 @@ void TGTableLayoutHints::SavePrimitive(ofstream &out, Option_t *)
 }
 
 // __________________________________________________________________________
-void TGTableLayout::SavePrimitive(ofstream &out, Option_t *)
+void TGTableLayout::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 
    // Save table layout as a C++ statement(s) on output stream.
diff --git a/gui/src/TGTextEdit.cxx b/gui/src/TGTextEdit.cxx
index 8e1f6820f0e67874972b662f2c3ab94323086b47..c478f92de5c74ab116fab3912b801601ad64e620 100644
--- a/gui/src/TGTextEdit.cxx
+++ b/gui/src/TGTextEdit.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTextEdit.cxx,v 1.38 2006/06/20 13:17:48 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTextEdit.cxx,v 1.39 2006/06/21 12:20:22 antcheva Exp $
 // Author: Fons Rademakers   3/7/2000
 
 /*************************************************************************
@@ -1785,7 +1785,7 @@ const TGGC &TGTextEdit::GetCursor1GC()
 }
 
 //______________________________________________________________________________
-void TGTextEdit::SavePrimitive(ofstream &out, Option_t *)
+void TGTextEdit::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save a text edit widget as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGTextEntry.cxx b/gui/src/TGTextEntry.cxx
index 7458db467b005bfacf01ed542ffe891073c79fd5..979ab75313a300ffe3e51d2a54b01de8a44bf726 100644
--- a/gui/src/TGTextEntry.cxx
+++ b/gui/src/TGTextEntry.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTextEntry.cxx,v 1.42 2006/05/24 18:20:12 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTextEntry.cxx,v 1.43 2006/05/28 20:08:00 brun Exp $
 // Author: Fons Rademakers   08/01/98
 
 /*************************************************************************
@@ -1775,7 +1775,7 @@ const TGGC &TGTextEntry::GetDefaultSelectedBackgroundGC()
 }
 
 //______________________________________________________________________________
-void TGTextEntry::SavePrimitive(ofstream &out, Option_t *option)
+void TGTextEntry::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save a text entry widget as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGTextView.cxx b/gui/src/TGTextView.cxx
index 1b819f1a067a3646e44e2f15f2f2b7dfaa06452c..d960b6799c83397658bcffcaed6128dcf3c9cf85 100644
--- a/gui/src/TGTextView.cxx
+++ b/gui/src/TGTextView.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTextView.cxx,v 1.24 2006/05/28 20:08:00 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTextView.cxx,v 1.25 2006/06/06 07:44:28 antcheva Exp $
 // Author: Fons Rademakers   1/7/2000
 
 /*************************************************************************
@@ -844,7 +844,7 @@ const TGGC &TGTextView::GetDefaultSelectedBackgroundGC()
 }
 
 //______________________________________________________________________________
-void TGTextView::SavePrimitive(ofstream &out, Option_t *)
+void TGTextView::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save a text edit widget as a C++ statement(s) on output stream out
 
diff --git a/gui/src/TGToolBar.cxx b/gui/src/TGToolBar.cxx
index 487ebef92f8f6dbcdb88fbdd9e152d688030776c..74e71a2cef4b557405a372b84ca64fa87861f40a 100644
--- a/gui/src/TGToolBar.cxx
+++ b/gui/src/TGToolBar.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGToolBar.cxx,v 1.18 2006/03/28 17:04:31 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGToolBar.cxx,v 1.19 2006/04/06 11:15:38 antcheva Exp $
 // Author: Fons Rademakers   25/02/98
 
 /*************************************************************************
@@ -262,7 +262,7 @@ void TGToolBar::ButtonClicked()
 }
 
 //______________________________________________________________________________
-void TGToolBar::SavePrimitive(ofstream &out, Option_t *option)
+void TGToolBar::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save an horizontal slider as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TGTripleSlider.cxx b/gui/src/TGTripleSlider.cxx
index b87f2168b8a53b326b2c54477d35abde7fa29fdf..c67c0ac6a41e8ed89210be04dabdd5769fe373ac 100644
--- a/gui/src/TGTripleSlider.cxx
+++ b/gui/src/TGTripleSlider.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTripleSlider.cxx,v 1.2 2006/02/23 15:40:30 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTripleSlider.cxx,v 1.3 2006/03/06 09:10:44 antcheva Exp $
 // Author: Bertrand Bellenot   20/01/06
 
 /*************************************************************************
@@ -557,7 +557,7 @@ void TGTripleHSlider::SetPointerPosition(Float_t pos)
 }
 
 //______________________________________________________________________________
-void TGTripleHSlider::SavePrimitive(ofstream &out, Option_t *option)
+void TGTripleHSlider::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an horizontal slider as a C++ statement(s) on output stream out.
 
@@ -614,7 +614,7 @@ void TGTripleHSlider::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TGTripleVSlider::SavePrimitive(ofstream &out, Option_t *option)
+void TGTripleVSlider::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save an horizontal slider as a C++ statement(s) on output stream out.
    
diff --git a/gui/src/TRootCanvas.cxx b/gui/src/TRootCanvas.cxx
index f4d01b4353369e1618a94cc863073ec141ce49d6..5eef03388acbecf7024c1702882def17beeaf3be 100644
--- a/gui/src/TRootCanvas.cxx
+++ b/gui/src/TRootCanvas.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TRootCanvas.cxx,v 1.102 2006/05/28 20:08:00 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TRootCanvas.cxx,v 1.103 2006/05/29 14:00:36 antcheva Exp $
 // Author: Fons Rademakers   15/01/98
 
 /*************************************************************************
@@ -235,7 +235,7 @@ public:
                { return fCanvas->HandleContainerExpose(ev); }
    Bool_t  HandleCrossing(Event_t *ev)
                { return fCanvas->HandleContainerCrossing(ev); }
-   void    SavePrimitive(ofstream &out, Option_t *);
+   void    SavePrimitive(ostream &out, Option_t * = "");
    void    SetEditable(Bool_t) { }
 };
 
@@ -1647,7 +1647,7 @@ Bool_t TRootCanvas::HandleContainerCrossing(Event_t *event)
 }
 
 //______________________________________________________________________________
-void TRootContainer::SavePrimitive(ofstream &out, Option_t *)
+void TRootContainer::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save a canvas container as a C++ statement(s) on output stream out.
 
diff --git a/gui/src/TRootEmbeddedCanvas.cxx b/gui/src/TRootEmbeddedCanvas.cxx
index eaef4fc9e5ef61e1080e24850220ec4a2bc8fed5..731a4e6806b6e0b909e0392160350dedef4621f8 100644
--- a/gui/src/TRootEmbeddedCanvas.cxx
+++ b/gui/src/TRootEmbeddedCanvas.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TRootEmbeddedCanvas.cxx,v 1.23 2006/05/28 20:08:00 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TRootEmbeddedCanvas.cxx,v 1.24 2006/05/31 09:02:00 antcheva Exp $
 // Author: Fons Rademakers   15/07/98
 
 /*************************************************************************
@@ -307,7 +307,7 @@ Bool_t TRootEmbeddedCanvas::HandleContainerCrossing(Event_t *event)
 }
 
 //______________________________________________________________________________
-void TRootEmbeddedCanvas::SavePrimitive(ofstream &out, Option_t *option)
+void TRootEmbeddedCanvas::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save an embedded canvas as a C++ statement(s) on output stream out.
 
diff --git a/hist/inc/TAxis.h b/hist/inc/TAxis.h
index c1de37d052be4bc57e51b816ed96e9294a870404..6f1e8f00998466a707c61a1ab04b81d21692ba06 100644
--- a/hist/inc/TAxis.h
+++ b/hist/inc/TAxis.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TAxis.h,v 1.36 2006/05/17 17:44:45 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: TAxis.h,v 1.37 2006/05/23 04:47:39 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -119,7 +119,7 @@ public:
                       }
    virtual void       LabelsOption(Option_t *option="h");  // *MENU*
    virtual void       RotateTitle(Bool_t rotate=kTRUE); // *TOGGLE* *GETTER=GetRotateTitle
-   virtual void       SaveAttributes(ofstream &out, const char *name, const char *subname);
+   virtual void       SaveAttributes(ostream &out, const char *name, const char *subname);
    virtual void       Set(Int_t nbins, Double_t xmin, Double_t xmax);
    virtual void       Set(Int_t nbins, const Float_t *xbins);
    virtual void       Set(Int_t nbins, const Double_t *xbins);
diff --git a/hist/inc/TF1.h b/hist/inc/TF1.h
index baad7c8723ababe7485d410bd262384894167a25..4c6ac3a62952d9ce102a13689007942fd0e2cf6e 100644
--- a/hist/inc/TF1.h
+++ b/hist/inc/TF1.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TF1.h,v 1.55 2006/02/22 14:57:43 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: TF1.h,v 1.56 2006/05/20 15:31:16 brun Exp $
 // Author: Rene Brun   18/08/95
 
 /*************************************************************************
@@ -153,7 +153,7 @@ public:
    virtual void     Print(Option_t *option="") const;
    virtual void     ReleaseParameter(Int_t ipar);
    virtual void     Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax);
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetChisquare(Double_t chi2) {fChisquare = chi2;}
    virtual void     SetFunction(Double_t (*fcn)(Double_t *, Double_t *)) { fFunction = fcn;}
    virtual void     SetMaximum(Double_t maximum=-1111); // *MENU*
diff --git a/hist/inc/TF12.h b/hist/inc/TF12.h
index 44e3e1e11f59d62fa3cd3ab0e485bcf345fe897e..14eee7a0645b0f103d1680dfec50d237ddf6e3d5 100644
--- a/hist/inc/TF12.h
+++ b/hist/inc/TF12.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TF12.h,v 1.1 2003/04/05 16:53:03 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: TF12.h,v 1.2 2005/04/29 20:34:51 brun Exp $
 // Author: Rene Brun   05/04/2003
 
 /*************************************************************************
@@ -45,7 +45,7 @@ public:
    virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const;
    virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0);
    virtual Double_t GetXY() const {return fXY;}
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetXY(Double_t xy);  // *MENU*
    
    ClassDef(TF12,1)  //Projection of a TF2 along x or y
diff --git a/hist/inc/TF2.h b/hist/inc/TF2.h
index 0859eb4133bd633cac48f749c02519aeff0afbf1..3527c45ef7feaccaacec3f2e6f072060013f48c6 100644
--- a/hist/inc/TF2.h
+++ b/hist/inc/TF2.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TF2.h,v 1.19 2005/08/03 17:40:34 pcanal Exp $
+// @(#)root/hist:$Name:  $:$Id: TF2.h,v 1.20 2005/11/21 09:47:20 brun Exp $
 // Author: Rene Brun   23/08/95
 
 /*************************************************************************
@@ -78,7 +78,7 @@ public:
    virtual Bool_t   IsInside(const Double_t *x) const;
    virtual void     Paint(Option_t *option="");
    virtual void     Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax);
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetNpy(Int_t npy=100); // *MENU*
    virtual void     SetContour(Int_t nlevels=20, const Double_t *levels=0);
    virtual void     SetContourLevel(Int_t level, Double_t value);
diff --git a/hist/inc/TF3.h b/hist/inc/TF3.h
index df2c95c5095c91c6a911d6f24f964cd4b58679c1..fd02f00ccd106c0aae1bb082a646b1bccdf0eb8e 100644
--- a/hist/inc/TF3.h
+++ b/hist/inc/TF3.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TF3.h,v 1.16 2005/08/03 17:40:34 pcanal Exp $
+// @(#)root/hist:$Name:  $:$Id: TF3.h,v 1.17 2005/11/21 09:47:20 brun Exp $
 // Author: Rene Brun   27/10/95
 
 /*************************************************************************
@@ -71,7 +71,7 @@ public:
    virtual Bool_t   IsInside(const Double_t *x) const;
    virtual void     Paint(Option_t *option="");
    virtual void     Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax);
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetClippingBoxOff(); // *MENU*
    virtual void     SetClippingBoxOn(Double_t xclip=0, Double_t yclip=0, Double_t zclip=0); // *MENU*
    virtual void     SetNpz(Int_t npz=30);
diff --git a/hist/inc/TGraph2D.h b/hist/inc/TGraph2D.h
index 154622ec143988559b109e14ef2ba0445fbbb3ee..8437c9f40c46270552102176b5af31095ac3a126 100644
--- a/hist/inc/TGraph2D.h
+++ b/hist/inc/TGraph2D.h
@@ -120,7 +120,7 @@ public:
    void             Paint(Option_t *option="");
    TH1             *Project(Option_t *option="x") const; // *MENU*
    Int_t            RemovePoint(Int_t ipoint); // *MENU*
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetDirectory(TDirectory *dir);
    virtual void     SetHistogram(TH2 *h);
    void             SetMargin(Double_t m=0.1); // *MENU*
diff --git a/hist/inc/TH1.h b/hist/inc/TH1.h
index 1e38e43ed46165683d2e79bea73536b1bfd2bf14..050d1c6c9d6551a57995588c43e1eda8bf82776f 100644
--- a/hist/inc/TH1.h
+++ b/hist/inc/TH1.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TH1.h,v 1.76 2006/05/23 04:47:39 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: TH1.h,v 1.77 2006/06/26 09:46:38 brun Exp $
 // Author: Rene Brun   26/12/94
 
 /*************************************************************************
@@ -120,7 +120,7 @@ protected:
    virtual void     Copy(TObject &hnew) const;
    virtual Int_t    BufferFill(Double_t x, Double_t w);
    virtual Bool_t   FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t &newMax);
-   virtual void     SavePrimitiveHelp(ofstream &out, Option_t *option);
+   virtual void     SavePrimitiveHelp(ostream &out, Option_t *option = "");
    static Bool_t    RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxis);
    static Bool_t    SameLimitsAndNBins(const TAxis& axis1, const TAxis& axis2);
 public:
@@ -269,7 +269,7 @@ public:
    virtual void     Rebuild(Option_t *option="");
    virtual void     RecursiveRemove(TObject *obj);
    virtual void     Reset(Option_t *option="");
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     Scale(Double_t c1=1);
    virtual void     SetAxisColor(Color_t color=1, Option_t *axis="X");
    virtual void     SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X");
diff --git a/hist/inc/TH1K.h b/hist/inc/TH1K.h
index 3ef646573165f380e78a96f5bbf142c802905f11..42e03925d0bdc3d52f0c20f81ebbdfc0dd58b338 100644
--- a/hist/inc/TH1K.h
+++ b/hist/inc/TH1K.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TH1K.h,v 1.4 2005/12/04 10:51:27 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: TH1K.h,v 1.5 2006/05/16 16:50:02 couet Exp $
 // Author: Victor Perevoztchikov <perev@bnl.gov>  21/02/2001
 
 /*************************************************************************
@@ -51,7 +51,7 @@ public:
     
     
    virtual void      Reset(Option_t *option="");
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
 
    void    SetKOrd(Int_t k){fKOrd=k;}
    
diff --git a/hist/inc/THStack.h b/hist/inc/THStack.h
index d1e0b1d6e29d24477ec2a38c5f982faca5eeb3bb..aadf547488f0495fbf8087f854725acc0f000cdf 100644
--- a/hist/inc/THStack.h
+++ b/hist/inc/THStack.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: THStack.h,v 1.9 2006/05/17 09:37:20 couet Exp $
+// @(#)root/hist:$Name:  $:$Id: THStack.h,v 1.10 2006/05/23 04:47:39 brun Exp $
 // Author: Rene Brun   10/12/2001
 
 /*************************************************************************
@@ -71,7 +71,7 @@ public:
    virtual void     Paint(Option_t *chopt="");
    virtual void     Print(Option_t *chopt="") const;
    virtual void     RecursiveRemove(TObject *obj);
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     SetMaximum(Double_t maximum=-1111); // *MENU*
    virtual void     SetMinimum(Double_t minimum=-1111); // *MENU*
 
diff --git a/hist/inc/TPolyMarker.h b/hist/inc/TPolyMarker.h
index 5d7a887e33a176af3e539b9c0bdc9e85a7b3d3f8..35d369fe3bdaed3e4ec6448fc057145de9c90a19 100644
--- a/hist/inc/TPolyMarker.h
+++ b/hist/inc/TPolyMarker.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TPolyMarker.h,v 1.9 2006/05/17 09:37:20 couet Exp $
+// @(#)root/hist:$Name:  $:$Id: TPolyMarker.h,v 1.10 2006/05/23 04:47:39 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -63,7 +63,7 @@ public:
    virtual void     Paint(Option_t *option="");
    virtual void     PaintPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
    virtual void     Print(Option_t *option="") const;
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual Int_t    SetNextPoint(Double_t x, Double_t y); // *MENU*
    virtual void     SetPoint(Int_t point, Double_t x, Double_t y); // *MENU*
    virtual void     SetPolyMarker(Int_t n);
diff --git a/hist/inc/TProfile.h b/hist/inc/TProfile.h
index 36361ccb78483eb71ce6ed8b20e199629da0e6dd..18fc8bbb1e3e49c423de2c9d96e0b627683db46a 100644
--- a/hist/inc/TProfile.h
+++ b/hist/inc/TProfile.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TProfile.h,v 1.32 2005/12/04 10:51:27 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: TProfile.h,v 1.33 2006/05/17 09:37:20 couet Exp $
 // Author: Rene Brun   29/09/95
 
 /*************************************************************************
@@ -106,7 +106,7 @@ public:
            TH1     *Rebin(Int_t ngroup=2, const char*newname="");
    virtual void     RebinAxis(Double_t x, const char *ax);
    virtual void     Reset(Option_t *option="");
-   virtual void     SavePrimitive(ofstream &out, Option_t *option);
+   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
    virtual void     Scale(Double_t c1=1);
    virtual void     SetBinEntries(Int_t bin, Double_t w);
    virtual void     SetBins(Int_t nbins, Double_t xmin, Double_t xmax);
diff --git a/hist/inc/TProfile2D.h b/hist/inc/TProfile2D.h
index 0aab573f177cf7c7d0c7e12e5c9bc0ee54eb1215..d6cfc55a18de4ebe751ccf8e0c39308b55107086 100644
--- a/hist/inc/TProfile2D.h
+++ b/hist/inc/TProfile2D.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TProfile2D.h,v 1.27 2005/12/04 10:51:27 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: TProfile2D.h,v 1.28 2006/05/17 09:37:20 couet Exp $
 // Author: Rene Brun   16/04/2000
 
 /*************************************************************************
@@ -105,7 +105,7 @@ public:
    virtual void      PutStats(Double_t *stats);
    virtual void      Reset(Option_t *option="");
    virtual void      RebinAxis(Double_t x, const char *ax);
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      Scale(Double_t c1=1);
    virtual void      SetBinEntries(Int_t bin, Double_t w);
    void              SetBins(Int_t, Double_t, Double_t)
diff --git a/hist/inc/TProfile3D.h b/hist/inc/TProfile3D.h
index 291a7094043b713d265a913d4871a0ec7ca8a849..5b7b0fea1606f1760fddc6a6698d98e8818c4090 100644
--- a/hist/inc/TProfile3D.h
+++ b/hist/inc/TProfile3D.h
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TProfile3D.h,v 1.2 2006/05/17 09:37:20 couet Exp $
+// @(#)root/hist:$Name:  $:$Id: TProfile3D.h,v 1.3 2006/05/17 10:01:04 brun Exp $
 // Author: Rene Brun   17/05/2006
 
 /*************************************************************************
@@ -104,7 +104,7 @@ public:
    virtual void      PutStats(Double_t *stats);
    virtual void      Reset(Option_t *option="");
    virtual void      RebinAxis(Double_t x, const char *ax);
-   virtual void      SavePrimitive(ofstream &out, Option_t *option);
+   virtual void      SavePrimitive(ostream &out, Option_t *option = "");
    virtual void      Scale(Double_t c1=1);
    virtual void      SetBinEntries(Int_t bin, Double_t w);
    void              SetBins(Int_t, Double_t, Double_t)
diff --git a/hist/src/TAxis.cxx b/hist/src/TAxis.cxx
index fbee6d9ba739dbd1594d111aa7c55dbc18df6290..34def2f90a0159ffb558618236add8ed36c7afff 100644
--- a/hist/src/TAxis.cxx
+++ b/hist/src/TAxis.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TAxis.cxx,v 1.74 2006/04/28 08:43:05 couet Exp $
+// @(#)root/hist:$Name:  $:$Id: TAxis.cxx,v 1.75 2006/05/17 16:37:25 couet Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -735,7 +735,7 @@ void TAxis::RotateTitle(Bool_t rotate)
 }
 
 //______________________________________________________________________________
-void TAxis::SaveAttributes(ofstream &out, const char *name, const char *subname)
+void TAxis::SaveAttributes(ostream &out, const char *name, const char *subname)
 {
     // Save axis attributes as C++ statement(s) on output stream out
 
diff --git a/hist/src/TF1.cxx b/hist/src/TF1.cxx
index 2d99dbc45040a31b41d68c1a9adfa4eb70edbe9a..10c34ea10ecf59a70395487e50888415be3901e0 100644
--- a/hist/src/TF1.cxx
+++ b/hist/src/TF1.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TF1.cxx,v 1.126 2006/05/17 16:37:25 couet Exp $
+// @(#)root/hist:$Name:  $:$Id: TF1.cxx,v 1.127 2006/06/16 15:40:22 brun Exp $
 // Author: Rene Brun   18/08/95
 
 /*************************************************************************
@@ -2802,7 +2802,7 @@ void TF1::Save(Double_t xmin, Double_t xmax, Double_t, Double_t, Double_t, Doubl
 }
 
 //______________________________________________________________________________
-void TF1::SavePrimitive(ofstream &out, Option_t *option)
+void TF1::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/hist/src/TF12.cxx b/hist/src/TF12.cxx
index fbf4bb0ceb5c73192e7c8058cf69c3246277dd08..853d18d116c6e4729fb8dc637682a3f1a1bcc897 100644
--- a/hist/src/TF12.cxx
+++ b/hist/src/TF12.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TF12.cxx,v 1.5 2006/02/03 21:55:38 pcanal Exp $
+// @(#)root/hist:$Name:  $:$Id: TF12.cxx,v 1.6 2006/05/17 16:37:25 couet Exp $
 // Author: Rene Brun   05/04/2003
 
 /*************************************************************************
@@ -159,7 +159,7 @@ Double_t TF12::EvalPar(const Double_t *x, const Double_t *params)
 
 
 //______________________________________________________________________________
-void TF12::SavePrimitive(ofstream & /*out*/, Option_t * /*option*/)
+void TF12::SavePrimitive(ostream & /*out*/, Option_t * /*option*/ /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/hist/src/TF2.cxx b/hist/src/TF2.cxx
index a2af1e8c16e22fc344bc598fb6e8c0aabefd2572..8c9807501a72d956f9968057908515d87b316cef 100644
--- a/hist/src/TF2.cxx
+++ b/hist/src/TF2.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TF2.cxx,v 1.34 2006/05/16 16:50:02 couet Exp $
+// @(#)root/hist:$Name:  $:$Id: TF2.cxx,v 1.35 2006/05/17 16:37:25 couet Exp $
 // Author: Rene Brun   23/08/95
 
 /*************************************************************************
@@ -709,7 +709,7 @@ void TF2::Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Doubl
 }
 
 //______________________________________________________________________________
-void TF2::SavePrimitive(ofstream &out, Option_t *option)
+void TF2::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/hist/src/TF3.cxx b/hist/src/TF3.cxx
index 540817b9484b1d016f0d07a6c65b366159b9f6db..fd6b717491ad315f772242c98e2b6ab3096b2fd5 100644
--- a/hist/src/TF3.cxx
+++ b/hist/src/TF3.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TF3.cxx,v 1.27 2006/03/20 21:43:42 pcanal Exp $
+// @(#)root/hist:$Name:  $:$Id: TF3.cxx,v 1.28 2006/05/17 16:37:25 couet Exp $
 // Author: Rene Brun   27/10/95
 
 /*************************************************************************
@@ -569,7 +569,7 @@ void TF3::Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Doubl
 }
 
 //______________________________________________________________________________
-void TF3::SavePrimitive(ofstream &out, Option_t *option)
+void TF3::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/hist/src/TGraph2D.cxx b/hist/src/TGraph2D.cxx
index e6258a333d2bd81950aaf10a8cb7752a25bb8bdd..96f7662ca15e0bcfdb5fdc4cf0aba9e8124d4aee 100644
--- a/hist/src/TGraph2D.cxx
+++ b/hist/src/TGraph2D.cxx
@@ -1335,7 +1335,7 @@ Int_t TGraph2D::RemovePoint(Int_t ipoint)
 
 
 //______________________________________________________________________________
-void TGraph2D::SavePrimitive(ofstream &out, Option_t *option)
+void TGraph2D::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Saves primitive as a C++ statement(s) on output stream out
 
diff --git a/hist/src/TH1.cxx b/hist/src/TH1.cxx
index 041615b54bb038277af5000140d5ece2b2c42321..90d2bd060473693dd62b1e6966bf18467d59aae0 100644
--- a/hist/src/TH1.cxx
+++ b/hist/src/TH1.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TH1.cxx,v 1.293 2006/05/17 16:37:26 couet Exp $
+// @(#)root/hist:$Name:  $:$Id: TH1.cxx,v 1.294 2006/06/26 09:46:38 brun Exp $
 // Author: Rene Brun   26/12/94
 
 /*************************************************************************
@@ -5139,7 +5139,7 @@ void TH1::Reset(Option_t *option)
 }
 
 //______________________________________________________________________________
-void TH1::SavePrimitive(ofstream &out, Option_t *option)
+void TH1::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
@@ -5242,7 +5242,7 @@ void TH1::SavePrimitive(ofstream &out, Option_t *option)
 }
 
 //______________________________________________________________________________
-void TH1::SavePrimitiveHelp(ofstream &out, Option_t *option)
+void TH1::SavePrimitiveHelp(ostream &out, Option_t *option /*= ""*/)
 {
    // helper function for the SavePrimitive functions from TH1
    // or classes derived from TH1, eg TProfile, TProfile2D.
diff --git a/hist/src/TH1K.cxx b/hist/src/TH1K.cxx
index 878bdf3aea98ed594275f5661d801d2ecbdf0997..69cdab6710cf22ad7ee268a7c5ffded0f9fb3483 100644
--- a/hist/src/TH1K.cxx
+++ b/hist/src/TH1K.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TH1K.cxx,v 1.8 2006/02/03 21:55:38 pcanal Exp $
+// @(#)root/hist:$Name:  $:$Id: TH1K.cxx,v 1.9 2006/05/17 16:37:26 couet Exp $
 // Author: Victor Perevoztchikov <perev@bnl.gov>  21/02/2001
 
 /*************************************************************************
@@ -149,7 +149,7 @@ void   TH1K::Reset(Option_t *option)
 
 
 //______________________________________________________________________________
-void TH1K::SavePrimitive(ofstream &out, Option_t *option)
+void TH1K::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
    // Note the following restrictions in the code generated:
diff --git a/hist/src/THStack.cxx b/hist/src/THStack.cxx
index 6f6ba8dcf9d2843a62174b120d3cae70b1358112..c53eb5b0a9ff841175f55692b92e6968535f8731 100644
--- a/hist/src/THStack.cxx
+++ b/hist/src/THStack.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: THStack.cxx,v 1.45 2006/05/24 14:55:26 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: THStack.cxx,v 1.46 2006/05/26 15:13:02 rdm Exp $
 // Author: Rene Brun   10/12/2001
 
 /*************************************************************************
@@ -753,7 +753,7 @@ void THStack::RecursiveRemove(TObject *obj)
 }
 
 //______________________________________________________________________________
-void THStack::SavePrimitive(ofstream &out, Option_t *option)
+void THStack::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/hist/src/TPolyMarker.cxx b/hist/src/TPolyMarker.cxx
index 17f69936a437102264dbf3a1816f40633e1b63f8..e6994c5e85be0d053decccb85754417700e9dac9 100644
--- a/hist/src/TPolyMarker.cxx
+++ b/hist/src/TPolyMarker.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TPolyMarker.cxx,v 1.20 2006/05/23 04:47:40 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: TPolyMarker.cxx,v 1.21 2006/05/24 14:55:26 brun Exp $
 // Author: Rene Brun   12/12/94
 
 /*************************************************************************
@@ -311,7 +311,7 @@ void TPolyMarker::Print(Option_t *) const
 
 
 //______________________________________________________________________________
-void TPolyMarker::SavePrimitive(ofstream &out, Option_t *option)
+void TPolyMarker::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out.
 
diff --git a/hist/src/TProfile.cxx b/hist/src/TProfile.cxx
index 8590cacfb4b1cfb1070b9b380fdb2651662b6760..9276fc9596f73325cfe4b5517cde08e77c4af98a 100644
--- a/hist/src/TProfile.cxx
+++ b/hist/src/TProfile.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TProfile.cxx,v 1.78 2006/04/20 14:36:48 rdm Exp $
+// @(#)root/hist:$Name:  $:$Id: TProfile.cxx,v 1.79 2006/05/17 16:37:26 couet Exp $
 // Author: Rene Brun   29/09/95
 
 /*************************************************************************
@@ -1637,7 +1637,7 @@ void TProfile::Reset(Option_t *option)
 }
 
 //______________________________________________________________________________
-void TProfile::SavePrimitive(ofstream &out, Option_t *option)
+void TProfile::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/hist/src/TProfile2D.cxx b/hist/src/TProfile2D.cxx
index 59667270e6a492ae2e38e995cb19f668e80e40dd..cb72721003139a8008f96f05d94689e0ba8d8cfd 100644
--- a/hist/src/TProfile2D.cxx
+++ b/hist/src/TProfile2D.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TProfile2D.cxx,v 1.50 2006/04/20 14:36:48 rdm Exp $
+// @(#)root/hist:$Name:  $:$Id: TProfile2D.cxx,v 1.51 2006/05/17 16:37:26 couet Exp $
 // Author: Rene Brun   16/04/2000
 
 /*************************************************************************
@@ -1625,7 +1625,7 @@ void TProfile2D::RebinAxis(Double_t x, const char* ax)
 }
 
 //______________________________________________________________________________
-void TProfile2D::SavePrimitive(ofstream &out, Option_t *option)
+void TProfile2D::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/hist/src/TProfile3D.cxx b/hist/src/TProfile3D.cxx
index 1c5c9c91bcc31255d713c8bc507479605d2e4d61..6fe3e489856b3673c69cef60128c3cf409e449c2 100644
--- a/hist/src/TProfile3D.cxx
+++ b/hist/src/TProfile3D.cxx
@@ -1,4 +1,4 @@
-// @(#)root/hist:$Name:  $:$Id: TProfile3D.cxx,v 1.2 2006/05/17 10:01:04 brun Exp $
+// @(#)root/hist:$Name:  $:$Id: TProfile3D.cxx,v 1.3 2006/05/18 06:21:38 brun Exp $
 // Author: Rene Brun   17/05/2006
 
 /*************************************************************************
@@ -1336,7 +1336,7 @@ void TProfile3D::RebinAxis(Double_t x, const char* ax)
 }
 
 //______________________________________________________________________________
-void TProfile3D::SavePrimitive(ofstream &out, Option_t *option)
+void TProfile3D::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out
 
diff --git a/histpainter/inc/TPaletteAxis.h b/histpainter/inc/TPaletteAxis.h
index d9d3b5eb6a537dcafa39db392473bfd6c246708f..d6383ac3b58d61cabe4cb1cb2607869f7ae811fb 100644
--- a/histpainter/inc/TPaletteAxis.h
+++ b/histpainter/inc/TPaletteAxis.h
@@ -1,4 +1,4 @@
-// @(#)root/histpainter:$Name:  $:$Id: TPaletteAxis.h,v 1.5 2005/05/24 09:41:18 brun Exp $
+// @(#)root/histpainter:$Name:  $:$Id: TPaletteAxis.h,v 1.6 2005/11/10 10:36:59 couet Exp $
 // Author: Rene Brun   15/11/2002
 
 /*************************************************************************
@@ -53,7 +53,7 @@ public:
    Option_t   *GetName() const {return fName.Data();}
    virtual char *GetObjectInfo(Int_t px, Int_t py) const;
    virtual void  Paint(Option_t *option="");
-   virtual void  SavePrimitive(ofstream &out, Option_t *option);
+   virtual void  SavePrimitive(ostream &out, Option_t *option = "");
    virtual void  SetName(const char *name="") {fName = name;} // *MENU*
    virtual void  SetLabelColor(Int_t labelcolor) {fAxis.SetLabelColor(labelcolor);} // *MENU*
    virtual void  SetLabelFont(Int_t labelfont) {fAxis.SetLabelFont(labelfont);} // *MENU*
diff --git a/histpainter/src/TPaletteAxis.cxx b/histpainter/src/TPaletteAxis.cxx
index 3269d0c733de2d10a97355c0b108b389fa39350e..d69165e7c3fe85a34f22e0483a7afc571e658ab8 100644
--- a/histpainter/src/TPaletteAxis.cxx
+++ b/histpainter/src/TPaletteAxis.cxx
@@ -1,4 +1,4 @@
-// @(#)root/histpainter:$Name:  $:$Id: TPaletteAxis.cxx,v 1.16 2006/04/27 09:26:38 couet Exp $
+// @(#)root/histpainter:$Name:  $:$Id: TPaletteAxis.cxx,v 1.17 2006/04/28 08:43:05 couet Exp $
 // Author: Rene Brun   15/11/2002
 
 /*************************************************************************
@@ -301,7 +301,7 @@ void TPaletteAxis::Paint(Option_t *)
 }
 
 //______________________________________________________________________________
-void TPaletteAxis::SavePrimitive(ofstream &out, Option_t *)
+void TPaletteAxis::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    // Save primitive as a C++ statement(s) on output stream out.
 
diff --git a/table/inc/TChair.h b/table/inc/TChair.h
index 6cc6442c057b241eab1e6e9a18499636628a9ed0..1d8793a4cefac6c3ada19c72092887f10e6f99ae 100644
--- a/table/inc/TChair.h
+++ b/table/inc/TChair.h
@@ -1,4 +1,4 @@
-// @(#)root/star:$Name:  $:$Id: TChair.h,v 1.3 2003/01/27 20:41:36 brun Exp $
+// @(#)root/star:$Name:  $:$Id: TChair.h,v 1.4 2005/04/25 17:23:29 brun Exp $
 // Author: Valery Fine(fine@bnl.gov)   13/03/2000
 
 /*************************************************************************
@@ -9,7 +9,7 @@
  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
  *************************************************************************/
 
-// $Id: TChair.h,v 1.3 2003/01/27 20:41:36 brun Exp $
+// $Id: TChair.h,v 1.4 2005/04/25 17:23:29 brun Exp $
 #ifndef ROOT_TChair
 #define ROOT_TChair
 
@@ -87,7 +87,7 @@ public:
 
                void      *ReAllocate(Int_t newsize) { return GetThisTable()->ReAllocate(newsize); }
                void      *ReAllocate()              { return GetThisTable()->ReAllocate(); }
-   virtual     void       SavePrimitive(ofstream &out, Option_t *option) {GetThisTable()->SavePrimitive(out,option);}
+   virtual     void       SavePrimitive(ostream &out, Option_t *option) {GetThisTable()->SavePrimitive(out,option = "");}
 
    virtual     void       Set(Int_t n)                                   {GetThisTable()->Set(n);}
    virtual     void       Set(Int_t n, Char_t *array)                    {GetThisTable()->Set(n,array);}
@@ -120,6 +120,20 @@ inline const void *TChair::operator[](Int_t i) const
 }
 
 // $Log: TChair.h,v $
+// Revision 1.4  2005/04/25 17:23:29  brun
+// From Valeri Fine:
+//
+//   TChair.h:
+//      - Make the "fTable" data-member to be "protected" (it was "private")
+//        to facilitate the class reuse (thanks Y.Fisyak)
+//
+//   TColumnView.cxx:
+//      - extra protection against of zero gPad
+//
+//   TPad.cxx
+//     - initialize the "fPadView3D" data-member
+//      (causes the crash within "table" package occasionally)
+//
 // Revision 1.3  2003/01/27 20:41:36  brun
 // New version of the Table package by Valeri Fine.
 // New classes TIndexTable TResponseIterator TResponseTable TTableMap
diff --git a/table/inc/TTable.h b/table/inc/TTable.h
index 345a7d17cdafe127fd7f2021d4214798be0cba03..c5102cb7380e99ec1c626a45d47ae477977c044c 100644
--- a/table/inc/TTable.h
+++ b/table/inc/TTable.h
@@ -1,4 +1,4 @@
-// @(#)root/star:$Name:  $:$Id: TTable.h,v 1.11 2005/11/24 17:08:36 rdm Exp $
+// @(#)root/star:$Name:  $:$Id: TTable.h,v 1.12 2006/04/20 14:36:48 rdm Exp $
 // Author: Valery Fine(fine@mail.cern.ch)   03/07/98
 
 /*************************************************************************
@@ -145,7 +145,7 @@ public:
 
                void      *ReAllocate(Int_t newsize);
                void      *ReAllocate();
-   virtual     void       SavePrimitive(ofstream &out, Option_t *option);
+   virtual     void       SavePrimitive(ostream &out, Option_t *option = "");
    virtual     void       Set(Int_t n);
    virtual     void       Set(Int_t n, Char_t *array);
    virtual     void       SetNRows(Int_t n);
diff --git a/table/inc/TVolumePosition.h b/table/inc/TVolumePosition.h
index 4d3153198c84eee4124b782eab26e2a4f9f8d9d0..cb2e459f7761627e389ce0900b5b1cbb6676bb63 100644
--- a/table/inc/TVolumePosition.h
+++ b/table/inc/TVolumePosition.h
@@ -1,4 +1,4 @@
-// @(#)root/star:$Name:  $:$Id: TVolumePosition.h,v 1.6 2005/09/08 05:33:41 brun Exp $
+// @(#)root/star:$Name:  $:$Id: TVolumePosition.h,v 1.7 2006/05/20 14:06:09 brun Exp $
 // Author: Valery Fine(fine@bnl.gov)   25/12/98
 
 /*************************************************************************
@@ -85,7 +85,7 @@ public:
    virtual void        Print(Option_t *option="") const;
    virtual void        UpdatePosition(Option_t *option="");
    virtual TVolumePosition *Reset(TVolume *node=0,Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0);
-   virtual void        SavePrimitive(ofstream &out, Option_t *option);
+   virtual void        SavePrimitive(ostream &out, Option_t *option = "");
    virtual void        SetLineAttributes(); // *MENU*
    virtual void        SetMatrix(TRotMatrix *matrix=0);
    virtual void        SetNode(TVolume *node){ fNode = node;}
diff --git a/table/inc/TVolumeView.h b/table/inc/TVolumeView.h
index 5daf0601c494f0103188558f7c6bfeb7393548da..593921b288b7849644efe08b0665f8cadec16446 100644
--- a/table/inc/TVolumeView.h
+++ b/table/inc/TVolumeView.h
@@ -1,4 +1,4 @@
-// @(#)root/star:$Name:  $:$Id: TVolumeView.h,v 1.4 2003/01/27 20:41:36 brun Exp $
+// @(#)root/star:$Name:  $:$Id: TVolumeView.h,v 1.5 2006/05/20 14:06:09 brun Exp $
 // Author: Valery Fine(fine@bnl.gov)   25/12/98
 
 /*************************************************************************
@@ -70,7 +70,7 @@ public:
    virtual void     Paint(Option_t *option="");
    virtual TString  PathP() const;
    virtual void     SetLineAttributes(); // *MENU*
-   virtual void     SavePrimitive(ofstream &out, Option_t *option="");
+   virtual void     SavePrimitive(ostream &out, Option_t *option="");
    virtual void     SetVisibility(Int_t vis=1); // *MENU*
    virtual void     Sizeof3D() const;
    ClassDef(TVolumeView,1)  // Special kind of TDataSet
diff --git a/table/src/TTable.cxx b/table/src/TTable.cxx
index e524bced770d74023995031a0dee410cf2bfafe5..fadb6f8bdd67fc1959a5b8114194faf8e2c33297 100644
--- a/table/src/TTable.cxx
+++ b/table/src/TTable.cxx
@@ -1,4 +1,4 @@
-// @(#)root/star:$Name:  $:$Id: TTable.cxx,v 1.14 2006/05/21 18:05:26 brun Exp $
+// @(#)root/star:$Name:  $:$Id: TTable.cxx,v 1.15 2006/06/23 04:59:33 brun Exp $
 // Author: Valery Fine(fine@bnl.gov)   03/07/98
 // Copyright (C) Valery Fine (Valeri Faine) 1998-2001. All right reserved
 
@@ -1773,7 +1773,7 @@ Int_t TTable::Purge(Option_t *opt)
 }
 
 //______________________________________________________________________________
-void TTable::SavePrimitive(ofstream &out, Option_t *)
+void TTable::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
 //   Save a primitive as a C++ statement(s) on output stream "out".
    UInt_t arrayLayout[10],arraySize[10];
diff --git a/table/src/TVolumePosition.cxx b/table/src/TVolumePosition.cxx
index 7f46930c733b12452eed16af22224743746de7cd..eb76a278e6ad95b96af6be4dfb9cffbfe353a0f3 100644
--- a/table/src/TVolumePosition.cxx
+++ b/table/src/TVolumePosition.cxx
@@ -1,6 +1,6 @@
-// @(#)root/star:$Name:  $:$Id: TVolumePosition.cxx,v 1.6 2006/05/20 14:06:09 brun Exp $
+// @(#)root/star:$Name:  $:$Id: TVolumePosition.cxx,v 1.7 2006/05/21 18:05:26 brun Exp $
 // Author: Valery Fine(fine@bnl.gov)   25/12/98
-// $Id: TVolumePosition.cxx,v 1.6 2006/05/20 14:06:09 brun Exp $
+// $Id: TVolumePosition.cxx,v 1.7 2006/05/21 18:05:26 brun Exp $
 
 #include "Riostream.h"
 
@@ -462,7 +462,7 @@ TVolumePosition *TVolumePosition::Reset(TVolume *node,Double_t x, Double_t y, Do
 }
 
 //_______________________________________________________________________
-void TVolumePosition::SavePrimitive(ofstream &, Option_t *)
+void TVolumePosition::SavePrimitive(ostream &, Option_t * /*= ""*/)
 {
    //to be documented
 #if 0
diff --git a/table/src/TVolumeView.cxx b/table/src/TVolumeView.cxx
index 749ece55f1866f05b89b0f2a9eb86c28e847d387..65acb9aa793b95ba882f01fa5181b0005344aa41 100644
--- a/table/src/TVolumeView.cxx
+++ b/table/src/TVolumeView.cxx
@@ -1,4 +1,4 @@
-// @(#)root/star:$Name:  $:$Id: TVolumeView.cxx,v 1.15 2006/05/20 14:06:09 brun Exp $
+// @(#)root/star:$Name:  $:$Id: TVolumeView.cxx,v 1.16 2006/05/21 18:05:26 brun Exp $
 // Author: Valery Fine(fine@bnl.gov)   25/12/98
 // $Id:
 // $Log:
@@ -853,7 +853,7 @@ TString TVolumeView::PathP() const
 }
 
 //_______________________________________________________________________
-void TVolumeView::SavePrimitive(ofstream &out, Option_t *)
+void TVolumeView::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
    //to be documented
    const Char_t *sceleton[] = {
diff --git a/treeviewer/inc/TPaveVar.h b/treeviewer/inc/TPaveVar.h
index c08c7777c94375e97eaffd0947a39448b2639b6b..836ac2d5c2b5a82fd64958cd8b55f6b3d3321758 100644
--- a/treeviewer/inc/TPaveVar.h
+++ b/treeviewer/inc/TPaveVar.h
@@ -1,4 +1,4 @@
-// @(#)root/treeviewer:$Name:  $:$Id: TPaveVar.h,v 1.3 2000/11/23 10:09:16 brun Exp $
+// @(#)root/treeviewer:$Name:  $:$Id: TPaveVar.h,v 1.4 2006/05/13 19:34:41 brun Exp $
 // Author: Rene Brun   08/12/98
 
 /*************************************************************************
@@ -44,7 +44,7 @@ public:
    virtual       ~TPaveVar();
    void           Copy(TObject &PaveVar);
    TTreeViewer   *GetViewer() {return fViewer;}
-   virtual void   SavePrimitive(ofstream &out, Option_t *option);
+   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
    virtual void   Merge(Option_t *option="AND");  // *MENU*
    virtual void   SetViewer(TTreeViewer *viewer) {fViewer = viewer;}
 
diff --git a/treeviewer/src/TPaveVar.cxx b/treeviewer/src/TPaveVar.cxx
index 9b196eeaf708da6e188ce9fe90e81987bb091228..3388bfd57b694c04a9e7370a6abe79f46b37190d 100644
--- a/treeviewer/src/TPaveVar.cxx
+++ b/treeviewer/src/TPaveVar.cxx
@@ -1,4 +1,4 @@
-// @(#)root/treeviewer:$Name:  $:$Id: TPaveVar.cxx,v 1.5 2005/09/18 13:19:22 rdm Exp $
+// @(#)root/treeviewer:$Name:  $:$Id: TPaveVar.cxx,v 1.6 2006/05/13 19:34:41 brun Exp $
 // Author: Rene Brun   08/12/98
 /*************************************************************************
  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
@@ -330,7 +330,7 @@ void TPaveVar::Merge(Option_t *option)
 }
 
 //______________________________________________________________________________
-void TPaveVar::SavePrimitive(ofstream &out, Option_t *)
+void TPaveVar::SavePrimitive(ostream &out, Option_t * /*= ""*/)
 {
     // Save primitive as a C++ statement(s) on output stream out