Index: trunk/MagicSoft/Mars/mbase/MFilter.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MFilter.cc	(revision 4982)
+++ trunk/MagicSoft/Mars/mbase/MFilter.cc	(revision 4991)
@@ -18,5 +18,5 @@
 !   Author(s): Thomas Bretz, 07/2001 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2003
+!   Copyright: MAGIC Software Development, 2000-2004
 !
 !
@@ -24,55 +24,63 @@
 
 /////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-//   MFilter                                                               //
-//                                                                         //
-//   This is a base class which defines an interface to create your own    //
-//   filters. To do it derive a class from MFilter.                        //
-//                                                                         //
-//   You can invert the meaning of a filter (logical NOT '!') by calling   //
-//   SetInverted().                                                        //
-//                                                                         //
-//   You can create two types of Filters:                                  //
-//    - static Filters and                                                 //
-//    - dynamic Filters                                                    //
-//                                                                         //
-//   Static Filters:                                                       //
-//    A static filter is a filter which value doesn't change dynamically,  //
-//    which mean only once while running through your tasklist. To create  //
-//    a static filter override the Process-function of MFilter (this is    //
-//    the function in which the filer-value should be updated). If         //
-//    necessary you can also overwrite Pre-/PostProcess. The process       //
-//    function should calculate the return value of IsExpressionTrue.      //
-//    IsExpressionTrue should simply return this value. This kind of       //
-//    filter must be added to the tasklist at a point which is forseen to  //
-//    update the value of the filter (eg. after the reading task).         //
-//                                                                         //
-//   Dynamic Filters:                                                      //
-//    A dynamic filter is a filter which returns a value which must be     //
-//    calculated at the time the filter is called. To create such a        //
-//    filter you have to overwrite IsExpressionTrue only. If there is      //
-//    no need for a 'one-point' update this filter must not be added to    //
-//    the tasklist.                                                        //
-//                                                                         //
-//   Usage:                                                                //
-//    A Filter is connected to a task by calling MTask::SetFilter. The     //
-//    task is now executed when IsExpressionTrue returns a value           //
-//    (different from kFALSE) only.                                        //
-//                                                                         //
-//   Remarks:                                                              //
-//    - Make sure, that all tasks which depends on this filter are either  //
-//      collected in a MTaskList-object or are conected to the same        //
-//      filter.                                                            //
-//    - If you want to use different filters (combined logically) for one  //
-//      task please look for the MFilterList class.                        //
-//    - Be careful, the return value of IsExpressionTrue is NOT a real     //
-//      boolean. You can return other values, too.                         //
-//                                                                         //
+//
+//   MFilter
+//
+//   This is a base class which defines an interface to create your own
+//   filters. To do it derive a class from MFilter.
+//
+//   You can invert the meaning of a filter (logical NOT '!') by calling
+//   SetInverted().
+//
+//   You can create two types of Filters:
+//    - static Filters and
+//    - dynamic Filters
+//
+//   Static Filters:
+//    A static filter is a filter which value doesn't change dynamically,
+//    which mean only once while running through your tasklist. To create
+//    a static filter override the Process-function of MFilter (this is
+//    the function in which the filer-value should be updated). If
+//    necessary you can also overwrite Pre-/PostProcess. The process
+//    function should calculate the return value of IsExpressionTrue.
+//    IsExpressionTrue should simply return this value. This kind of
+//    filter must be added to the tasklist at a point which is forseen to
+//    update the value of the filter (eg. after the reading task).
+//
+//   Dynamic Filters:
+//    A dynamic filter is a filter which returns a value which must be
+//    calculated at the time the filter is called. To create such a
+//    filter you have to overwrite IsExpressionTrue only. If there is
+//    no need for a 'one-point' update this filter must not be added to
+//    the tasklist.
+//
+//   Usage:
+//    A Filter is connected to a task by calling MTask::SetFilter. The
+//    task is now executed when IsExpressionTrue returns a value
+//    (different from kFALSE) only.
+//
+//   Remarks:
+//    - Make sure, that all tasks which depends on this filter are either
+//      collected in a MTaskList-object or are conected to the same
+//      filter.
+//    - If you want to use different filters (combined logically) for one
+//      task please look for the MFilterList class.
+//    - Be careful, the return value of IsExpressionTrue is NOT a real
+//      boolean. You can return other values, too.
+//
 /////////////////////////////////////////////////////////////////////////////
+#include "MFilter.h"
 
-#include "MFilter.h"
+#include "MLog.h"
+#include "MLogManip.h"
 
 ClassImp(MFilter);
 
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+//  Default constructor for a filter. Initializes fInverted with kFALSE
+//
 MFilter::MFilter(const char *name, const char *title) : fInverted(kFALSE)
 {
@@ -81,6 +89,22 @@
 }
 
+// --------------------------------------------------------------------------
+//
+//  return the Rule corresponding to this filter (see MF and MDataChain)
+//
 TString MFilter::GetRule() const
 {
     return "<GetRule n/a for " + fName + ">";
 }
+
+// --------------------------------------------------------------------------
+//
+//  This is used to print the output in the PostProcess/Finalize.
+//  Or everywhere else in a nice fashioned and unified way.
+//
+void MFilter::PrintSkipped(UInt_t n, const char *str)
+{
+    *fLog << " " << setw(7) << n << " (";
+    *fLog << setw(3) << TMath::Nint(100.*n/GetNumExecutions());
+    *fLog << "%) Evts fullfilled: " << str << endl;
+}
Index: trunk/MagicSoft/Mars/mbase/MFilter.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MFilter.h	(revision 4982)
+++ trunk/MagicSoft/Mars/mbase/MFilter.h	(revision 4991)
@@ -25,4 +25,6 @@
     Bool_t IsInverted() const  { return fInverted; }
 
+    void PrintSkipped(UInt_t n, const char *str);
+
     ClassDef(MFilter, 1)		// Abstract base class for the filters
 };
Index: trunk/MagicSoft/Mars/mbase/MTask.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 4982)
+++ trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 4991)
@@ -483,2 +483,14 @@
     MParContainer::SetDisplay(d);
 }
+
+// --------------------------------------------------------------------------
+//
+//  This is used to print the output in the PostProcess/Finalize.
+//  Or everywhere else in a nice fashioned and unified way.
+//
+void MTask::PrintSkipped(UInt_t n, const char *str)
+{
+    *fLog << " " << setw(7) << n << " (";
+    *fLog << setw(3) << TMath::Nint(100.*n/GetNumExecutions());
+    *fLog << "%) Evts skipped: " << str << endl;
+}
Index: trunk/MagicSoft/Mars/mbase/MTask.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.h	(revision 4982)
+++ trunk/MagicSoft/Mars/mbase/MTask.h	(revision 4991)
@@ -95,4 +95,5 @@
     Double_t GetRealTime() const;
     virtual void PrintStatistics(const Int_t lvl=0, Bool_t title=kFALSE, Double_t time=0) const;
+    virtual void PrintSkipped(UInt_t n, const char *str);
 
     // Task overwrite functions
