Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 3503)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 3504)
@@ -73,4 +73,13 @@
    * mmain/MCameraDisplay.cc, mmain/MEventDisplay.[h,cc]:
      - added preliminary mode to display F1/F2/F3-files
+
+   * mbase/MStatusArray.[h,cc]:
+     - added
+
+   * mbase/Makefile, mbase/BaseLinkDef.h:
+     - added MStatusArray
+
+   * mbase/MStatusDisplay.cc:
+     - read and store MStatusArray to and from files
 
 
Index: /trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
===================================================================
--- /trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 3503)
+++ /trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 3504)
@@ -39,4 +39,5 @@
 
 // Mars core (GUI part)
+#pragma link C++ class MStatusArray+;
 #pragma link C++ class MStatusDisplay+;
 #pragma link C++ class MProgressBar+;
Index: /trunk/MagicSoft/Mars/mbase/MStatusArray.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MStatusArray.cc	(revision 3504)
+++ /trunk/MagicSoft/Mars/mbase/MStatusArray.cc	(revision 3504)
@@ -0,0 +1,57 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz 03/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//  MStatusArray
+//
+//  Helper class for MStatusDisplay
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MStatusArray.h"
+
+#include "MStatusDisplay.h"
+
+ClassImp(MStatusArray);
+
+using namespace std;
+
+TObject *MStatusArray::DisplayIn(Option_t *o) const
+{
+    MStatusDisplay *d = 0;
+    if (TString(o).IsNull())
+        d = new MStatusDisplay;
+
+    if (!d)
+        d = (MStatusDisplay*)gROOT->GetListOfSpecials()->FindObject(o);
+
+    if (!d)
+        return 0;
+
+    if (d->Display(*this))
+        return d;
+
+    delete d;
+    return 0;
+}
Index: /trunk/MagicSoft/Mars/mbase/MStatusArray.h
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MStatusArray.h	(revision 3504)
+++ /trunk/MagicSoft/Mars/mbase/MStatusArray.h	(revision 3504)
@@ -0,0 +1,24 @@
+#ifndef MARS_MStatusArray
+#define MARS_MStatusArray
+
+#ifndef ROOT_TObjArray
+#include <TObjArray.h>
+#endif
+
+class MStatusArray : public TObjArray
+{
+    friend class MStatusDisplay;
+private:
+    MStatusArray(Int_t s = TCollection::kInitCapacity, Int_t lowerBound = 0)
+        : TObjArray(s, lowerBound)
+    {
+    }
+
+public:
+    TObject *DisplayIn(Option_t *o=0) const;         // *MENU*
+    TObject *Display() const { return DisplayIn(); } // *MENU*
+
+    ClassDef(MStatusArray, 1) // Helper class for status display
+};
+
+#endif
Index: /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 3503)
+++ /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 3504)
@@ -98,4 +98,5 @@
 #include "MSearch.h"              // MSearch
 #include "MParContainer.h"        // MParContainer::GetDescriptor
+#include "MStatusArray.h"         // MStatusArray
 
 #undef DEBUG
@@ -169,4 +170,5 @@
 #define MGTextView TGTextView
 #endif
+
 // --------------------------------------------------------------------------
 
@@ -1540,31 +1542,6 @@
 }
 
-// --------------------------------------------------------------------------
-//
-// Reads the contents of a saved MStatusDisplay from a file.
-//
-Int_t MStatusDisplay::Read(const char *name)
-{
-    if (!gFile)
-    {
-        *fLog << warn << "MStatusDisplay::Read: No file found. Please create a TFile first." << endl;
-        return 0;
-    }
-
-    if (!gFile->IsOpen())
-    {
-        *fLog << warn << "MStatusDisplay::Read: File not open. Please open the TFile first." << endl;
-        return 0;
-    }
-
-    TObjArray list;
-
-    const Int_t n = list.Read(name);
-    if (n==0)
-    {
-        *fLog << warn << "MStatusDisplay::Read: No objects read." << endl;
-        return 0;
-    }
-
+Bool_t MStatusDisplay::Display(const TObjArray &list)
+{
     TIter Next(&list);
 
@@ -1572,6 +1549,6 @@
     if (!o)
     {
-        *fLog << err << "MStatusDisplay: First entry missing in " << name << "." << endl;
-        return 0;
+        *fLog << err << "MStatusDisplay::Display: No entry in TObjArray." << endl;
+        return kFALSE;
     }
 
@@ -1583,4 +1560,40 @@
             DrawClonePad(AddTab(c->GetName()), *c);
 
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Reads the contents of a saved MStatusDisplay from a file.
+//
+Int_t MStatusDisplay::Read(const char *name)
+{
+    if (!gFile)
+    {
+        *fLog << warn << "MStatusDisplay::Read: No file found. Please create a TFile first." << endl;
+        return 0;
+    }
+
+    if (!gFile->IsOpen())
+    {
+        *fLog << warn << "MStatusDisplay::Read: File not open. Please open the TFile first." << endl;
+        return 0;
+    }
+
+    TObjArray list;
+
+    const Int_t n = list.Read(name);
+    if (n==0)
+    {
+        *fLog << warn << "MStatusDisplay::Read: No objects read." << endl;
+        return 0;
+    }
+
+    if (!Display(list))
+    {
+        *fLog << err << "MStatusDisplay::Display: No entry in " << name << "." << endl;
+        return 0;
+    }
+
     *fLog << inf << "MStatusDisplay: Key " << name << " with " << n << " keys read from file." << endl;
 
@@ -1629,5 +1642,5 @@
     }
 
-    TObjArray list;
+    MStatusArray list;
 
     TNamed named;
Index: /trunk/MagicSoft/Mars/mbase/Makefile
===================================================================
--- /trunk/MagicSoft/Mars/mbase/Makefile	(revision 3503)
+++ /trunk/MagicSoft/Mars/mbase/Makefile	(revision 3504)
@@ -59,4 +59,5 @@
            MGList.cc \
            MGTask.cc \
+           MStatusArray.cc \
            MStatusDisplay.cc \
 	   MArray.cc \
