Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2772)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2773)
@@ -20,7 +20,12 @@
      - changed size of ps-paper
      - added a user defined bottom line to the ps-files
+     - added name (currently unused)
+     - added title (used as possible bottom line in ps-file)
      
    * mraw/MRawRunHeader.cc:
      - added some comments
+
+   * status.cc:
+     - set name of input as bottom line of status display
 
 
Index: trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 2772)
+++ trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 2773)
@@ -560,5 +560,5 @@
 //
 MStatusDisplay::MStatusDisplay(Long_t t)
-: TGMainFrame(NULL, 1, 1), fLog(&gLog), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
+: TGMainFrame(NULL, 1, 1), fName("MStatusDisplay"), fLog(&gLog), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
 {
     // p==NULL means: Take gClient->GetRoot() if not in batch mode
@@ -1391,5 +1391,5 @@
     //        where (eg Eventloop) first!
 
-    gLog << dbg << "MStatusDisplay is on heap: " << (int)IsOnHeap() << endl;
+    gLog << dbg << fName << " is on heap: " << (int)IsOnHeap() << endl;
 
     if (TestBit(kExitLoopOnExit) || TestBit(kExitLoopOnClose))
@@ -1401,9 +1401,9 @@
     if (fIsLocked<=0 && IsOnHeap())
     {
-        gLog << dbg << "delete MStatusDisplay;" << endl;
+        gLog << dbg << "delete " << fName << ";" << endl;
         delete this;
     }
     fStatus = kFileExit;
-    gLog << dbg << "MStatusDisplay.fStatus=kFileExit;" << endl;
+    gLog << dbg << fName << ".fStatus=kFileExit;" << endl;
 }
 
@@ -1528,4 +1528,14 @@
 
     TIter Next(&list);
+
+    TObject *o=Next();
+    if (!o)
+    {
+        *fLog << err << "MStatusDisplay: First entry missing in " << name << "." << endl;
+        return 0;
+    }
+
+    fTitle = o->GetTitle();
+
     TCanvas *c;
     while ((c=(TCanvas*)Next()))
@@ -1579,4 +1589,8 @@
 
     TObjArray list;
+
+    TNamed named;
+    named.SetTitle(fTitle);
+    list.Add(&named);
 
     const Int_t max  = gROOT->IsBatch() ? fBatch->GetSize()+1 : fTab->GetNumberOfTabs();
@@ -1764,5 +1778,6 @@
 //
 // If the third argument is given a bottom line is drawn with the text
-// under it.
+// under it. If no argument is given a bottom line is drawn if
+// fTitle (SetTitle) is not empty.
 //
 Int_t MStatusDisplay::SaveAsPS(Int_t num, TString name, const TString addon)
@@ -1889,9 +1904,10 @@
         line.PaintLineNDC(0, 1.01, 1, 1.01);
 
-        if (!addon.IsNull())
+        TString txt(addon.IsNull() ? fTitle : addon);
+        if (!txt.IsNull())
         {
             line.PaintLineNDC(0, -0.00, 1, -0.00);
             ps.SetTextAlign(23); // cent bottom
-            ps.TextNDC(0.5, -0.005, addon);
+            ps.TextNDC(0.5, -0.005, txt);
         }
 
Index: trunk/MagicSoft/Mars/mbase/MStatusDisplay.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MStatusDisplay.h	(revision 2772)
+++ trunk/MagicSoft/Mars/mbase/MStatusDisplay.h	(revision 2773)
@@ -34,4 +34,7 @@
 {
 public:
+    TString fName;        // status display identifier (name) (gROOT->FindObject())
+    TString fTitle;       // status display title
+
     typedef enum {
         // kFile
@@ -143,4 +146,9 @@
      void SetPrinter(const TString &lpr) { fPrinter = lpr; }
 
+     virtual void SetName(const char *name) { fName = name; }
+     virtual void SetTitle(const char *title="") { fTitle = title; }
+     virtual const char *GetName() const { return fName.Data(); }
+     virtual const char *GetTitle() const { return fTitle.Data(); }
+
      TCanvas &AddTab(const char *name);
      TGCompositeFrame *AddRawTab(const char *name);
Index: trunk/MagicSoft/Mars/status.cc
===================================================================
--- trunk/MagicSoft/Mars/status.cc	(revision 2772)
+++ trunk/MagicSoft/Mars/status.cc	(revision 2773)
@@ -164,4 +164,7 @@
     gLog.SetOutputFile("status.log", kTRUE);  // Enable output to file
     //gLog.EnableOutputDevice(MLog::eStdout); // Enable output to stdout again
+
+    // Set input file as display title (bottom line in ps file)
+    d->SetTitle(kNamein);
 
     //
