Index: trunk/MagicSoft/Mars/manalysis/MHillasSrcCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MHillasSrcCalc.cc	(revision 1476)
+++ trunk/MagicSoft/Mars/manalysis/MHillasSrcCalc.cc	(revision 1477)
@@ -37,4 +37,5 @@
 #include "MParList.h"
 
+#include "MSrcPosCam.h"
 #include "MHillasSrc.h"
 
@@ -103,8 +104,27 @@
 // gui elements to a macro-file.
 //
-void MHillasSrcCalc::SavePrimitive(ofstream &out, Option_t *o)
+void MHillasSrcCalc::StreamPrimitive(ofstream &out) const
 {
-    out << "   MHillasSrcCalc " << ToLower(fName) << "(\"";
-    out << fSrcName << "\", \"" << fHillasName << "\", \"";
-    out << fName << "\", \"" << fTitle << "\");" << endl;
+    if (fHillas)
+        fHillas->SavePrimitive(out);
+
+    if (fSrcPos)
+        fSrcPos->SavePrimitive(out);
+
+    if (fHillasSrc)
+        fHillasSrc->SavePrimitive(out);
+
+    out << "   MHillasSrcCalc " << ToLower(fName) << "(";
+
+    if (fSrcPos)
+        out << "&" << ToLower(fSrcPos->GetName());
+    else
+        out << "\"" << fSrcName << "\"";
+
+    if (fHillasSrc)
+        out << "&" << ToLower(fHillasSrc->GetName());
+    else
+        out << "\"" << fHillasName << "\"";
+
+    out << ", \"" << fName << "\", \"" << fTitle << "\");" << endl;
 }
Index: trunk/MagicSoft/Mars/manalysis/MHillasSrcCalc.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MHillasSrcCalc.h	(revision 1476)
+++ trunk/MagicSoft/Mars/manalysis/MHillasSrcCalc.h	(revision 1477)
@@ -13,10 +13,12 @@
 {
 private:
-    MHillas    *fHillas;     //! Pointer to the source independant hillas parameters
-    MSrcPosCam *fSrcPos;     //! Pointer to the source position
-    MHillasSrc *fHillasSrc;  //! Pointer to the output container for the source dependant parameters
+    MHillas    *fHillas;     // Pointer to the source independant hillas parameters
+    MSrcPosCam *fSrcPos;     // Pointer to the source position
+    MHillasSrc *fHillasSrc;  // Pointer to the output container for the source dependant parameters
 
     TString     fSrcName;
     TString     fHillasName;
+
+    void StreamPrimitive(ofstream &out) const;
 
 public:
@@ -27,6 +29,4 @@
     Bool_t Process();
 
-    void SavePrimitive(ofstream &out, Option_t *o="");
-
     ClassDef(MHillasSrcCalc, 1) // task to calculate the source position depandant hillas parameters
 };
Index: trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc	(revision 1476)
+++ trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc	(revision 1477)
@@ -414,5 +414,5 @@
 // gui elements to a macro-file.
 //
-void MImgCleanStd::SavePrimitive(ofstream &out, Option_t *o)
+void MImgCleanStd::StreamPrimitive(ofstream &out) const
 {
     out << "   MImgCleanStd " << ToLower(fName) << "(";
Index: trunk/MagicSoft/Mars/manalysis/MImgCleanStd.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MImgCleanStd.h	(revision 1476)
+++ trunk/MagicSoft/Mars/manalysis/MImgCleanStd.h	(revision 1477)
@@ -21,4 +21,5 @@
 
     void CreateGuiElements(MGGroupFrame *f);
+    void StreamPrimitive(ofstream &out) const;
 
 public:
@@ -34,5 +35,4 @@
 
     void Print(Option_t *o="") const;
-    void SavePrimitive(ofstream &out, Option_t *o="");
 
     Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2);
Index: trunk/MagicSoft/Mars/manalysis/MSrcPosCam.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MSrcPosCam.cc	(revision 1476)
+++ trunk/MagicSoft/Mars/manalysis/MSrcPosCam.cc	(revision 1477)
@@ -88,5 +88,5 @@
 // gui elements to a macro-file.
 //
-void MSrcPosCam::SavePrimitive(ofstream &out, Option_t *o)
+void MSrcPosCam::StreamPrimitive(ofstream &out) const
 {
     out << "   MSrcPosCam " << ToLower(fName) << "(\"";
Index: trunk/MagicSoft/Mars/manalysis/MSrcPosCam.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MSrcPosCam.h	(revision 1476)
+++ trunk/MagicSoft/Mars/manalysis/MSrcPosCam.h	(revision 1477)
@@ -11,4 +11,6 @@
     Float_t fX; // [mm] x position of source in camera
     Float_t fY; // [mm] y position of source in camera
+
+    void StreamPrimitive(ofstream &out) const;
 
 public:
@@ -29,6 +31,4 @@
     //void AsciiWrite(ofstream &fout) const;
 
-    void SavePrimitive(ofstream &out, Option_t *o="");
-
     ClassDef(MSrcPosCam, 1) // container to store source position in the camera plain
 };
