Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2584)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2585)
@@ -73,4 +73,14 @@
    * mfilter/MFilterList.cc:
      - added class description
+
+   * mfilter/FilterLinkDef.h, mfilter/Makefile:
+     - removed obsolete MFAntiFilter (for a replacement see
+       class-description of MFilterList)
+       
+   * mfilter/MFRandomSplit.[h,cc]:
+     - fixed missing manipulators in fLog stream
+     - reset values in constructor which are out of range
+     - changed output in PostProcess according to the style in MHillasCalc etc.
+     - changed nonsense derivement from MF to MFilter
 
 
Index: /trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h	(revision 2584)
+++ /trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h	(revision 2585)
@@ -25,5 +25,4 @@
 #pragma link C++ class MFEnergySlope+;
 #pragma link C++ class MFRandomSplit+;
-#pragma link C++ class MFAntiFilter+;
 
 #endif
Index: /trunk/MagicSoft/Mars/mfilter/MFRandomSplit.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFRandomSplit.cc	(revision 2584)
+++ /trunk/MagicSoft/Mars/mfilter/MFRandomSplit.cc	(revision 2585)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Wolfgang Wittek  11/2003 <mailto:wittek@mppmu.mpg.de>
+!   Author(s): Wolfgang Wittek, 11/2003 <mailto:wittek@mppmu.mpg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2003
@@ -24,10 +24,9 @@
 
 /////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-//   MFRandomSplit                                                         //
-//                                                                         //
-//  A filter which gives fResult = kTRUE with the probability fProb        //
-//                                                                         //
-//                                                                         //
+//
+//  MFRandomSplit
+//
+//  A filter which gives fResult = kTRUE with the probability fProb
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MFRandomSplit.h"
@@ -50,42 +49,45 @@
 //
 MFRandomSplit::MFRandomSplit(Double_t f, const char *name, const char *title)
+    : fProb(f)
 {
-  fName  = name  ? name  : "MFRandomSplit";
-  fTitle = title ? title : "Filter for random splitting";
+    fName  = name  ? name  : "MFRandomSplit";
+    fTitle = title ? title : "Filter for random splitting";
 
-  fProb = f;
-  if (fProb <= 0.0)
-    *fLog << "MFRandomSplit : fProb is less than 0" << endl;
+    if (fProb < 0)
+    {
+        *fLog << warn << "WARNING - MFRandomSplit::MFRandomSplit: Probability less than 0... set to 0." << endl;
+        fProb = 0;
+    }
 
-  if (fProb > 1.0)
-    *fLog << "MFRandomSplit : fProb is greater than 1" << endl;
+    if (fProb > 1)
+    {
+        *fLog << warn << "WARNING - MFRandomSplit::MFRandomSplit: Probability greater than 1... set to 1." << endl;
+        fProb = 1;
+    }
 }
 
 // --------------------------------------------------------------------------
 //
-//   Preprocess
-//  
+//  PreProcess. Set fNumSelectedEvts=0
 //
 Int_t MFRandomSplit::PreProcess(MParList *pList)
 {
-  fNumSelectedEvts = 0;
-
-  return kTRUE;
+    fNumSelectedEvts = 0;
+    return kTRUE;
 }
 
 // --------------------------------------------------------------------------
 //  
-//  Select events randomly according to the probability fProb
+//  Select events randomly according to the probability fProb. Count all
+//  selected events
 //
 Int_t MFRandomSplit::Process()
 {
-  fResult = gRandom->Uniform() < fProb;
+    fResult = gRandom->Uniform() < fProb;
 
-  if (!fResult)
-      return kTRUE;
+    if (fResult)
+        fNumSelectedEvts++;
 
-  fNumSelectedEvts++;
-
-  return kTRUE;
+    return kTRUE;
 }
 
@@ -93,25 +95,19 @@
 // --------------------------------------------------------------------------
 //  
-//  PostProcess
+//  PostProcess. Prints execution statistics
 //
 Int_t MFRandomSplit::PostProcess()
 {
-  *fLog << "MFRandomSplit::PostProcess; " << fNumSelectedEvts 
-        << " were selected out of "       << GetNumExecutions() << endl;
+    if (GetNumExecutions()==0)
+        return kTRUE;
 
-  return kTRUE;
+    *fLog << inf << endl;
+    *fLog << GetDescriptor() << " execution statistics:" << endl;
+    *fLog << dec << setfill(' ');
+    *fLog << " " << setw(7) << fNumSelectedEvts << " (";
+    *fLog << setw(3) << (int)(100.*fNumSelectedEvts/GetNumExecutions());
+    *fLog << "%) selected - out of " << GetNumExecutions() << endl;
+    *fLog << endl;
+
+    return kTRUE;
 }
-
-//============================================================================
-
-
-
-
-
-
-
-
-
-
-
-
Index: /trunk/MagicSoft/Mars/mfilter/MFRandomSplit.h
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFRandomSplit.h	(revision 2584)
+++ /trunk/MagicSoft/Mars/mfilter/MFRandomSplit.h	(revision 2585)
@@ -7,8 +7,4 @@
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef MARS_MF
-#include "MF.h"
-#endif
-
 #ifndef MARS_MFilter
 #include "MFilter.h"
@@ -17,12 +13,11 @@
 class MParList;
 
-class MFRandomSplit : public MF
+class MFRandomSplit : public MFilter
 {
 private:
+    Int_t    fNumSelectedEvts;
+    Double_t fProb;    // probability with which the result should be kTRUE
 
-    Int_t    fNumSelectedEvts;
-    Double_t fProb;   // probability with which the result should be kTRUE
-
-    Bool_t fResult;  // Result returned by IsExpressionTrue
+    Bool_t   fResult;  // Result returned by IsExpressionTrue
 
     Int_t PreProcess(MParList *pList);
Index: /trunk/MagicSoft/Mars/mfilter/Makefile
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/Makefile	(revision 2584)
+++ /trunk/MagicSoft/Mars/mfilter/Makefile	(revision 2585)
@@ -49,6 +49,5 @@
 	   MFCT1SelFinal.cc \
 	   MFEnergySlope.cc \
-	   MFRandomSplit.cc \
-	   MFAntiFilter.cc
+	   MFRandomSplit.cc
 
 SRCS    = $(SRCFILES)
