A filter strategy defines the sets of filters that are used and provides some introspection abilities. At its most basic level, the strategy will serially apply a set of filters. More...
#include <FilterStrategy.h>
Public Member Functions | |
FilterStrategy (TFile *outfile=0) | |
void | attachFile (TFile *outfile) |
~FilterStrategy () | |
void | addOperation (FilterOperation *f, bool enable_output=false, bool take_ownership=false) |
void | process (FilteredAnitaEvent *event) |
const FilterOperation * | getOperation (size_t i) const |
size_t | nOperations () const |
void | done () |
Friends | |
class | FilteredAnitaEvent |
class | NoiseMonitor |
A filter strategy defines the sets of filters that are used and provides some introspection abilities. At its most basic level, the strategy will serially apply a set of filters.
Definition at line 22 of file FilterStrategy.h.
FilterStrategy::FilterStrategy | ( | TFile * | outfile = 0 | ) |
Create a new empty strategy. If a pointer to a TFile is given, then trees may be written to that file if the operations define any output values
Definition at line 8 of file FilterStrategy.cc.
FilterStrategy::~FilterStrategy | ( | ) |
Destructor. Will write to output file if necessary (and deleted any owned operations)
Definition at line 18 of file FilterStrategy.cc.
void FilterStrategy::addOperation | ( | FilterOperation * | f, |
bool | enable_output = false , |
||
bool | take_ownership = false |
||
) |
Adds an operation to the strategy. This may only be done before any events are processed
f | The FilterOperation to add to this strategy |
enable_output | Whether or not to enable the Filter Output tree for this operation |
take_ownership | whether or not to delete this operation on destruction of the strategy |
Definition at line 140 of file FilterStrategy.cc.
void FilterStrategy::attachFile | ( | TFile * | outfile | ) |
Allow attachment of outfile after construct if haven't called this->process() yet
Definition at line 33 of file FilterStrategy.cc.
void FilterStrategy::done | ( | ) |
Output a string describing the strategy. User responsible for freeing. finish
Definition at line 86 of file FilterStrategy.cc.
|
inline |
Retrieve the ith filter operation
Definition at line 49 of file FilterStrategy.h.
|
inline |
Count the number of operations
Definition at line 52 of file FilterStrategy.h.
void FilterStrategy::process | ( | FilteredAnitaEvent * | event | ) |
Process an event using this strategy
Definition at line 107 of file FilterStrategy.cc.