Index: trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.cc	(revision 4889)
+++ trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.cc	(revision 4891)
@@ -18,5 +18,5 @@
 !   Author(s): Thomas Bretz, 12/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2003
+!   Copyright: MAGIC Software Development, 2000-2004
 !
 !
@@ -28,4 +28,15 @@
 //
 // Display the pixel content versus time or event number
+//
+// Axis titles
+// ===========
+//
+// 1) If no other title is given the rule for the y-axis is used.
+// 2) If the MH3 has a non-default title (MH3::SetTitle called)
+//    this title is set as the histogram title. It can be used to overwrite
+//    the axis titles. For more information see TH1::SetTitle, eg.
+//       SetTitle("MyGraph;;Counts");
+//    The title for the x-axis is ignored and set automatically (MAKE SURE
+//    YOU HAVE TWO SEMICOLON!)
 //
 /////////////////////////////////////////////////////////////////////////////
@@ -48,4 +59,7 @@
 
 using namespace std;
+
+const TString MHPixVsTime::gsDefName  = "MHPixVsTime";
+const TString MHPixVsTime::gsDefTitle = "Graph of pixel content vs. time";
 
 // --------------------------------------------------------------------------
@@ -59,6 +73,6 @@
     //   set the name and title of this object
     //
-    fName  = name  ? name  : "MHPixVsTime";
-    fTitle = title ? title : "Average of MPixVsTimes";
+    fName  = name  ? name  : gsDefName.Data();
+    fTitle = title ? title : gsDefTitle.Data();
 
     TString t("Pixel Index #");
@@ -77,6 +91,26 @@
 MHPixVsTime::~MHPixVsTime()
 {
-  if(fGraph)
-    delete fGraph;
+    if (fGraph)
+        delete fGraph;
+}
+
+// --------------------------------------------------------------------------
+//
+// Set the name of the TGraph and the MHPixVsTime container
+//
+void MHPixVsTime::SetName(const char *name)
+{
+    fGraph->SetName(name);
+    MParContainer::SetName(name);
+}
+
+// --------------------------------------------------------------------------
+//
+// Set the title of the TGraph and the MHPixVsTime container
+//
+void MHPixVsTime::SetTitle(const char *title)
+{
+    fGraph->SetTitle(title);
+    MParContainer::SetTitle(title);
 }
 
@@ -124,4 +158,7 @@
     }
 
+    if (fTitle!=gsDefTitle)
+        fGraph->SetTitle(fTitle);
+
     return kTRUE;
 }
@@ -190,5 +227,4 @@
 
     h->SetXTitle("Time");
-    h->SetYTitle("");
     if (!fNameTime.IsNull())
     {
Index: trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.h	(revision 4889)
+++ trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.h	(revision 4891)
@@ -20,4 +20,7 @@
 {
 private:
+    static const TString gsDefName;
+    static const TString gsDefTitle;
+
     TGraphErrors *fGraph;
     Int_t fIndex;
@@ -46,4 +49,7 @@
     void SetType(Int_t type, Int_t e=-1) { fType = type; fTypeErr=e; }
 
+    void SetName(const char *name);
+    void SetTitle(const char *title);
+
     TH1 *GetHistByName(const TString name="");
     TGraph *GetGraph() { return fGraph; }
Index: trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc	(revision 4889)
+++ trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc	(revision 4891)
@@ -30,4 +30,12 @@
 // single sector
 //
+// 1) If no other title is given the rule for the y-axis is used.
+// 2) If the MH3 has a non-default title (MH3::SetTitle called)
+//    this title is set as the histogram title. It can be used to overwrite
+//    the axis titles. For more information see TH1::SetTitle, eg.
+//       SetTitle("MyGraph;;Counts");
+//    The title for the x-axis is ignored and set automatically (MAKE SURE
+//    YOU HAVE TWO SEMICOLON!)
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MHSectorVsTime.h"
@@ -50,4 +58,7 @@
 
 using namespace std;
+
+const TString MHSectorVsTime::gsDefName  = "MSectorHVsTime";
+const TString MHSectorVsTime::gsDefTitle = "Graph of sector mean vs. time";
 
 // --------------------------------------------------------------------------
@@ -62,6 +73,6 @@
     //   set the name and title of this object
     //
-    fName  = name  ? name  : "MHSectorVsTime";
-    fTitle = title ? title : "Sector mean vs time";
+    fName  = name  ? name  : gsDefName.Data();
+    fTitle = title ? title : gsDefTitle.Data();
 }
 
@@ -75,4 +86,25 @@
         delete fGraph;
 }
+
+// --------------------------------------------------------------------------
+//
+// Set the name of the TGraph and the MHVsTime container
+//
+void MHSectorVsTime::SetName(const char *name)
+{
+    fGraph->SetName(name);
+    MParContainer::SetName(name);
+}
+
+// --------------------------------------------------------------------------
+//
+// Set the title of the TGraph and the MHVsTime container
+//
+void MHSectorVsTime::SetTitle(const char *title)
+{
+    fGraph->SetTitle(title);
+    MParContainer::SetTitle(title);
+}
+
 
 // --------------------------------------------------------------------------
@@ -127,5 +159,5 @@
     fGraph = fTypeErr<0 ? new TGraph : new TGraphErrors;
     fGraph->SetName(fEvt ? dynamic_cast<TObject*>(fEvt)->GetName() : "MCamEvent");
-    fGraph->SetTitle("Camera");
+    fGraph->SetTitle(fTitle==gsDefTitle?"Camera":fTitle);
 
     fMin =  FLT_MAX;
@@ -206,11 +238,9 @@
 void MHSectorVsTime::Draw(Option_t *opt)
 {
-    /*
+    if (!fGraph)
+        return;
+
     if (fGraph->GetN()==0)
         return;
-        */
-
-    if (fGraph->GetN()==0)
-        return;
 
     TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
@@ -220,12 +250,5 @@
 
     TString str(opt);
-    /*
-    fGraph->GetHistogram()->SetXTitle("Time");
-    fGraph->GetHistogram()->GetXaxis()->SetTimeFormat("%H:%M:%S %F1995-01-01 00:00:00");
-    fGraph->GetHistogram()->GetXaxis()->SetTimeDisplay(1);
-    fGraph->GetHistogram()->GetXaxis()->SetLabelSize(0.033);
-
-    fGraph->GetHistogram()->SetYTitle("");
-     */
+
     if (!str.Contains("A"))
         str += "A";
@@ -242,5 +265,4 @@
 
     h->SetXTitle("Time");
-    h->SetYTitle("");
 
     if (!fNameTime.IsNull())
@@ -252,29 +274,4 @@
     }
 
-    *fLog << dbg << "Draw: " << str << endl;
     fGraph->Draw(str);
-/*
-    str.ReplaceAll("same", "");
-    str.ReplaceAll("A", "");
-
-    Int_t i=-1;
-    Int_t col=kRed;
-    while ((g=(TGraphErrors*)Next()))
-    {
-        i++;
-        *fLog << dbg << "Check" << i << ": " << str << endl;
-
-        while ((fMinSector>=0 && i<fMinSector) || (fMaxSector>=0 && i>fMaxSector))
-            i++;
-
-        h = g->GetHistogram();
-        g->SetLineColor(col++);
-
-        *fLog << dbg << "Draw" << i << ": " << g->GetTitle() << endl;
-        g->Draw(str);
-
-    }
-
-    pad->Modified();
-    pad->Update();*/
-}
+}
Index: trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h	(revision 4889)
+++ trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h	(revision 4891)
@@ -20,4 +20,8 @@
 class MHSectorVsTime : public MH
 {
+private:
+    static const TString gsDefName;
+    static const TString gsDefTitle;
+
 private:
     TGraph *fGraph;
@@ -51,4 +55,7 @@
     ~MHSectorVsTime();
 
+    void SetName(const char *name);
+    void SetTitle(const char *title);
+
     void SetNameEvt(const TString name)  { fNameEvt = name; }
     void SetNameTime(const TString name) { fNameTime = name; }
Index: trunk/MagicSoft/Mars/mhvstime/MHVsTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHVsTime.cc	(revision 4889)
+++ trunk/MagicSoft/Mars/mhvstime/MHVsTime.cc	(revision 4891)
@@ -29,4 +29,15 @@
 // Use this class if you want to display any rule vs time (or event number)
 //
+// Axis titles
+// ===========
+//
+// 1) If no other title is given the rule for the y-axis is used.
+// 2) If the MH3 has a non-default title (MH3::SetTitle called)
+//    this title is set as the histogram title. It can be used to overwrite
+//    the axis titles. For more information see TH1::SetTitle, eg.
+//       SetTitle("MyGraph;;Counts");
+//    The title for the x-axis is ignored and set automatically (MAKE SURE
+//    YOU HAVE TWO SEMICOLON!)
+//
 // eg.
 //       MHVsTime hist("MHillas.fAlpha");
@@ -63,6 +74,6 @@
 using namespace std;
 
-static const TString gsDefName  = "MHVsTime";
-static const TString gsDefTitle = "Container for a graph vs time/evtnumber";
+const TString MHVsTime::gsDefName  = "MHVsTime";
+const TString MHVsTime::gsDefTitle = "Container for a graph vs time/evtnumber";
 
 // --------------------------------------------------------------------------
@@ -89,4 +100,5 @@
     fGraph->SetPoint(0, 0, 0); // Dummy point!
     fGraph->SetEditable();     // Used as flag: First point? yes/no
+    fGraph->SetMarkerStyle(kFullDotMedium);
 }
 
@@ -137,9 +149,10 @@
     fGraph->SetEditable();     // Used as flag: First point? yes/no
 
-    TString title(fData ? GetRule() : (TString)"Histogram");
+
+    TString title(fData ? GetRule() : (TString)"Graph");
     title += " vs ";
     title += fUseEventNumber ? "Event Number" : "Time";
 
-    fGraph->SetNameTitle(fName, title);
+    fGraph->SetNameTitle(fName, fTitle==gsDefTitle?title:fTitle);
 
     fMean = 0;
@@ -245,9 +258,4 @@
     }
 
-    fGraph->GetHistogram()->SetMarkerStyle(kFullDotMedium);
-    fGraph->GetHistogram()->SetYTitle(fAxisTitle.IsNull() ? GetRule() : fAxisTitle);
-    if (fTitle!=gsDefTitle)
-        fGraph->GetHistogram()->SetTitle(fTitle);
-
     if (TestBit(kIsLogy))
         gPad->SetLogy();
Index: trunk/MagicSoft/Mars/mhvstime/MHVsTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHVsTime.h	(revision 4889)
+++ trunk/MagicSoft/Mars/mhvstime/MHVsTime.h	(revision 4891)
@@ -15,4 +15,8 @@
 class MHVsTime : public MH
 {
+private:
+    static const TString gsDefName;
+    static const TString gsDefTitle;
+
 protected:
     // Could be const but root < 3.02/06 doesn't like this...
@@ -29,6 +33,4 @@
     Int_t       fN;         //! Number of entries in fMean
     MTime       fLast;      //! For checks
-
-    TString     fAxisTitle;
 
     enum {
@@ -50,5 +52,4 @@
 
     void SetLogy(Bool_t b=kTRUE) { b ? SetBit(kIsLogy) : ResetBit(kIsLogy); }
-    void SetAxisTitle(const char *y) { fAxisTitle=y; }
 
     Bool_t SetupFill(const MParList *pList);
