Public Member Functions | Friends | List of all members
FilterStrategy Class Reference

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 FilterOperationgetOperation (size_t i) const
 
size_t nOperations () const
 
void done ()
 

Friends

class FilteredAnitaEvent
 
class NoiseMonitor
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

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

Parameters
fThe FilterOperation to add to this strategy
enable_outputWhether or not to enable the Filter Output tree for this operation
take_ownershipwhether 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.

const FilterOperation* FilterStrategy::getOperation ( size_t  i) const
inline

Retrieve the ith filter operation

Definition at line 49 of file FilterStrategy.h.

size_t FilterStrategy::nOperations ( ) const
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.


The documentation for this class was generated from the following files: