Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7199)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7200)
@@ -40,7 +40,9 @@
      - replaced Rate historams by new histogram MHRate
      - added new histogram MHPointing
+     - gave a new name to writem
 
    * mpointing/MSrcPosCorrect.cc:
      - write new optical axis to parameter list
+     - print a message if a correction is introduced for this run
 
    * mreport/MReportStarguider.[h,cc]:
@@ -58,4 +60,18 @@
    * mpointing/Makefile, mpointing/PointingLinkDef.h:
      - added MHPointing
+
+   * mcalib/MCalibrationCam.[h,cc]:
+     - moved code of static function GetPulserColorStr into source file.
+       Hopefully this 'repairs' a strange message some people got linking
+       mars: `.gnu.linkonce.t._ZN15MCalibrationCam17GetPulserColorStrENS_13PulserColor_tE' referenced in section `.rodata' of mcalib/CalibCint.o: defined in discarded section `.gnu.linkonce.t._ZN15MCalibrationCam17GetPulserColorStrENS_13PulserColor_tE' of mcalib/CalibCint.o
+       which was mainly annoying.
+
+   * mfbase/MF.cc:
+     - changed order and handling in ReadEnv. This allows to overwrite
+       already set resources in sponde (eg. MFMagicCuts.ThetaCut)
+
+   * mhbase/MH.cc:
+     - first draft of a new palette introduced by Pepe (I got it from
+       Hendrik)
 
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 7199)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 7200)
@@ -592,2 +592,20 @@
     fNumUnreliable[aidx] = i; 
 }
+
+TString MCalibrationCam::GetPulserColorStr(PulserColor_t col)
+{
+    TString str;
+    switch (col)
+    {
+    case kCT1:   str += "CT1";      break;
+    case kGREEN: str += "Green";    break;
+    case kBLUE:  str += "Blue";     break;
+    case kUV:    str += "UV";       break;
+    case kNONE:  str += "None";     break;
+    default:     str += "Unknown";  break;
+    }
+    str += " (";
+    str += (int)col;
+    str += ")";
+    return str;
+}
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h	(revision 7199)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h	(revision 7200)
@@ -94,20 +94,5 @@
   const MCalibrationPix &operator[]             ( UInt_t i )           const;
 
-  static TString GetPulserColorStr(PulserColor_t col) {
-      TString str;
-      switch (col)
-      {
-      case kCT1:   str += "CT1";      break;
-      case kGREEN: str += "Green";    break;
-      case kBLUE:  str += "Blue";     break;
-      case kUV:    str += "UV";       break;
-      case kNONE:  str += "None";     break;
-      default:     str += "Unknown";  break;
-      }
-      str += " (";
-      str += (int)col;
-      str += ")";
-      return str;
-  }
+  static TString GetPulserColorStr(PulserColor_t col);
 
   // Inits
Index: trunk/MagicSoft/Mars/mfbase/MF.cc
===================================================================
--- trunk/MagicSoft/Mars/mfbase/MF.cc	(revision 7199)
+++ trunk/MagicSoft/Mars/mfbase/MF.cc	(revision 7200)
@@ -477,65 +477,69 @@
 Int_t MF::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
 {
-    Bool_t rc = MFilter::ReadEnv(env, prefix, print);
-    if (rc==kERROR)
-        return kERROR;
-
-    if (!IsEnvDefined(env, prefix, "Condition", print))
-    {
-        if (rc)
+
+    /*
+     Bool_t rc = MFilter::ReadEnv(env, prefix, print);
+     if (rc==kERROR)
+     return kERROR;
+    */
+    if (IsEnvDefined(env, prefix, "Condition", print))
+    {
+        TString rule = GetEnvValue(env, prefix, "Condition", "");
+        rule.ReplaceAll(" ", "");
+
+        Int_t idx=0;
+        while (1)
+        {
+            TString cond;
+            if (IsEnvDefined(env, prefix, Form("%d", idx), print))
+            {
+                cond += "(";
+                cond += GetEnvValue(env, prefix, Form("%d", idx), "");
+                cond += ")";
+            }
+
+            if (cond.IsNull())
+                break;
+
+            rule.ReplaceAll(Form("{%d}", idx), cond);
+            idx++;
+        }
+
+        if (fF)
+        {
+            delete fF;
+            fF = 0;
+        }
+
+        if (rule.IsNull())
+        {
+            *fLog << warn << GetDescriptor() << " ::ReadEnv - WARNING: Empty condition found." << endl;
+            SetAllowEmpty();
+            return kTRUE;
+        }
+
+        SetAllowEmpty(kFALSE);
+
+        if (!(fF=ParseString(rule, 1)))
+        {
+            *fLog << err << "MF::ReadEnv - ERROR: Parsing '" << rule << "' failed." << endl;
+            return kERROR;
+        }
+
+        if (print)
+        {
+            *fLog << inf << "found: ";
+            fF->Print();
+            *fLog << endl;
+        }
+    }
+    else
+    {
+        if (!fF)
         {
             *fLog << warn << GetDescriptor() << " ::ReadEnv - WARNING: No condition found." << endl;
             SetAllowEmpty();
-        }
-        return rc;
-    }
-
-    TString rule = GetEnvValue(env, prefix, "Condition", "");
-    rule.ReplaceAll(" ", "");
-
-    Int_t idx=0;
-    while (1)
-    {
-        TString cond;
-        if (IsEnvDefined(env, prefix, Form("%d", idx), print))
-        {
-            cond += "(";
-            cond += GetEnvValue(env, prefix, Form("%d", idx), "");
-            cond += ")";
-        }
-
-        if (cond.IsNull())
-            break;
-
-        rule.ReplaceAll(Form("{%d}", idx), cond);
-        idx++;
-    }
-
-    if (fF)
-    {
-        delete fF;
-        fF = 0;
-    }
-
-    if (rule.IsNull())
-    {
-        *fLog << warn << GetDescriptor() << " ::ReadEnv - WARNING: Empty condition found." << endl;
-        SetAllowEmpty();
-        return kTRUE;
-    }
-
-    SetAllowEmpty(kFALSE);
-
-    if (!(fF=ParseString(rule, 1)))
-    {
-        *fLog << err << "MF::ReadEnv - ERROR: Parsing '" << rule << "' failed." << endl;
-        return kERROR;
-    }
-
-    if (print)
-    {
-        *fLog << inf << "found: ";
-        fF->Print();
-        *fLog << endl;
+            return kFALSE;
+        }
     }
 
@@ -546,7 +550,8 @@
     // might check for "Inverted" in this case both gets inverted
     // and double-inversion is no inversion
+    /*
     if (IsEnvDefined(env, prefix, "Inverted", print))
         if (GetEnvValue(env, prefix, "Inverted", kFALSE)==kTRUE)
-            SetInverted(kFALSE);
+            SetInverted(kFALSE);*/
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhbase/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH.cc	(revision 7199)
+++ trunk/MagicSoft/Mars/mhbase/MH.cc	(revision 7200)
@@ -1451,4 +1451,13 @@
         found=kTRUE;
     }
+    if (paletteName.Contains("pepe"))
+    {
+        double s[5] = {0.0, 0.6, 0.7, 0.9, 1.0 };
+        double r[5] = {0.1, 0.1, 1.0, 1.0, 1.0 };
+        double g[5] = {0.1, 0.1, 0.0, 1.0, 1.0 };
+        double b[5] = {0.2, 0.7, 0.0, 0.3, 0.9 };
+        gStyle->CreateGradientColorTable(5, s, r, g, b, ncol);
+        found=kTRUE;
+    }
 
     if (inverse)
Index: trunk/MagicSoft/Mars/mpointing/MHPointing.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MHPointing.cc	(revision 7199)
+++ trunk/MagicSoft/Mars/mpointing/MHPointing.cc	(revision 7200)
@@ -87,8 +87,10 @@
     fDevTimeSG.SetNameTitle("DevSG",      "Drive (black) and starguider (blue) deviation");
     fDevTimeCosy.SetNameTitle("DevCosy",  "Cosy deviation");
-    fBrightness.SetNameTitle("Brigtness", "Arbitrary Sky Brightness");
+    fBrightness.SetNameTitle("Brigtness", "Arbitrary Sky Brightness (black), No. of stars identified by starguider (blue)");
     fNumStars.SetNameTitle("NumStars",    "Number of stars identified by starguider");
     fDevZd.SetNameTitle("DevZd",          "Starguider Deviation Zd (blue), Az(black)");
     fDevAz.SetNameTitle("DevAz",          "Starguider Deviation Az");
+    fPosZd.SetNameTitle("PosZd",          "Nominal position Zd (black), Az (blue)");
+    fPosAz.SetNameTitle("PosZd",          "Position Az");
 
     InitGraph(fDevTimeSG);
@@ -98,4 +100,6 @@
     InitGraph(fDevZd);
     InitGraph(fDevAz);
+    InitGraph(fPosZd);
+    InitGraph(fPosAz);
 
     fDevTimeSG.SetMinimum(0);
@@ -106,4 +110,6 @@
     fDevTimeSG.SetMarkerColor(kBlue);
     fDevZd.SetMarkerColor(kBlue);
+    fNumStars.SetMarkerColor(kBlue);
+    fPosAz.SetMarkerColor(kBlue);
 }
 
@@ -170,4 +176,6 @@
     {
         AddPoint(fDevTimeCosy, tm, fReportCosy->GetAbsError()*60);
+        AddPoint(fPosZd,       tm, fReportCosy->GetNominalZd());
+        AddPoint(fPosAz,       tm, fReportCosy->GetNominalAz());
         return kTRUE;
     }
@@ -190,5 +198,5 @@
     }
 }
-/*
+
 // --------------------------------------------------------------------------
 //
@@ -227,9 +235,9 @@
     axis->SetTitle(title);
     axis->SetTitleOffset(0.9);
-    axis->SetTextColor(kRed);
+    axis->SetTextColor(kBlue);
     axis->SetBit(kCanDelete);
     axis->Draw();
 }
-*/
+
 // --------------------------------------------------------------------------
 //
@@ -259,4 +267,6 @@
     gPad->SetGridy();
     fBrightness.Draw("AP");
+    fNumStars.Draw("P");
+    DrawRightAxis("N");
 
     pad->cd(3);
@@ -271,5 +281,7 @@
     gPad->SetGridx();
     gPad->SetGridy();
-    fNumStars.Draw("AP");
+    fPosZd.Draw("AP");
+    fPosAz.Draw("P");
+    DrawRightAxis("Az [\\circ]");
 }
 
@@ -282,11 +294,21 @@
     DrawGraph(fDevZd,       "\\Delta [arcmin]");
     DrawGraph(fDevAz,       "\\Delta [arcmin]");
-    /*
-    gPad->cd(1);
-
+    DrawGraph(fPosZd,       "Zd [\\circ]");
+    DrawGraph(fPosAz,       "Az [\\circ]");
+
+    TVirtualPad *pad = gPad;
+
+    pad->cd(2);
     if (gPad)
     {
-        fHumidity.GetHistogram()->GetYaxis()->SetTitleColor(kBlue);
-        UpdateRightAxis(fTemperature);
-    }*/
-}
+        fNumStars.GetHistogram()->GetYaxis()->SetTitleColor(kBlue);
+        UpdateRightAxis(fBrightness);
+    }
+
+    pad->cd(4);
+    if (gPad)
+    {
+        fPosAz.GetHistogram()->GetYaxis()->SetTitleColor(kBlue);
+        UpdateRightAxis(fPosZd);
+    }
+}
Index: trunk/MagicSoft/Mars/mpointing/MHPointing.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MHPointing.h	(revision 7199)
+++ trunk/MagicSoft/Mars/mpointing/MHPointing.h	(revision 7200)
@@ -29,10 +29,13 @@
     TGraph             fDevAz;       // Starguider deviation Az
 
+    TGraph             fPosZd;       // Position Zd
+    TGraph             fPosAz;       // Position Az
+
     void ResetGraph(TGraph &g) const;
     void InitGraph(TGraph &g) const;
     void AddPoint(TGraph &g, Double_t x, Double_t y) const;
     void DrawGraph(TGraph &g, const char *y=0) const;
-    //void UpdateRightAxis(TGraph &g) const;
-    //void DrawRightAxis(const char *title) const;
+    void UpdateRightAxis(TGraph &g) const;
+    void DrawRightAxis(const char *title) const;
 
 public:
Index: trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc	(revision 7199)
+++ trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc	(revision 7200)
@@ -100,4 +100,10 @@
     fRunNumber = run->GetRunNumber();
 
+    if (fRunNumber<56161 && fRunNumber>53832)
+    {
+        *fLog << inf << "Run Number " << fRunNumber << " between 53832 and 56161." << endl;
+        *fLog << "A missfocussing correction (-0.048deg/0.034deg) will be applied." << endl;
+    }
+
     return kTRUE;
 }
