Index: trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc	(revision 8082)
+++ trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc	(revision 8281)
@@ -1,3 +1,5 @@
 /* ======================================================================== *\
+! $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.cc,v 1.13 2007-02-01 11:24:19 tbretz Exp $
+! --------------------------------------------------------------------------
 !
 ! *
@@ -18,5 +20,5 @@
 !   Author(s): Thomas Bretz, 3/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2004
+!   Copyright: MAGIC Software Development, 2000-2006
 !
 !
@@ -70,4 +72,8 @@
 //  + Double_t fMaximum;      // User defined maximum
 //
+// Class Version 3:
+// ----------------
+//  + Bool_t fUseMedian;     
+//
 //
 /////////////////////////////////////////////////////////////////////////////
@@ -101,5 +107,5 @@
 //
 MHSectorVsTime::MHSectorVsTime(const char *name, const char *title)
-    : fGraph(0), fEvt(NULL), fMinimum(-1111), fMaximum(-1111),
+    : fGraph(0), fEvt(NULL), fMinimum(-1111), fMaximum(-1111), fUseMedian(kFALSE),
     fType(0), fTypeErr(-1)
 {
@@ -226,5 +232,7 @@
     fHCamera.SetCamContent(*evt, fType);
 
-    const Double_t val0 = fHCamera.GetMeanSectors(fSectors, fAreaIndex);
+    const Double_t val0 = fUseMedian ?
+        fHCamera.GetMedianSectors(fSectors, fAreaIndex) :
+        fHCamera.GetMeanSectors(fSectors, fAreaIndex);
 
     if (!TMath::Finite(val0))
@@ -235,7 +243,11 @@
     if (fTypeErr>=0)
     {
-        const Double_t rms0 = fHCamera.GetRmsSectors(fSectors, fAreaIndex);
+        const Double_t rms0 = fUseMedian ?
+            fHCamera.GetDevSectors(fSectors, fAreaIndex) :
+
+            fHCamera.GetRmsSectors(fSectors, fAreaIndex);
         if (!TMath::Finite(rms0))
             return kTRUE;
+
         ((TGraphErrors*)fGraph)->SetPointError(fGraph->GetN()-1, 0, rms0);
     }
@@ -334,4 +346,6 @@
     TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(fGraph);
     pad->SetBorderMode(0);
+    pad->SetGridx();
+    pad->SetGridy();
     AppendPad(opt);
 }
Index: trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h	(revision 8082)
+++ trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h	(revision 8281)
@@ -1,2 +1,5 @@
+/* ======================================================================== *\
+!  $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.h,v 1.7 2007-02-01 11:24:19 tbretz Exp $
+\* ======================================================================== */
 #ifndef MARS_MHSectorVsTime
 #define MARS_MHSectorVsTime
@@ -25,13 +28,13 @@
 
 private:
-    TGraph *fGraph;
+    TGraph *fGraph;         // The TGraph output to the display
 
-    MCamEvent *fEvt;        //! the current event
-    MGeomCam  *fCam;        //! the camera geometry
+    MCamEvent *fEvt;        //! pointer to the current event
+    MGeomCam  *fCam;        //! pointer the camera geometry
 
-    MRawEvtHeader *fHeader; //!
-    MTime         *fTime;   //!
+    MRawEvtHeader *fHeader; //! pointer to the event header (DAQ Evt number instead of counter)
+    MTime         *fTime;   //! pointer to event time (time instead of number)
 
-    MHCamera fHCamera;      //!
+    MHCamera fHCamera;      //! The camera to be used for calculation
 
     Double_t fMin;          //! Calculation of minimum
@@ -41,12 +44,14 @@
     Double_t fMaximum;      // User defined maximum
 
-    TString fNameEvt;
-    TString fNameTime;
+    Bool_t fUseMedian;      // Whether to display median/dev instead of mean/rms
 
-    Int_t fType;
-    Int_t fTypeErr;
+    TString fNameEvt;       // Name of MCamEvent to be displayed
+    TString fNameTime;      // Name of MTime container to be used
 
-    TArrayI fSectors;
-    TArrayI fAreaIndex;
+    Int_t fType;            // Type for mean  used in GetPixelContent
+    Int_t fTypeErr;         // Type for error used in GetPixelContent (-1 = no error)
+
+    TArrayI fSectors;       // Which sectors shell be displayed
+    TArrayI fAreaIndex;     // Which pixel sized should be displayed
 
     // MH
@@ -69,4 +74,6 @@
     void SetMaximum(Double_t max=-1111) { fMaximum = max; }
 
+    void SetUseMedian(Bool_t b=kTRUE) { fUseMedian=b; }
+
     // Getter
     TH1 *GetHistByName(const TString name="") const;
@@ -80,5 +87,5 @@
     void Paint(Option_t *o=NULL);
 
-    ClassDef(MHSectorVsTime, 2) // Histogram to sum camera events
+    ClassDef(MHSectorVsTime, 3) // Histogram to sum camera events
 };
 
