Index: trunk/MagicSoft/Mars/mbase/MParContainer.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1192)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1203)
@@ -37,6 +37,10 @@
 #include "MParContainer.h"
 
+#include <fstream.h>     // ofstream, AsciiWrite
+
 #include <TClass.h>      // IsA
 #include <TROOT.h>       // TROOT::Identlevel
+#include <TMethodCall.h> // TMethodCall, AsciiWrite
+#include <TDataMember.h> // TDataMember, AsciiWrite
 #include <TVirtualPad.h> // gPad
 
@@ -211,9 +215,45 @@
 //
 //  If you want to use Ascii-Input/-Output (eg. MWriteAsciiFile) of a
-//  container, overload this function.
+//  container, you may overload this function. If you don't overload it
+//  the data member of a class are written to the file in the order of
+//  appearance in the class header (be more specfic: root dictionary)
+//  Only data members which are of integer (Bool_t, Int_t, ...) or
+//  floating point (Float_t, Double_t, ...) type are written.
 //
 void MParContainer::AsciiWrite(ofstream &fout) const
 {
-    *fLog << warn << "To use the the ascii output of " << GetName();
-    *fLog << " you have to overload " << ClassName() << "::AsciiWrite." << endl;
-}
+    // *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()))
+    {
+        if (!data->IsPersistent())
+            continue;
+
+        /*const*/ TMethodCall *call = data->GetterMethod(); //FIXME: Root
+        if (!call)
+            continue;
+
+        switch (call->ReturnType())
+        {
+        case TMethodCall::kLong:
+            Long_t l;
+            call->Execute((void*)this, l); // FIXME: const, root
+            fout << l << " ";
+            continue;
+
+        case TMethodCall::kDouble:
+            Double_t d;
+            call->Execute((void*)this, d); // FIXME: const, root
+            fout << d << " ";
+            continue;
+
+        case TMethodCall::kOther:
+            /* someone may want to enhance this? */
+            continue;
+        }
+    }
+}
Index: trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc	(revision 1192)
+++ trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc	(revision 1203)
@@ -114,8 +114,5 @@
     if (fRun->Process())
     {
-        TString name(GetFileName());
-        name.Remove(0, name.Last('/')+1);
-
-        *fLog << inf << "MReadMarsFile: Switching to '" << name << "' ";
+        *fLog << inf << "MReadMarsFile: Switching to '" << GetFileName() << "' ";
         *fLog << "(before event #" << GetEventNum()-1 << ")" << endl;
 
Index: trunk/MagicSoft/Mars/mbase/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1192)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1203)
@@ -407,5 +407,5 @@
     if (!fNumEntries)
     {
-        *fLog << warn << dbginf << "No entries found in file(s)." << endl;
+        *fLog << warn << dbginf << "No entries found in file(s)" << endl;
         return kFALSE;
     }
@@ -692,7 +692,14 @@
 //  Return the name of the file we are actually reading from.
 //
-const char *MReadTree::GetFileName() const
-{
-    return fChain->GetFile()->GetName();
+TString MReadTree::GetFileName() const
+{
+    const TFile *file = fChain->GetFile();
+
+    if (!file)
+        return TString("<unknown>");
+
+    TString name(file->GetName());
+    name.Remove(0, name.Last('/')+1);
+    return name;
 }
 
Index: trunk/MagicSoft/Mars/mbase/MReadTree.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.h	(revision 1192)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.h	(revision 1203)
@@ -58,5 +58,5 @@
     UInt_t GetEntries() const  { return fNumEntries; }
 
-    const char *GetFileName() const;
+    TString GetFileName() const;
 
     virtual void   AddNotify(TObject *obj);
