In file Filter.hh:

namespace events class Filter : public Condition

Defines an event filter

Inheritance:


Public Classes

enum matchtype
matching criterium
kExact
Exact
kAll
All
kWildcard
Wildcard

Public Methods

explicit Filter ()
Constructs an empty event filter
explicit Filter (const char* pattern)
Constructors an event filter
explicit Filter (const char* pattern, int index)
Constructors an event filter
explicit Filter (const std::string& pattern, int index)
Constructors an event filter
virtual Filter* Copy () const
Copy the event
bool IsValid () const
Is valid?
bool operator== (const Filter& filter) const
Equality operator
bool operator!= (const Filter& filter) const
Inequality operator
virtual bool Evaluate (const Argument& arg, bool& val) const
Evaluate
void SetIndex (int index = -1)
Set event index
int GetIndex () const
Get event index
const char* GetPattern () const
Get event pattern
bool SetPattern (const char* pattern)
Set event pattern
bool SetPattern (const std::string& pattern)
Set event pattern

Protected Methods

bool Match (const Event* event) const
Match event against pattern

Inherited from Condition:

Public Methods

bool operator) (const Argument& arg, bool& val) const
bool operator) (const Event& event, bool& val) const
static const Condition& True()
static const Condition& False()

Protected Methods

Condition& operator= (const Condition&)

Documentation

An event filter uses the type information to select events. It supports wildcards and an event index.

Example:

    Filter ("burst::*")
    
selects all burst events. If a filter is specified without an index it gets applied to all event indices. Wildcards in form of "*" (asterix) and "?" (question mark) can be used.

An event index can be explicitly specified as part of the string or as a separate argument. Examples:

    Filter ("burst::*[0]") && Filter ("trigger::*", 1)
    
selects burst events from the first event stream and DMT triggers from the second one.

As with the column class a filter set can also be specified for events stored as event columns. The same notation applies. For example:

    Filter ("Event(1).burst::*")
    Filter ("burst::*(1)")
    
selects events which contain a burst event at column "Event(1)".

enum matchtype
matching criterium

kExact
Exact

kAll
All

kWildcard
Wildcard

explicit Filter()
Creates an event filter which rejects everything.

explicit Filter(const char* pattern)
Creates a new event filter based on the specified filter string.
Parameters:
pattern - Filter pattern

explicit Filter(const char* pattern, int index)
Creates a new event filter based on the specified filter string.
Parameters:
pattern - Filter pattern

explicit Filter(const std::string& pattern, int index)
Creates a new event filter based on the specified filter string.
Parameters:
pattern - Filter pattern

virtual Filter* Copy() const
Returns a copy of the event condition. This method must be overriden by all descendents.
Returns:
event copy

bool IsValid() const
Checks if this is a valid filter.
Returns:
true if valid

bool operator== (const Filter& filter) const
Equality operator (case insensitive)

bool operator!= (const Filter& filter) const
Inequality operator

virtual bool Evaluate(const Argument& arg, bool& val) const
Evaluate the condition. This function must be overriden by descendents.
Returns:
True if condition could be evaluated
Parameters:
arg - Event argument list
val - Condition value (return)

void SetIndex(int index = -1)
Set the event index.
Parameters:
index - Event index

int GetIndex() const
Returns the event index.
Returns:
Event index

const char* GetPattern() const
Returns the filter pattern.
Returns:
Event filter name

bool SetPattern(const char* pattern)
Sets the filter pattern.
Returns:
true if valid name is supplied
Parameters:
pattern - Filter pattern

bool SetPattern(const std::string& pattern)
Sets the filter pattern.
Returns:
true if valid name is supplied
Parameters:
pattern - Filter pattern

bool Match(const Event* event) const
Match an event against the filter pattern.
Returns:
true if filter matches event
Parameters:
event - Event to match


This class has no child classes.
Author:
Written June 2001 by Masahiro Ito and Daniel Sigg
Version:
1.0

alphabetic index hierarchy of classes


Please send questions and comments to sigg_d@ligo-wa.caltech.edu


generated by doc++