Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2898)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2899)
@@ -10,4 +10,6 @@
    * mcalib/MCalibrate.cc, manalysis/MExtractSignal.cc
      - Added support (using AddSerialNumber) for stereo MC files.
+
+
 
  2004/01/23: Thomas Bretz
@@ -40,4 +42,16 @@
    * mhist/MHCamera.[h,cc]:
      - removed obsolete member function SetPix
+
+   * mbase/MStatusDisplay.[h,cc]:
+     - added EventInfo member function
+     - implemented preliminary redirection of GetObjectInfo to
+       StatusLine2 -> An own status line for this is missing
+
+   * manalysis/MExtractSignal.[h,cc]:
+     - implemented StreamPrimitive
+     - changed deafults to be static const data members
+     
+   * manalysis/MGeomApply.[h,cc]:
+     - implemented StreamPrimitive
 
 
Index: trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc	(revision 2898)
+++ trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc	(revision 2899)
@@ -16,7 +16,7 @@
 !
 !
-!   Author(s): Markus Gaug  09/2003 <mailto:markus@ifae.es>
-!
-!   Copyright: MAGIC Software Development, 2000-2001
+!   Author(s): Markus Gaug, 09/2003 <mailto:markus@ifae.es>
+!
+!   Copyright: MAGIC Software Development, 2000-2004
 !
 !
@@ -24,32 +24,35 @@
 
 //////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//   MExtractSignal                                                         //
-//                                                                          //
+//
+//   MExtractSignal
+//
 //////////////////////////////////////////////////////////////////////////////
-
 #include "MExtractSignal.h"
+
+#include <fstream>
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+#include "MParList.h"
+#include "MGeomCam.h"
+
+#include "MRawEvtData.h"
+#include "MRawEvtPixelIter.h"
+
+#include "MPedestalCam.h"
+#include "MPedestalPix.h"
 
 #include "MExtractedSignalCam.h"
 #include "MExtractedSignalPix.h"
 
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
-
-#include "MGeomCam.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MParList.h"
-
-#include "MRawEvtData.h" 
-#include "MRawEvtPixelIter.h"
-
-#include "TMath.h"
-
 ClassImp(MExtractSignal);
 
 using namespace std;
+
+const Byte_t MExtractSignal::fgSaturationLimit = 254;
+const Byte_t MExtractSignal::fgFirst =  3;
+const Byte_t MExtractSignal::fgLast  = 10;
+
 // --------------------------------------------------------------------------
 //
@@ -57,5 +60,5 @@
 //
 MExtractSignal::MExtractSignal(const char *name, const char *title)
-  : fSaturationLimit(254)
+  : fSaturationLimit(fgSaturationLimit)
 {
 
@@ -240,2 +243,42 @@
     return kTRUE;
 }
+
+// --------------------------------------------------------------------------
+//
+// Implementation of SavePrimitive. Used to write the call to a constructor
+// to a macro. In the original root implementation it is used to write
+// gui elements to a macro-file.
+//
+void MExtractSignal::StreamPrimitive(ofstream &out) const
+{
+    out << "   " << ClassName() << " " << GetUniqueName() << "(\"";
+    out << "\"" << fName << "\", \"" << fTitle << "\");" << endl;
+
+    if (fSaturationLimit!=fgSaturationLimit)
+    {
+        out << "   " << GetUniqueName() << ".SetSaturationLimit(";
+        out << (int)fSaturationLimit << ");" << endl;
+    }
+
+    const Bool_t arg4 = fNumLoGainSamples+fLoGainFirst-1 != fgLast;
+    const Bool_t arg3 = arg4 || fLoGainFirst != fgFirst;
+    const Bool_t arg2 = arg3 || fNumHiGainSamples+fHiGainFirst-1 != fgLast;
+    const Bool_t arg1 = arg2 || fHiGainFirst != fgFirst;
+
+    if (!arg1)
+        return;
+
+    out << "   " << GetUniqueName() << ".SetRange(";
+    out << (int)fLoGainFirst;
+    if (arg2)
+    {
+        out << ", " << (int)(fNumHiGainSamples+fHiGainFirst-1);
+        if (arg3)
+        {
+            out << ", " << (int)fLoGainFirst;
+            if (arg4)
+                out << ", " << (int)(fNumLoGainSamples+fLoGainFirst-1);
+        }
+    }
+    out << ");" << endl;
+}
Index: trunk/MagicSoft/Mars/manalysis/MExtractSignal.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MExtractSignal.h	(revision 2898)
+++ trunk/MagicSoft/Mars/manalysis/MExtractSignal.h	(revision 2899)
@@ -24,34 +24,37 @@
 {
 private:
+    static const Byte_t fgSaturationLimit;
+    static const Byte_t fgFirst;
+    static const Byte_t fgLast;
 
-  MPedestalCam             *fPedestals;    // Pedestals of all pixels in the camera
-  MExtractedSignalCam      *fSignals;      // Extracted signal of all pixels in the camera
+    MPedestalCam             *fPedestals;    // Pedestals of all pixels in the camera
+    MExtractedSignalCam      *fSignals;      // Extracted signal of all pixels in the camera
 
-  MRawEvtData              *fRawEvt;       // raw event data (time slices)
-  MRawRunHeader            *fRunHeader;    // RunHeader information
+    MRawEvtData              *fRawEvt;       // raw event data (time slices)
+    MRawRunHeader            *fRunHeader;    // RunHeader information
 
-  Byte_t fHiGainFirst;
-  Byte_t fLoGainFirst;
+    Byte_t fHiGainFirst;
+    Byte_t fLoGainFirst;
 
-  Byte_t fNumHiGainSamples; 
-  Byte_t fNumLoGainSamples; 
+    Byte_t fNumHiGainSamples;
+    Byte_t fNumLoGainSamples;
 
-  Float_t fSqrtHiGainSamples; 
-  Float_t fSqrtLoGainSamples; 
+    Float_t fSqrtHiGainSamples;
+    Float_t fSqrtLoGainSamples;
 
-  Byte_t  fSaturationLimit;
+    Byte_t  fSaturationLimit;
 
-  Bool_t ReInit(MParList *pList); 
-  Int_t  PreProcess(MParList *pList);
-  Int_t  Process();
-  
+    Bool_t ReInit(MParList *pList);
+    Int_t  PreProcess(MParList *pList);
+    Int_t  Process();
+    void   StreamPrimitive(ofstream &out) const;
+
 public:
+    MExtractSignal(const char *name=NULL, const char *title=NULL);
 
-  MExtractSignal(const char *name=NULL, const char *title=NULL);
+    void SetRange(Byte_t hifirst=fgFirst, Byte_t hilast=fgLast, Byte_t lofirst=fgFirst, Byte_t lolast=fgLast);
+    void SetSaturationLimit(Byte_t lim) { fSaturationLimit = lim; }
 
-  void SetRange(Byte_t hifirst=3, Byte_t hilast=10, Byte_t lofirst=3, Byte_t lolast=10);
-  void SetSaturationLimit(Byte_t lim)      { fSaturationLimit = lim; }
-
-  ClassDef(MExtractSignal, 0) // Task to fill the Extracted Signal Containers from raw data
+    ClassDef(MExtractSignal, 0) // Task to fill the Extracted Signal Containers from raw data
 };
 
Index: trunk/MagicSoft/Mars/manalysis/MGeomApply.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MGeomApply.cc	(revision 2898)
+++ trunk/MagicSoft/Mars/manalysis/MGeomApply.cc	(revision 2899)
@@ -18,5 +18,5 @@
 !   Author(s): Thomas Bretz, 09/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2003
+!   Copyright: MAGIC Software Development, 2000-2004
 !
 !
@@ -49,4 +49,6 @@
 //////////////////////////////////////////////////////////////////////////////
 #include "MGeomApply.h"
+
+#include <fstream>
 
 #include "MLog.h"
@@ -134,2 +136,20 @@
     return kTRUE;
 }
+
+// --------------------------------------------------------------------------
+//
+// Implementation of SavePrimitive. Used to write the call to a constructor
+// to a macro. In the original root implementation it is used to write
+// gui elements to a macro-file.
+//
+void MGeomApply::StreamPrimitive(ofstream &out) const
+{
+    out << "   " << ClassName() << " " << GetUniqueName() << "(\"";
+    out << "\"" << fName << "\", \"" << fTitle << "\");" << endl;
+
+    if (fGeomName.IsNull())
+        return;
+
+    out << "   " << GetUniqueName() << ".SetGeometry(\"";
+    out << fGeomName << "\");" << endl;
+}
Index: trunk/MagicSoft/Mars/manalysis/MGeomApply.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MGeomApply.h	(revision 2898)
+++ trunk/MagicSoft/Mars/manalysis/MGeomApply.h	(revision 2899)
@@ -7,14 +7,13 @@
 
 class MParList;
-class MGeomCam;
 
 class MGeomApply : public MTask
 {
 private:
-    const MGeomCam *fGeom;
-    TString   fGeomName;
+    TString fGeomName; // Name of geometry class
 
     Int_t  PreProcess(MParList *plist);
     Bool_t ReInit(MParList *pList);
+    void   StreamPrimitive(ofstream &out) const;
 
 public:
Index: trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 2898)
+++ trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 2899)
@@ -16,7 +16,7 @@
 !
 !
-!   Author(s): Thomas Bretz, 4/2003 <mailto:tbretz@astro-uni-wuerzburg.de>
+!   Author(s): Thomas Bretz, 4/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2003
+!   Copyright: MAGIC Software Development, 2003-2004
 !
 !
