Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7222)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7223)
@@ -34,4 +34,14 @@
      - improved scaling for significance plot, so that significances
      similar to the ThetaSq plot come out
+
+   * mhvstime/MHSectorVsTime.[h,cc]:
+     - implemented the possibility to set a minimum/maximum from outside
+
+   * mjobs/MJStar.cc:
+     - added a plot of the pedestal rms vs time
+     - set minimum and maximum for dc currents vs time
+
+   * mpedestal/MPedPhotCam.cc:
+     - added a sanity in GetPixelContent for the index
 
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 7222)
+++ trunk/MagicSoft/Mars/NEWS	(revision 7223)
@@ -118,4 +118,7 @@
    - star: New tab (Currents) displaying the time evolution of the mean 
            DC currents
+
+   - star: New tab (MeanRms) displaying the time volution of the mean
+           Pedestal Rms
 
    - star: Output now contains MReportStarguider
Index: trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc	(revision 7222)
+++ trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc	(revision 7223)
@@ -95,5 +95,6 @@
 //
 MHSectorVsTime::MHSectorVsTime(const char *name, const char *title)
-    : fGraph(0), fEvt(NULL), fType(0), fTypeErr(-1)
+    : fGraph(0), fEvt(NULL), fMinimum(-1111), fMaximum(-1111),
+    fType(0), fTypeErr(-1)
 {
     //
@@ -191,4 +192,9 @@
     fGraph->SetMarkerStyle(kFullDotMedium);
 
+    if (fMinimum!=-1111)
+        fGraph->SetMinimum(fMinimum);
+    if (fMaximum!=-1111)
+        fGraph->SetMaximum(fMaximum);
+
     fMin =  FLT_MAX;
     fMax = -FLT_MAX;
@@ -248,6 +254,8 @@
     const Double_t add = (fMax-fMin)*0.15;
 
-    fGraph->SetMinimum(fMin-add);
-    fGraph->SetMaximum(fMax+add);
+    if (fMinimum==-1111)
+        fGraph->SetMinimum(fMin-add);
+    if (fMaximum==-1111)
+        fGraph->SetMaximum(fMax+add);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h	(revision 7222)
+++ trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h	(revision 7223)
@@ -35,6 +35,9 @@
     MHCamera fHCamera;      //!
 
-    Double_t fMin;          //!
-    Double_t fMax;          //!
+    Double_t fMin;          //! Calculation of minimum
+    Double_t fMax;          //! Calculation of maximum
+
+    Double_t fMinimum;      // User defined minimum
+    Double_t fMaximum;      // User defined maximum
 
     TString fNameEvt;
@@ -63,4 +66,7 @@
     void SetAreaIndex(const TArrayI &a)  { fAreaIndex=a; }
 
+    void SetMinimum(Double_t min=-1111) { fMinimum = min; }
+    void SetMaximum(Double_t max=-1111) { fMaximum = max; }
+
     // Getter
     TH1 *GetHistByName(const TString name="") const;
Index: trunk/MagicSoft/Mars/mjobs/MJStar.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 7222)
+++ trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 7223)
@@ -391,7 +391,14 @@
 
     // Initialize histogram
-    MHSectorVsTime histdc;
+    MHSectorVsTime histdc, histrms;
     histdc.SetNameTime("MTimeCurrents");
     histdc.SetTitle("Mean of all DC Currents;;<I> [nA]");
+    histdc.SetMinimum(0);
+    histdc.SetMaximum(3);
+    histrms.SetNameTime("MTimeCurrents");
+    histrms.SetTitle("Mean pedestal rms of all pixels;;<\\sigma_{p}> [phe]");
+    histrms.SetMinimum(0);
+    histrms.SetMaximum(0.2);
+
     /*
      // Define area index [0=inner, 1=outer]
@@ -400,6 +407,8 @@
 
     // Task to fill the histogram
-    MFillH filldc(&histdc, "MCameraDC", "FillDC");
+    MFillH filldc(&histdc,   "MCameraDC",                 "FillDC");
+    MFillH fillrms(&histrms, "MPedPhotFromExtractorRndm", "FillPedRms");
     filldc.SetNameTab("Currents");
+    fillrms.SetNameTab("MeanRms");
 
     MFillH fillw("MHWeather", "MTimeCC", "FillWeather");
@@ -414,8 +423,9 @@
     if (!ismc)
     {
-        tlist.AddToList(&fillw,  "CC");
-        tlist.AddToList(&fillp1, "Drive");
-        tlist.AddToList(&fillp2, "Starguider");
-        tlist.AddToList(&filldc, "Currents");
+        tlist.AddToList(&fillw,   "CC");
+        tlist.AddToList(&fillp1,  "Drive");
+        tlist.AddToList(&fillp2,  "Starguider");
+        tlist.AddToList(&filldc,  "Currents");
+        tlist.AddToList(&fillrms, "Currents");
     }
     tlist.AddToList(&write);
Index: trunk/MagicSoft/Mars/mpedestal/MPedPhotCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedPhotCam.cc	(revision 7222)
+++ trunk/MagicSoft/Mars/mpedestal/MPedPhotCam.cc	(revision 7223)
@@ -336,4 +336,7 @@
 Bool_t MPedPhotCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
 {
+    if (idx>=GetSize())
+        return kFALSE;
+
     switch (type)
     {
