Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2565)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2566)
@@ -23,4 +23,5 @@
      - changed bit 14/15 to 15/16. BIT(14) is used in TGMainFrame
        already
+     - fixed a typo. Must be kTabPrint instead of kFilePrint
      
    * mfilter/MFRealTimePeriod.h:
@@ -35,4 +36,5 @@
        autoscale is done
      - added 'content' Draw option
+     - when kNoLegend is set draw the legend showing the size
      
    * mhist/MHEvent.cc:
@@ -63,4 +65,13 @@
      - added MEventRateCalc
      - added MEventRate
+
+   * mgeom/MGeomMirror.h:
+     - fixed comments in the header - must be in one line!
+
+   * mreport/MReport.h:
+     - adde Getter-function for fState
+
+   * mreport/MReportDrive.[h,cc]:
+     - added GetAbsError() (preliminary!)
 
 
Index: /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 2565)
+++ /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 2566)
@@ -214,5 +214,5 @@
     tabmenu->AddEntry("Re&move",             kTabRemove);
     tabmenu->AddSeparator();
-    tabmenu->AddEntry("Print with &lpr",     kFilePrint);
+    tabmenu->AddEntry("Print with &lpr",     kTabPrint);
     tabmenu->Associate(this);
 
@@ -971,5 +971,5 @@
     gSystem->Unlink(name);
 
-    SetStatusLine2(Form("Done (%dpages)", pages));
+    SetStatusLine2(Form("Done (%dpage(s))", pages));
 
     return pages;
Index: /trunk/MagicSoft/Mars/mgeom/MGeomMirror.h
===================================================================
--- /trunk/MagicSoft/Mars/mgeom/MGeomMirror.h	(revision 2565)
+++ /trunk/MagicSoft/Mars/mgeom/MGeomMirror.h	(revision 2566)
@@ -15,24 +15,19 @@
     Int_t   fMirrorId;    // the Mirror Id
 
-    Float_t fFocalDist;   //  focal distance of that mirror [cm]
-    Float_t fSX;          // curvilinear coordinate of mirror's center in X[cm]
-    Float_t fSY;          // curvilinear coordinate of mirror's center in X[cm]
-    Float_t fX;           // x coordinate of the center of the mirror [cm]
-    Float_t fY;           // y coordinate of the center of the mirror [cm]
-    Float_t fZ;           // z coordinate of the center of the mirror [cm]
-    Float_t fThetaN;      // polar theta angle of the direction 
-                          //  where the mirror points to
-    Float_t fPhiN;        // polar phi angle of the direction
-                          // where the mirror points to
-    Float_t fXN;          // xn coordinate of the normal vector
-                          // in the center
-    Float_t fYN;          // yn coordinate of the normal vector
-                          // in the center
-    Float_t fZN;          // zn coordinate of the normal vector
-                          // in the center
+    Float_t fFocalDist;   // [cm] focal distance of that mirror
+    Float_t fSX;          // [cm] curvilinear coordinate of mirror's center in X
+    Float_t fSY;          // [cm] curvilinear coordinate of mirror's center in Y
+    Float_t fX;           // [cm] x coordinate of the center of the mirror
+    Float_t fY;           // [cm] y coordinate of the center of the mirror
+    Float_t fZ;           // [cm] z coordinate of the center of the mirror
+    Float_t fThetaN;      // polar theta angle of the direction where the mirror points to
+    Float_t fPhiN;        // polar phi angle of the direction where the mirror points to
+    Float_t fXN;          // xn coordinate of the normal vector in the center
+    Float_t fYN;          // yn coordinate of the normal vector in the center
+    Float_t fZN;          // zn coordinate of the normal vector in the center
                           // Note: fXN^2*fYN^2*fZN^2 = 1
-    Float_t fDeviationX;  // deviation in x [cm]
-    Float_t fDeviationY;  // deviation in y [cm]
-                          // of the spot of a single mirror on the camera plane
+    Float_t fDeviationX;  // [cm] deviation in x of the spot of a single mirror on the camera plane
+    Float_t fDeviationY;  // [cm] deviation in y of the spot of a single mirror on the camera plane
+
     TArrayF fWavelength;  // List of wavelength
     TArrayF fReflectivity;// Mirror reflectivity
Index: /trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2565)
+++ /trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2566)
@@ -465,6 +465,5 @@
         max += 1;
 
-    if (!TestBit(kNoLegend))
-        UpdateLegend(min, max, islog);
+    UpdateLegend(min, max, islog);
 
     MHexagon hex;
@@ -670,4 +669,7 @@
         }
 
+        // FIXME: Should depend on the color of the pixel...
+        //(GetColor(GetBinContent(i+1), min, max, 0));
+        txt.SetTextColor(kRed);
         txt.SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05);
         txt.PaintText(h.GetX(), h.GetY(), num);
@@ -926,8 +928,32 @@
 void MHCamera::UpdateLegend(Float_t min, Float_t max, Bool_t islog)
 {
+    const Float_t range = fGeomCam->GetMaxRadius()*1.05;
+
+    TArrow arr;
+    arr.PaintArrow(-range*.9, -range*.9, -range*.6, -range*.9, 0.025);
+    arr.PaintArrow(-range*.9, -range*.9, -range*.9, -range*.6, 0.025);
+
+    TString text;
+    text += (int)(range*.3);
+    text += "mm";
+
+    TText newtxt2;
+    newtxt2.SetTextSize(0.04);
+    newtxt2.PaintText(-range*.85, -range*.85, text);
+
+    text = "";
+    text += (float)((int)(range*.3*fGeomCam->GetConvMm2Deg()*10))/10;
+    text += "\\circ";
+    text = text.Strip(TString::kLeading);
+
+    TLatex latex;
+    latex.PaintLatex(-range*.85, -range*.75, 0, 0.04, text);
+
+    if (TestBit(kNoLegend))
+        return;
+
     TPaveStats *stats = GetStatisticBox();
 
     const Float_t hndc   = 0.92 - (stats ? stats->GetY1NDC() : 1);
-    const Float_t range  = fGeomCam->GetMaxRadius()*1.05;
     const Float_t H      = (0.75-hndc)*range;
     const Float_t offset = hndc*range;
@@ -966,24 +992,4 @@
         newbox.PaintBox(range, H*(i*h-1)-offset, range+w, H*((i+1)*h-1)-offset);
     }
-
-    TArrow arr;
-    arr.PaintArrow(-range*.9, -range*.9, -range*.6, -range*.9, 0.025);
-    arr.PaintArrow(-range*.9, -range*.9, -range*.9, -range*.6, 0.025);
-
-    TString text;
-    text += (int)(range*.3);
-    text += "mm";
-
-    TText newtxt2;
-    newtxt2.SetTextSize(0.04);
-    newtxt2.PaintText(-range*.85, -range*.85, text);
-
-    text = "";
-    text += (float)((int)(range*.3*fGeomCam->GetConvMm2Deg()*10))/10;
-    text += "\\circ";
-    text = text.Strip(TString::kLeading);
-
-    TLatex latex;
-    latex.PaintLatex(-range*.85, -range*.75, 0, 0.04, text);
 }
 
Index: /trunk/MagicSoft/Mars/mreport/MReport.h
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReport.h	(revision 2565)
+++ /trunk/MagicSoft/Mars/mreport/MReport.h	(revision 2566)
@@ -41,4 +41,6 @@
     const TString &GetIdentifier() const { return fIdentifier; }
 
+    Byte_t GetState() const { return fState; }
+
     ClassDef(MReport, 1) // Base class for control reports
 };
Index: /trunk/MagicSoft/Mars/mreport/MReportDrive.cc
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportDrive.cc	(revision 2565)
+++ /trunk/MagicSoft/Mars/mreport/MReportDrive.cc	(revision 2566)
@@ -71,2 +71,29 @@
     return str.IsNull();
 }
+
+Double_t MReportDrive::GetAbsError() const
+{
+    const Double_t pzd = fNominalZd*TMath::DegToRad();
+    const Double_t azd = fErrorZd  *TMath::DegToRad();
+    const Double_t aaz = fErrorAz  *TMath::DegToRad();
+
+    const double el = TMath::Pi()/2-pzd;
+
+    const double dphi2 = aaz/2.;
+    const double cos2  = cos(dphi2)*cos(dphi2);
+    const double sin2  = sin(dphi2)*sin(dphi2);
+    const double d     = cos(azd)*cos2 - cos(2*el)*sin2;
+
+    //
+    // Original:
+    //   cos(Zd1)*cos(Zd2)+sin(Zd1)*sin(Zd2)*cos(dAz)
+    //
+    // Correct:
+    //   const double d = cos(azd)*cos2 - cos(el1+el2)*sin2;
+    //
+    // Estimated:
+    //   const double d = cos(azd)*cos2 - cos(2*el)*sin2;
+    //
+
+    return acos(d)*TMath::RadToDeg();
+}
Index: /trunk/MagicSoft/Mars/mreport/MReportDrive.h
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportDrive.h	(revision 2565)
+++ /trunk/MagicSoft/Mars/mreport/MReportDrive.h	(revision 2566)
@@ -28,17 +28,19 @@
     Bool_t InterpreteBody(TString &str);
 
-    Double_t GetMjd() const           { return fMjd;       }
+    Double_t GetMjd() const       { return fMjd;       }
 
-    Double_t GetRa() const            { return fRa;        }
-    Double_t GetDec() const           { return fDec;       }
-    Double_t GetHa() const            { return fHa;        }
+    Double_t GetRa() const        { return fRa;        }
+    Double_t GetDec() const       { return fDec;       }
+    Double_t GetHa() const        { return fHa;        }
 
-        Double_t GetNominalZd() const { return fNominalZd; }
-    Double_t GetNominalAz() const     { return fNominalAz; }
-    Double_t GetCurrentZd() const     { return fCurrentZd; }
-    Double_t GetCurrentAz() const     { return fCurrentAz; }
+    Double_t GetNominalZd() const { return fNominalZd; }
+    Double_t GetNominalAz() const { return fNominalAz; }
+    Double_t GetCurrentZd() const { return fCurrentZd; }
+    Double_t GetCurrentAz() const { return fCurrentAz; }
 
-    Double_t GetErrorZd() const       { return fErrorZd;   }
-    Double_t GetErrorAz() const       { return fErrorAz;   }
+    Double_t GetErrorZd() const   { return fErrorZd;   }
+    Double_t GetErrorAz() const   { return fErrorAz;   }
+
+    Double_t GetAbsError() const;
 
     ClassDef(MReportDrive, 1) // Base class for control reports
