Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 1935)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 1936)
@@ -9,4 +9,17 @@
    * mbase/MTaskList.[h,cc]:
      - added RemoveFromList-function
+
+   * merpp.cc:
+     - fixed typo
+     
+   * mbase/MFilter.[h,cc]:
+     - removed unnecessary base functions for Pre//PostProcess
+   
+   * mbase/MTask.cc, mfileio/MCT1ReadPreProc.cc, mfileio/MReadTree.cc,
+     mfilter/MF.cc, mfilter/MFilterList.cc
+     - implemented IsConditionalTrue to support inverted filters
+
+   * mhist/MHHadronness.cc:
+     - removed unnecessary check
 
 
Index: /trunk/MagicSoft/Mars/mbase/MFilter.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MFilter.cc	(revision 1935)
+++ /trunk/MagicSoft/Mars/mbase/MFilter.cc	(revision 1936)
@@ -72,29 +72,8 @@
 ClassImp(MFilter);
 
-MFilter::MFilter(const char *name, const char *title)
+MFilter::MFilter(const char *name, const char *title) : fInverted(kFALSE)
 {
     fName  = name  ? name  : "MFilter";
     fTitle = title ? title : "Base Class for a filter";
-}
-
-// --------------------------------------------------------------------------
-//
-Bool_t MFilter::PreProcess(MParList *pList)
-{
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-Bool_t MFilter::Process()
-{
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-Bool_t MFilter::PostProcess()
-{
-    return kTRUE;
 }
 
Index: /trunk/MagicSoft/Mars/mbase/MFilter.h
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MFilter.h	(revision 1935)
+++ /trunk/MagicSoft/Mars/mbase/MFilter.h	(revision 1936)
@@ -11,13 +11,17 @@
 {
 private:
-    virtual Bool_t PreProcess(MParList *pList);
-    virtual Bool_t Process();
-    virtual Bool_t PostProcess();
+    Bool_t fInverted;
+
+    virtual Bool_t IsExpressionTrue() const = 0;
 
 public:
     MFilter(const char *name=NULL, const char *title=NULL);
 
-    virtual Bool_t IsExpressionTrue() const = 0;
     virtual TString GetRule() const;
+
+    Bool_t IsConditionTrue() const { return fInverted ? !IsExpressionTrue() : IsExpressionTrue(); }
+
+    void SetInverted(Bool_t i) { fInverted=i; }
+    Bool_t IsInverted() const  { return fInverted; }
 
     ClassDef(MFilter, 0)		// Abstract base class for the filters
Index: /trunk/MagicSoft/Mars/mbase/MTask.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 1935)
+++ /trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 1936)
@@ -198,5 +198,5 @@
     // this task.
     //
-    const Bool_t exec = fFilter ? fFilter->IsExpressionTrue() : kTRUE;
+    const Bool_t exec = fFilter ? fFilter->IsConditionTrue() : kTRUE;
 
     if (!exec)
Index: /trunk/MagicSoft/Mars/merpp.cc
===================================================================
--- /trunk/MagicSoft/Mars/merpp.cc	(revision 1935)
+++ /trunk/MagicSoft/Mars/merpp.cc	(revision 1936)
@@ -131,5 +131,5 @@
 
     //
-    // create the looping object and thell it about the parameters to use
+    // create the looping object and tell it about the parameters to use
     // and the tasks to execute
     //
Index: /trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1935)
+++ /trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1936)
@@ -1068,5 +1068,5 @@
         // Skip Event
         //
-        if (!GetSelector()->IsExpressionTrue())
+        if (!GetSelector()->IsConditionTrue())
         {
             fIn->seekg(sizeof(struct eventrecord), ios::cur);
Index: /trunk/MagicSoft/Mars/mfileio/MReadTree.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 1935)
+++ /trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 1936)
@@ -732,5 +732,5 @@
         // Skip Event
         //
-        if (!GetSelector()->IsExpressionTrue())
+        if (!GetSelector()->IsConditionTrue())
         {
             fNumEntry++;
Index: /trunk/MagicSoft/Mars/mfilter/MF.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MF.cc	(revision 1935)
+++ /trunk/MagicSoft/Mars/mfilter/MF.cc	(revision 1936)
@@ -449,5 +449,5 @@
 Bool_t MF::IsExpressionTrue() const
 {
-    return fF->IsExpressionTrue();
+    return fF->IsConditionTrue();
 }
 
Index: /trunk/MagicSoft/Mars/mfilter/MFilterList.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFilterList.cc	(revision 1935)
+++ /trunk/MagicSoft/Mars/mfilter/MFilterList.cc	(revision 1936)
@@ -105,5 +105,5 @@
         return kTRUE;
 
-    Bool_t rc = filter->IsExpressionTrue();
+    Bool_t rc = filter->IsConditionTrue();
 
     //
@@ -114,25 +114,25 @@
     case kEAnd:
         while ((filter=(MFilter*)Next()))
-            rc &= filter->IsExpressionTrue();
+            rc &= filter->IsConditionTrue();
         break;
 
     case kEOr:
         while ((filter=(MFilter*)Next()))
-            rc |= filter->IsExpressionTrue();
+            rc |= filter->IsConditionTrue();
         break;
 
     case kEXor:
         while ((filter=(MFilter*)Next()))
-            rc ^= filter->IsExpressionTrue();
+            rc ^= filter->IsConditionTrue();
         break;
 
     case kELAnd:
         while ((filter=(MFilter*)Next()))
-            rc = (rc && filter->IsExpressionTrue());
+            rc = (rc && filter->IsConditionTrue());
         break;
 
     case kELOr:
         while ((filter=(MFilter*)Next()))
-            rc = (rc || filter->IsExpressionTrue());
+            rc = (rc || filter->IsConditionTrue());
         break;
     }
Index: /trunk/MagicSoft/Mars/mhist/MHHadronness.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 1935)
+++ /trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 1936)
@@ -270,6 +270,6 @@
     for (Int_t i=1; i<=n; i++)
     {
-        const Stat_t ip = sump!=0 ? fPhness->Integral(1, i) : 0;
-        const Stat_t ig = sumg!=0 ? fGhness->Integral(1, i) : 0;
+        const Stat_t ip = fPhness->Integral(1, i);
+        const Stat_t ig = fGhness->Integral(1, i);
 
         fIntPhness->SetBinContent(i, ip);
