Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 8631)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 8632)
@@ -20,4 +20,13 @@
 
 
+ 2007/07/03 Thomas Bretz
+
+   * mmain/MEventDisplay.[h,cc]:
+     - changed default size
+     - added two butons to switch of the display of the image
+       parameters
+
+
+
  2007/06/30 Thomas Bretz
 
@@ -27,4 +36,7 @@
        an error in extracting the time of a saturating lo-gain pixel
        was introduced. fixed.
+
+   * resources/starguider.txt:
+     - starguider calbration file added
 
 
@@ -124,5 +136,5 @@
    * mpointing/MSrcPosCalc.[h,cc]:
      - allow to set a tasklist as callback to now which n-th 
-     pass of the same task list it is
+       pass of the same task list it is
 
    * mbase/MTaskList.[h,cc]:
Index: /trunk/MagicSoft/Mars/NEWS
===================================================================
--- /trunk/MagicSoft/Mars/NEWS	(revision 8631)
+++ /trunk/MagicSoft/Mars/NEWS	(revision 8632)
@@ -38,4 +38,9 @@
      or replace sequence.txt by the sequence number if the default
      sequence file should be used.
+
+   - mars: The default size has been increased
+
+   - mars: There are two new heckboxes which allow to switch off
+     the calculated image parameters
 
    - callisto: was broken for MCs... fixed.
@@ -109,6 +114,7 @@
      (Rem: ThetaSqN is no longer needed)
 
-   - ganymed: From XXXX on a real starguider calibration with a real
-     pointing model for the starguider is done.
+   - ganymed: From 85340 (19.3.2006) on a real starguider calibration
+     with a real pointing model for the starguider is done, calibrated
+     with more than thousand tpoints taken from this date on.
 
    - ganymed: was broken for Wobble-MCs... fixed.
@@ -121,5 +127,10 @@
         fit.SetScaleMode(MAlphaFitter::kNone);
         fit.SetScaleUser(1./3);
-     it is not yet read in automatically (will follow soon)
+     it is not yet read in automatically (will follow soon).
+     In the case of fixed Scale you can also use
+        cuts.SetThetaCut(MFMagicCuts::kOn);
+     no off-cut needed.
+     Be carefull in case of three off-regions when switching on
+     scale mode. Make sure that the scale interval is set correctly.
 
 
Index: /trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
===================================================================
--- /trunk/MagicSoft/Mars/mmain/MEventDisplay.cc	(revision 8631)
+++ /trunk/MagicSoft/Mars/mmain/MEventDisplay.cc	(revision 8632)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.61 2007-06-28 19:49:30 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.62 2007-07-03 14:18:03 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -120,5 +120,5 @@
 //  Constructor.
 //
-MEventDisplay::MEventDisplay(const char *fname, const char *path) : MStatusDisplay(), fEvtLoop(0)
+MEventDisplay::MEventDisplay(const char *fname, const char *path) : MStatusDisplay(756), fEvtLoop(0)
 {
     //
@@ -517,13 +517,30 @@
     fList->Add(laystd2);
     frame->AddFrame(top2, laystd2);
-
-    //
-    // Add trailing line...
-    //
-    TGHorizontal3DLine *line = new TGHorizontal3DLine(frame);
-    TGLayoutHints *layline = new TGLayoutHints(kLHintsExpandX);
-    fList->Add(line);
-    fList->Add(layline);
-    frame->AddFrame(line, layline);
+}
+
+void MEventDisplay::AddMiddleFrame(TGCompositeFrame *frame)
+{
+    //
+    // Create the gui elements
+    //
+    TGCheckButton *imgpar = new TGCheckButton(frame, "ImgPar", kShowImgPar);
+    imgpar->SetState(kButtonDown);
+    imgpar->Associate(this);
+    fList->Add(imgpar);
+
+    TGCheckButton *muon = new TGCheckButton(frame, "Muon", kShowMuon);
+    muon->Associate(this);
+    muon->SetState(kButtonDown);
+    fList->Add(muon);
+
+    //
+    // add the gui elements to the frame
+    //
+//    TGLayoutHints *laystd = new TGLayoutHints(kLHintsLeft|kLHintsCenterY, 5, 5);
+//    fList->Add(laystd);
+//    top2->AddFrame(prevevt,    laystd);
+
+    frame->AddFrame(imgpar);
+    frame->AddFrame(muon);
 }
 
@@ -538,7 +555,28 @@
     TGCompositeFrame *vf1 = new TGVerticalFrame(fUserFrame, 1, 1);
     TGCompositeFrame *vf2 = new TGVerticalFrame(fUserFrame, 1, 1);
-
-    AddTopFramePart1(vf1, filename, "Events");
-    AddTopFramePart2(vf1);
+    TGCompositeFrame *hor = new TGHorizontalFrame(vf1, 1, 1);
+    TGCompositeFrame *ver = new TGVerticalFrame(hor, 1, 1);
+    TGCompositeFrame *vfb = new TGVerticalFrame(hor, 1, 1);
+
+    TGHorizontal3DLine *line = new TGHorizontal3DLine(vf1);
+    TGLayoutHints *expx = new TGLayoutHints(kLHintsExpandX);
+    TGLayoutHints *right = new TGLayoutHints(kLHintsRight|kLHintsTop);
+    fList->Add(line);
+    fList->Add(expx);
+    fList->Add(right);
+
+    hor->AddFrame(ver);
+    hor->AddFrame(vfb, right);
+
+    AddMiddleFrame(vfb);
+
+    //
+    // Add trailing line...
+    //
+    vf1->AddFrame(hor,  expx);
+    vf1->AddFrame(line, expx);
+
+    AddTopFramePart1(ver, filename, "Events");
+    AddTopFramePart2(ver);
 
     // create root embedded canvas and add it to the tab
@@ -555,6 +593,5 @@
     //fCanvas->SetFillColor(16);
 
-    TGLayoutHints *lay = new TGLayoutHints(kLHintsExpandX);
-    fUserFrame->AddFrame(vf1, lay);
+    fUserFrame->AddFrame(vf1, expx);
     fUserFrame->AddFrame(vf2);
 }
@@ -635,4 +672,59 @@
 }
 
+void MEventDisplay::ShowHide()
+{
+    TGCheckButton *but1 = (TGCheckButton*)fList->FindWidget(kShowMuon);
+    TGCheckButton *but2 = (TGCheckButton*)fList->FindWidget(kShowImgPar);
+
+    const Bool_t imgpar = but1 && but1->IsDown();
+    const Bool_t muon   = but2 && but2->IsDown();
+
+    //
+    // Get parlist
+    //
+    MParList *plist = fEvtLoop->GetParList();
+    if (!plist)
+        return;
+
+    //
+    // Draw ellipse on top of all pads
+    //
+    const Int_t n = 5;
+
+    TObject *obj[n] = {
+        plist->FindObject("MHillas"),
+        plist->FindObject("MHillasSrc"),
+        plist->FindObject("MHillasExt"),
+        plist->FindObject("MSrcPosCam"),
+        plist->FindObject("MMuonSearchPar")
+    };
+
+    const Bool_t state[n] = {
+        imgpar,
+        imgpar,
+        imgpar,
+        imgpar,
+        muon,
+    };
+
+
+    for (int i=1; i<7; i++)
+    {
+        TCanvas *c = GetCanvas(i);
+        c->GetPad(1)->cd(1);
+
+        TList *list = gPad->GetListOfPrimitives();
+
+        for (int j=0;j<n; j++)
+            if (obj[j])
+                if (state[j] && !list->FindObject(obj[j]))
+                    list->Add(obj[j]);
+                else
+                    list->Remove(obj[j]);
+
+        gPad->Modified(kTRUE);
+    }
+}
+
 // --------------------------------------------------------------------------
 //
@@ -648,9 +740,4 @@
 
     //
-    // Get parlist
-    //
-    MParList *plist = (MParList*)fEvtLoop->GetParList();
-
-    //
     // Add Geometry tab
     //
@@ -668,20 +755,5 @@
     fNumOfEvts->SetText(txt);
 
-    //
-    // Draw ellipse on top of all pads
-    //
-    TObject *hillas1 = plist->FindObject("MHillas");
-    TObject *hillas2 = plist->FindObject("MHillasSrc");
-    TObject *hillas3 = plist->FindObject("MHillasExt");
-    TObject *hmuon   = plist->FindObject("MMuonSearchPar");
-    for (int i=1; i<7;i++)
-    {
-        TCanvas *c = GetCanvas(i);
-        c->GetPad(1)->cd(1);
-        hmuon->Draw();
-        hillas1->Draw();
-        hillas2->Draw();
-        hillas3->Draw();
-    }
+    ShowHide();
 }
 
@@ -777,4 +849,14 @@
             }
             return kTRUE;
+
+        case kCM_CHECKBUTTON:
+            switch (mp1)
+            {
+            case kShowMuon:
+            case kShowImgPar:
+                ShowHide();
+                return kTRUE;
+            }
+            return kTRUE;
         }
         break;
Index: /trunk/MagicSoft/Mars/mmain/MEventDisplay.h
===================================================================
--- /trunk/MagicSoft/Mars/mmain/MEventDisplay.h	(revision 8631)
+++ /trunk/MagicSoft/Mars/mmain/MEventDisplay.h	(revision 8632)
@@ -21,5 +21,7 @@
         kEvtPrev = MStatusDisplay::kSearch + 1,
         kEvtNext,
-        kEvtNumber
+        kEvtNumber,
+        kShowMuon,
+        kShowImgPar
     };
 
@@ -34,6 +36,8 @@
                           const char *filename, const char *treename);
     void AddTopFramePart2(TGCompositeFrame *frame);
+    void AddMiddleFrame(TGCompositeFrame *frame);
     void AddGeometryTabs();
     void AddUserFrame(const char *filename);
+    void ShowHide();
 
     void UpdateDisplay();
