source: trunk/MagicSoft/Mars/mbase/MFilter.cc@ 956

Last change on this file since 956 was 858, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 4.8 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Thomas Bretz 07/2001 (tbretz@uni-sw.gwdg.de)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26// //
27// MFilter //
28// //
29// This is a base class which defines an interface to create your own //
30// filters. To do it derive a class from MFilter. //
31// //
32// You can create two types of Filters: //
33// - static Filters and //
34// - dynamic Filters //
35// //
36// Static Filters: //
37// A static filter is a filter which value doesn't change dynamically, //
38// which mean only once while running through your tasklist. To create //
39// a static filter override the Process-function of MFilter (this is //
40// the function in which the filer-value should be updated). If //
41// necessary you can also overwrite Pre-/PostProcess. The process //
42// function should calculate the return value of IsExpressionTrue. //
43// IsExpressionTrue should simply return this value. This kind of //
44// filter must be added to the tasklist at a point which is forseen to //
45// update the value of the filter (eg. after the reading task). //
46// //
47// Dynamic Filters: //
48// A dynamic filter is a filter which returns a value which must be //
49// calculated at the time the filter is called. To create such a //
50// filter you have to overwrite IsExpressionTrue only. If there is //
51// no need for a 'one-point' update this filter must not be added to //
52// the tasklist. //
53// //
54// Usage: //
55// A Filter is connected to a task by calling MTask::SetFilter. The //
56// task is now executed when IsExpressionTrue returns a value //
57// (different from kFALSE) only. //
58// //
59// Remarks: //
60// - Make sure, that all tasks which depends on this filter are either //
61// collected in a MTaskList-object or are conected to the same //
62// filter. //
63// - If you want to use different filters for one task please look for //
64// the MFilterList class. //
65// - Be careful, the return value of IsExpressionTrue is NOT a real //
66// boolean. You can return other values, too. //
67// //
68/////////////////////////////////////////////////////////////////////////////
69
70#include "MFilter.h"
71
72ClassImp(MFilter);
73
74// --------------------------------------------------------------------------
75//
76Bool_t MFilter::IsExpressionTrue() const
77{
78 return kTRUE;
79}
80
81// --------------------------------------------------------------------------
82//
83Bool_t MFilter::PreProcess(MParList *pList)
84{
85 return kTRUE;
86}
87
88// --------------------------------------------------------------------------
89//
90Bool_t MFilter::Process()
91{
92 return kTRUE;
93}
94
95// --------------------------------------------------------------------------
96//
97Bool_t MFilter::PostProcess()
98{
99 return kTRUE;
100}
Note: See TracBrowser for help on using the repository browser.