| 1 |
kusanagi |
2.1 |
/** @file |
| 2 |
|
|
* $Source: /home/cvsmanager/yoda/event/Filter.h,v $ |
| 3 |
kusanagi |
5.0 |
* $Id: Filter.h,v 4.4 2005/05/28 10:44:09 kusanagi Exp $ |
| 4 |
kusanagi |
2.1 |
* $Author: kusanagi $ |
| 5 |
|
|
* |
| 6 |
|
|
* Header file for the Filter class. |
| 7 |
|
|
*/ |
| 8 |
|
|
#ifndef FILTER_H |
| 9 |
|
|
#define FILTER_H |
| 10 |
|
|
|
| 11 |
|
|
#include <string> |
| 12 |
|
|
#include "event/PacketType.h" |
| 13 |
|
|
#include <TObject.h> |
| 14 |
|
|
using namespace std; |
| 15 |
|
|
using namespace pamela; |
| 16 |
|
|
|
| 17 |
|
|
namespace pamela { |
| 18 |
|
|
class PacketType; |
| 19 |
|
|
/** |
| 20 |
|
|
* Abstract base class for filtering algorithms. You need to deviate |
| 21 |
|
|
* from this class and overwrite the functions Init(), check() and |
| 22 |
|
|
* Finish(), if necessary. For logging purposes, you also need to write |
| 23 |
|
|
* the functions GetName() and GetVersionInfo(). |
| 24 |
|
|
*/ |
| 25 |
|
|
class Filter: public TObject { |
| 26 |
|
|
|
| 27 |
|
|
public: |
| 28 |
|
|
Filter(); |
| 29 |
|
|
/** |
| 30 |
|
|
* Initialize the filter. Default: Do nothing. |
| 31 |
|
|
*/ |
| 32 |
|
|
virtual void Init(void) {} |
| 33 |
|
|
|
| 34 |
|
|
/** |
| 35 |
|
|
* Define the filter property. Default: Do nothing. |
| 36 |
|
|
*/ |
| 37 |
|
|
virtual bool CheckPacket(pamela::PacketType *) = 0; |
| 38 |
|
|
/** |
| 39 |
|
|
* Get a string with the version info of the filter. |
| 40 |
|
|
* Must be overwritten. |
| 41 |
|
|
*/ |
| 42 |
|
|
virtual std::string GetVersionInfo(void) const = 0; |
| 43 |
|
|
ClassDef(Filter, 1) |
| 44 |
|
|
}; |
| 45 |
|
|
|
| 46 |
|
|
} |
| 47 |
|
|
|
| 48 |
|
|
#endif /* FILTER_H */ |