In file WindowIterator.hh:

class WindowIterator : public std iterator <std forward_iterator_tag, Window, int, Window*, Window >, public BasicWindowIterator

Defines an event window iterator

Inheritance:


Public Fields

typedef Iterator iterator
Iterator to be used

Public Methods

WindowIterator ()
Default constructor
WindowIterator (const iterator& beg, const iterator& end, int order = 1, const TimeWindow& window = 1.0)
Constructor
bool operator== (const WindowIterator& i) const
Equality operator
bool operator!= (const WindowIterator& i) const
Inequality operator
WindowIterator& operator++ ()
Increment operator (prefix)
WindowIterator operator++ (int)
Increment operator (postfix)
reference operator* ()
Dereference operator
pointer operator-> ()
Pointer operator

Inherited from BasicWindowIterator:

Protected Methods

void InitWindow()
void Increment()
int GetPermutations() const
void SetPermutation()
Window& GetWindow()
const Window& GetWindow() const

Documentation

An event window iterator is used to move am event window through an event set. This is a forward iterator. The postfix increment operator is rather inefficient and should be avoided! An event window iterator is initialized with a begin and end iterator as well as the coincidence order and the window with and offset.

A window iterator returns a window if dereferenced. The window contains the current event(s) and the list of all events falling within the time window around the Current(0) event. The number of current events is equal to the coincidence order.

The window iterator returns a Window if dereferenced. A typical usage would be as follows:

    Set set ("input.xml");
    ConditionPtr cond = IfoSet ("H1[0]") && IfoSet ("L1[1]");
    WindowIterator i (set.Begin(), set.End(), 2);
    WindowIterator end (set.End(), set.End(), 2);
    for (; i != end; ++i) {
       bool ret;
       if (cond->Evaluate (*i, ret) && ret) {
          // found a coincidence event between H1 and L1
       }
    }
    

If the event order is larger than 1, the time order of the coincidence events is not guaranteed. Meaning, the averaged time of a coincidence returned by the window iterator later may actually be earlier than a previously returned coincidence. However, it is always guaranteed that the Current(0) is either the same event or a later event for the next window iterator. It is also guaranteed that the returned event is not younger or older than the time interval covered by the window. Algorithms which perform a coincidence analysis should temporarily store a resulting coincidence events (preferrablay in a priortity queue) until the window iterator has moved beyond the event time. (See the Coincidence algorithm as an example.)

The Current(0) event is part of the event list of the window, if the time window includes zero. For a higher order analysis current events Current(n) with n > 1 are always part of the list.

When using a window iterator the caller MUST NOT change the list of events and the list of current events which are managed by the Window object returned by the iterator. However, the caller may modify the events which are referenced by these lists.

typedef Iterator iterator
Iterator to be used

WindowIterator()
Creates an NULL window iterator. Equivalent to an end iterator

WindowIterator(const iterator& beg, const iterator& end, int order = 1, const TimeWindow& window = 1.0)
Creates an window iterator form a an iterator range.
Parameters:
beg - Beginning of event range
end - End of event range
order - Coincidence order
window - Anlysis window (in sec)
offset - Offset of analysis window (in sec)

bool operator== (const WindowIterator& i) const
Equality operator

bool operator!= (const WindowIterator& i) const
Inequality operator

WindowIterator& operator++ ()
Increment operator (prefix)

WindowIterator operator++ (int)
Increment operator (postfix)

reference operator*()
Dereference operator

pointer operator->()
Pointer operator


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++