Index: trunk/MagicSoft/Mars/Makefile
===================================================================
--- trunk/MagicSoft/Mars/Makefile	(revision 855)
+++ trunk/MagicSoft/Mars/Makefile	(revision 856)
@@ -42,4 +42,5 @@
           mmontecarlo \
           mhist       \
+          mfilter     \
           mbase       \
           mraw        \
@@ -103,4 +104,7 @@
 	@cd mhist; make mrproper; cd ..
 	@echo "cd .."
+	@echo "cd mfilter"
+	@cd mfilter; make mrproper; cd ..
+	@echo "cd .."
 	@echo "cd mgui"
 	@cd mgui; make mrproper; cd ..
Index: trunk/MagicSoft/Mars/Makefile.conf.linux-gnu
===================================================================
--- trunk/MagicSoft/Mars/Makefile.conf.linux-gnu	(revision 855)
+++ trunk/MagicSoft/Mars/Makefile.conf.linux-gnu	(revision 856)
@@ -20,6 +20,6 @@
 #
 
-OPTIM    = -O2 -Wall -fno-rtti -fno-exceptions -fPIC
-DEBUG    = -g 
+OPTIM    = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual
+DEBUG    = -g
 
 MARS_LIB  = -Llib $(SUBDIRS:%=-l%)
Index: trunk/MagicSoft/Mars/Makefile.conf.osf1
===================================================================
--- trunk/MagicSoft/Mars/Makefile.conf.osf1	(revision 855)
+++ trunk/MagicSoft/Mars/Makefile.conf.osf1	(revision 856)
@@ -24,5 +24,5 @@
 
 OPTIM = -O2 -ieee -arch host
-DEBUG = -g 
+DEBUG = -g  -w0 -msg_display_tag -msg_disable castqualtyp,undpreid,unrfunprm,extrasemi
 
 MARS_LIB  = -Llib $(SUBDIRS/*/-l&)
Index: trunk/MagicSoft/Mars/mfilter/FilterIncl.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/FilterIncl.h	(revision 856)
+++ trunk/MagicSoft/Mars/mfilter/FilterIncl.h	(revision 856)
@@ -0,0 +1,3 @@
+#ifndef __CINT__
+
+#endif // __CINT__
Index: trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h	(revision 856)
+++ trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h	(revision 856)
@@ -0,0 +1,9 @@
+#ifdef __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class MFTriggerLvl1;
+
+#endif
Index: trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.cc
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.cc	(revision 856)
+++ trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.cc	(revision 856)
@@ -0,0 +1,107 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
+!
+!   Copyright: MAGIC Software Development, 2000-2001
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+//   MFTriggerLvl1                                                         //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
+#include "MFTriggerLvl1.h"
+
+#include "MParList.h"
+#include "MLog.h"
+#include "MLogManip.h"
+
+#include "MMcTrig.hxx"
+
+ClassImp(MFTriggerLvl1);
+
+
+// --------------------------------------------------------------------------
+//
+MFTriggerLvl1::MFTriggerLvl1(const char *cname, const char type, const Int_t val) : fMcTrig(NULL)
+{
+    fContName = cname;
+}
+
+// --------------------------------------------------------------------------
+//
+MFTriggerLvl1::MFTriggerLvl1(const MMcTrig *mctrig, const char type, const Int_t val) : fMcTrig(mctrig)
+{
+}
+
+// --------------------------------------------------------------------------
+//
+void MFTriggerLvl1::Init(const char type, const Int_t val)
+{
+    fFilterType = (type=='<' ? kELowerThan : kEGreaterThan);
+
+    if (type!='<' && type!='>')
+        *fLog << dbginf << "Warning: Neither '<' nor '>' specified... using '>'." << endl;
+
+    fValue = val;
+}
+
+// --------------------------------------------------------------------------
+//
+Bool_t MFTriggerLvl1::IsExpressionTrue() const
+{
+    return fResult;
+}
+
+// --------------------------------------------------------------------------
+//
+Bool_t MFTriggerLvl1::PreProcess(MParList *pList)
+{
+    if (fMcTrig)
+        return kTRUE;
+
+    fMcTrig = (MMcTrig*)pList->FindObject(fContName);
+    if (fMcTrig)
+        return kTRUE;
+
+    *fLog << dbginf << fContName << " [MMcTrig] not found... aborting." << endl;
+        return kFALSE;
+}
+
+// --------------------------------------------------------------------------
+//
+Bool_t MFTriggerLvl1::Process()
+{
+    const Int_t lvl1 = fMcTrig->GetFirstLevel();
+
+    switch (fFilterType)
+    {
+    case kELowerThan:
+        fResult = (lvl1 < fValue);
+        break;
+    case kEGreaterThan:
+        fResult = (lvl1 > fValue);
+        break;
+    }
+
+    return kTRUE;
+}
+
Index: trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.h	(revision 856)
+++ trunk/MagicSoft/Mars/mfilter/MFTriggerLvl1.h	(revision 856)
@@ -0,0 +1,42 @@
+#ifndef MFTRIGGERLVL1_H
+#define MFTRIGGERLVL1_H
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// MFTriggerLvl1                                                           //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef MFILTER_H
+#include "MFilter.h"
+#endif
+
+class MMcTrig;
+class MParList;
+
+class MFTriggerLvl1 : public MFilter
+{
+private:
+    const MMcTrig *fMcTrig;
+    TString fContName;
+
+    typedef enum { kELowerThan, kEGreaterThan } FilterType_t;
+    FilterType_t fFilterType;
+
+    Bool_t fResult;
+    Int_t  fValue;
+
+    void Init(const char type, const Int_t val);
+
+public:
+    MFTriggerLvl1(const char *cname="MMcTrig", const char type='>', const Int_t val=0);
+    MFTriggerLvl1(const MMcTrig *mctrig,       const char type='>', const Int_t val=0);
+
+    Bool_t IsExpressionTrue() const;
+    Bool_t PreProcess(MParList *pList);
+    Bool_t Process();
+
+    ClassDef(MFTriggerLvl1, 0)		// 
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mfilter/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mfilter/Makefile	(revision 856)
+++ trunk/MagicSoft/Mars/mfilter/Makefile	(revision 856)
@@ -0,0 +1,50 @@
+##################################################################
+#
+#   makefile
+# 
+#   for the MARS software
+#
+##################################################################
+# @maintitle
+
+# @code
+
+#
+#  please change all system depend values in the 
+#  config.mk.${OSTYPE} file 
+#
+#
+include ../Makefile.conf.$(OSTYPE)
+include ../Makefile.conf.general
+
+# @endcode 
+
+INCLUDES = -I. -I../mbase -I../mmc
+
+# @code 
+
+CINT     = Filter
+LIB      = mfilter.a
+
+#------------------------------------------------------------------------------
+
+.SUFFIXES: .c .cc .cxx .h .hxx .o 
+
+SRCFILES = MFTriggerLvl1.cc 
+
+SRCS    = $(SRCFILES)
+HEADERS = $(SRCFILES:.cc=.h)
+OBJS    = $(SRCFILES:.cc=.o) 
+
+############################################################
+
+all: $(LIB)
+
+include ../Makefile.rules
+
+clean:	rmlib rmcint rmobjs rmcore
+
+mrproper:	clean rmbak
+
+# @endcode
+
