Index: /trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc	(revision 1176)
+++ /trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc	(revision 1177)
@@ -48,4 +48,8 @@
 ClassImp(MWriteAsciiFile);
 
+// --------------------------------------------------------------------------
+//
+// Init. Replaces the same code used in all constructors.
+//
 void MWriteAsciiFile::Init(const char *filename, const char *name, const char *title)
 {
@@ -110,5 +114,8 @@
 // --------------------------------------------------------------------------
 //
-// Check if our container is ready for writing. If so write it.
+// Check if the containers are ready for writing. If so write them.
+// The containers are written in one line, one after each other.
+// If not all containers are written (because of the IsReadyToSave-flag)
+// a warning message is print.
 //
 void MWriteAsciiFile::CheckAndWrite() const
@@ -117,4 +124,6 @@
 
     MParContainer *cont = NULL;
+
+    const Int_t num = fContainer.GetSize();
 
     TIter Next(&fContainer);
@@ -128,8 +137,13 @@
         *fOut << " ";
         written = kTRUE;
+
+        num--;
     }
 
     if (written)
         *fOut << endl;
+
+    if (num!=0)
+        *fOut << warn << "Warning - given number of containers doesn't fit number of written containers." << endl;
 }
 
@@ -145,6 +159,7 @@
 // --------------------------------------------------------------------------
 //
-// If the container is yet unknown and the name of it is known only, try
-// to get the container from the parameter list.
+// Tries to get all containers from the ParList which were given by name
+// adds them to the list of pointers to the container which should be
+// written to the ascii file.
 //
 Bool_t MWriteAsciiFile::GetContainer(MParList *pList)
@@ -180,4 +195,6 @@
 // --------------------------------------------------------------------------
 //
+// Add another container (by name) to be written to the ascii file.
+// The container will be output one after each other in one line.
 //
 void MWriteAsciiFile::AddContainer(const char *cname)
@@ -189,4 +206,6 @@
 // --------------------------------------------------------------------------
 //
+// Add another container (by pointer) to be written to the ascii file.
+// The container will be output one after each other in one line.
 //
 void MWriteAsciiFile::AddContainer(MParContainer *cont)
