Index: trunk/MagicSoft/Mars/mbase/MParContainer.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1219)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1222)
@@ -40,4 +40,5 @@
 
 #include <TClass.h>      // IsA
+#include <TBaseClass.h>  // GetClassPointer
 #include <TROOT.h>       // TROOT::Identlevel
 #include <TMethodCall.h> // TMethodCall, AsciiWrite
@@ -216,15 +217,18 @@
 //  Write out a data member given as a TDataMember object to an output stream.
 //
-Bool_t MParContainer::WriteDataMember(ostream &out, TDataMember *member) const
+Bool_t MParContainer::WriteDataMember(ostream &out, const TDataMember *member) const
 {
     if (!member)
         return kFALSE;
 
-    if (!member->IsPersistent())
-        return kFALSE;
-
-    /*const*/ TMethodCall *call = member->GetterMethod(); //FIXME: Root
+    if (!member->IsPersistent() || member->Property()&kIsStatic)
+        return kFALSE;
+
+    /*const*/ TMethodCall *call = ((TDataMember*)member)->GetterMethod(); //FIXME: Root
     if (!call)
-        return kFALSE;
+    {
+        *fLog << warn << "Sorry, no getter method found for " << member->GetName() << endl;
+        return kFALSE;
+    }
 
     switch (call->ReturnType())
@@ -256,5 +260,27 @@
 Bool_t MParContainer::WriteDataMember(ostream &out, const char *member) const
 {
-    return WriteDataMember(out, IsA()->GetDataMember(member));
+    /*const*/ TClass *cls = IsA()->GetBaseDataMember(member);
+    if (!cls)
+        return kFALSE;
+
+    return WriteDataMember(out, cls->GetDataMember(member));
+}
+
+// --------------------------------------------------------------------------
+//
+//  Write out a data member from a given TList of TDataMembers.
+//  returns kTRUE when at least one member was successfully written
+//
+Bool_t MParContainer::WriteDataMember(ostream &out, const TList *list) const
+{
+    Bool_t rc = kFALSE;
+
+    TDataMember *data = NULL;
+
+    TIter Next(list);
+    while ((data=(TDataMember*)Next()))
+        rc |= WriteDataMember(out, data);
+
+    return rc;
 }
 
@@ -267,14 +293,25 @@
 //  Only data members which are of integer (Bool_t, Int_t, ...) or
 //  floating point (Float_t, Double_t, ...) type are written.
-//
-void MParContainer::AsciiWrite(ostream &out) const
+//  returns kTRUE when at least one member was successfully written
+//
+Bool_t MParContainer::AsciiWrite(ostream &out) const
 {
     // *fLog << warn << "To use the the ascii output of " << GetName();
     // *fLog << " you have to overload " << ClassName() << "::AsciiWrite." << endl;
 
-    TDataMember *data = NULL;
-
-    TIter Next(IsA()->GetListOfDataMembers());
-    while ((data=(TDataMember*)Next()))
-        WriteDataMember(out, data);
-}
+    Bool_t rc = WriteDataMember(out, IsA()->GetListOfDataMembers());
+
+    TIter NextBaseClass(IsA()->GetListOfBases());
+    TBaseClass *base;
+    while ((base = (TBaseClass*) NextBaseClass()))
+    {
+        /*const*/ TClass *cls = base->GetClassPointer();
+
+        if (!cls)
+            continue;
+
+        rc |= WriteDataMember(out, cls->GetListOfDataMembers());
+    }
+
+    return rc;
+}
Index: trunk/MagicSoft/Mars/mbase/MParContainer.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 1219)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 1222)
@@ -67,8 +67,9 @@
 
     Bool_t WriteDataMember(ostream &out, const char *member) const;
-    Bool_t WriteDataMember(ostream &out, TDataMember *member) const;
+    Bool_t WriteDataMember(ostream &out, const TDataMember *member) const;
+    Bool_t WriteDataMember(ostream &out, const TList *list) const;
 
     virtual void AsciiRead(ifstream &fin);
-    virtual void AsciiWrite(ostream &out) const;
+    virtual Bool_t AsciiWrite(ostream &out) const;
 
     ClassDef(MParContainer, 0)  //The basis for all parameter containers
Index: trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc	(revision 1219)
+++ trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc	(revision 1222)
@@ -154,5 +154,8 @@
 
         if (memb->GetName()[0]=='\0')
-            cont->AsciiWrite(*fOut);
+        {
+            if (!cont->AsciiWrite(*fOut))
+                continue;
+        }
         else
         {
@@ -167,9 +170,11 @@
     }
 
-    if (written)
-        *fOut << endl;
+    if (!written)
+        return;
+
+    *fOut << endl;
 
     if (num!=0)
-      *fLog << warn << "Warning - given number of containers doesn't fit number of written containers." << endl;
+        *fLog << warn << "Warning - given number of containers doesn't fit number of written containers." << endl;
 }
 
