Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7434)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7435)
@@ -18,4 +18,15 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2005/11/29 Thomas Bretz
+
+   * mmain/MEventDisplay.cc:
+     - added a MContinue to be setup by mars.rc to the tasklist to
+       allow to choose events
+
+   * mars.rc:
+     - added an example how to use the new cut
+
+
+
  2005/11/28 Thomas Bretz
 
@@ -90,10 +101,9 @@
 
    * msignal/MExtractTimeAndChargeDigitalFilter.cc
-     - fix a bug in the calculation of the high-gain times:
-       They were all shifted by the same amount "fHiGainFirst". This
-       caused an offset of usually 3 FADC slices in the times calculated
-       from high-gain and from low-gain. The bug did not have any effect
-       on the calibration runs because there, fHiGainFirst was set to 0.
-       The bug was there since 30.1.2005.
+     fixed a bug in the calculation of the high-gain times:
+     They were all shifted by the same amount "fHiGainFirst". This
+     caused an offset in the order of the position of the left border of
+     the extraction window in the times calculated from high-gain and 
+     from low-gain. The bug was there since 30.1.2005.
 
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 7434)
+++ trunk/MagicSoft/Mars/NEWS	(revision 7435)
@@ -49,4 +49,10 @@
         trainenergy.C, traindisp.C, trainseparation.C
 
+   - mars: now allows to setup a cut in the resource file mars.rc to choose
+     the events to be displayed, eg:
+       Cut.Condition: {0} && {1}
+       Cut.0: MHillas.fSize>100
+       Cut.1: MHillas.fSize<900
+
    - merpp: Made aware of the new .rep format 200510250. This includes
      interpretation of the Receiver Board Temperatures (MCameraRecTemp),
@@ -55,10 +61,10 @@
      written to the CC tree.
 
-   - callisto: fixed a bug in the calculation of the high-gain times:
-     They were all shifted by the same amount "fHiGainFirst". This
-     caused an offset of usually 3 FADC slices in the times calculated
-     from high-gain and from low-gain. The bug did not have any effect
-     on the calibration runs because there, fHiGainFirst was set to 0.
-     The bug was there since 30.1.2005.
+   - callisto: fixed a bug in the calculation of the arrival times in
+     the Digital Filter. They were all shifted by the same amount
+     fHiGainFirst. This caused an offset in the order of the position of
+     the left border of the extraction window in the times calculated
+     from high-gain and from low-gain. The bug effected only the absolute
+     arrival times. The bug was there since 30.1.2005.
 
    - ganymed: ganymed.rc, ganymed_onoff.rc:
Index: trunk/MagicSoft/Mars/mars.rc
===================================================================
--- trunk/MagicSoft/Mars/mars.rc	(revision 7434)
+++ trunk/MagicSoft/Mars/mars.rc	(revision 7435)
@@ -90,2 +90,13 @@
 MImgCleanStd.CleanLevel1: 4.5
 MImgCleanStd.CleanLevel2: 3.0
+
+# -------------------------------------------------------------------------
+# Setup a cut to choose the events which should be displayed
+#    (Use this cuts to display only good Muon candidates)
+# -------------------------------------------------------------------------
+#Cut.Inverted: Yes
+#Cut.Condition: {0} && {1} && {2}
+#Cut.0: MHillas.fSize>150
+#Cut.1: (MMuonSearchPar.fRadius>180) && (MMuonSearchPar.fRadius<400) && (MMuonSearchPar.fDeviation<45)
+#Cut.2: (MMuonCalibPar.fArcPhi>190)  && (MMuonSearchPar.fDeviation<35) && (MMuonCalibPar.fArcWidth<0.20) && (MMuonCalibPar.fArcWidth>0.04)
+
Index: trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MEventDisplay.cc	(revision 7434)
+++ trunk/MagicSoft/Mars/mmain/MEventDisplay.cc	(revision 7435)
@@ -85,4 +85,5 @@
 #include "MMuonSearchParCalc.h"   // MMuonSearchParCalc
 #include "MMuonCalibParCalc.h"    // MMuonCalibParCalc
+#include "MContinue.h"            // MContinue
 //#include "MMcTriggerLvl2Calc.h"   // MMcTriggerLvl2Calc
 
@@ -347,5 +348,7 @@
     }
     tlist->AddToList(hcalc);
+
     // --------------------------------------------------
+    // Muon Analysis
     MMuonSearchParCalc *muscalc = new MMuonSearchParCalc;
     MMuonCalibParCalc  *mcalc   = new MMuonCalibParCalc;
@@ -355,5 +358,10 @@
     tlist->AddToList(fillmuon);
     tlist->AddToList(mcalc);
+
     // --------------------------------------------------
+    // Cut to steer the display
+    MContinue *cont0=new MContinue("", "Cut");
+    cont0->SetAllowEmpty();
+    tlist->AddToList(cont0);
 
     //
@@ -526,4 +534,5 @@
     const Int_t num = reader->GetNumEntry();
 
+    Int_t rc;
     do
     {
@@ -539,5 +548,5 @@
         }
 
-        const Int_t rc = tlist->Process();
+        rc = tlist->Process();
         if (rc==kFALSE || rc==kERROR)
             return;
@@ -545,5 +554,9 @@
         reader->DecEventNum();
 
-    } while (raw && raw->GetNumPixels()<1 && dir!=0);
+        // Define other continue conditions
+        if (raw && raw->GetNumPixels()<1)
+            rc = kCONTINUE;
+
+    } while (rc==kCONTINUE && dir!=0);
 
     //
