In file WindowIterator.hh:

class WindowIterator

Defines an event window iterator

Inheritance:


Public Methods

[more] WindowIterator ()
Default constructor
[more] WindowIterator (const iterator& beg, const iterator& end, int order = 1, const TimeWindow& window = 1.0)
Constructor
[more] WindowIterator (const iterator& beg1, const iterator& end1, const iterator& beg2, const iterator& end2, const TimeWindow& window = 1.0)
Constructor
[more] WindowIterator (const iterator& beg1, const iterator& end1, const iterator& beg2, const iterator& end2, const iterator& beg3, const iterator& end3, const TimeWindow& window = 1.0)
Constructor
[more] WindowIterator (const InputStateList& state, const TimeWindow& window = 1.0)
Constructor
[more]bool operator== (const WindowIterator& i) const
Equality operator
[more]bool operator!= (const WindowIterator& i) const
Inequality operator
[more]WindowIterator& operator++ ()
Increment operator (prefix)
[more]WindowIterator operator++ (int)
Increment operator (postfix)
[more]reference operator* ()
Dereference operator
[more]pointer operator-> ()
Pointer operator

Public Members

[more]typedef Iterator iterator
Iterator to be used


Inherited from BasicWindowIterator:

Public Methods

oint GetOrder() const

Public Members

ostruct InputState
otypedef std::vector<InputState> InputStateList

Protected Methods

ovoid InitWindow()
ovoid Increment()
oint GetPermutations() const
ovoid SetPermutation()
oWindow& GetWindow()
oconst 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.

otypedef Iterator iterator
Iterator to be used

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

o WindowIterator(const iterator& beg, const iterator& end, int order = 1, const TimeWindow& window = 1.0)
Creates an window iterator from an iterator range.
Parameters:
beg - Beginning of event range
- end End of event range
order - Coincidence order
window - Anlysis window

o WindowIterator(const iterator& beg1, const iterator& end1, const iterator& beg2, const iterator& end2, const TimeWindow& window = 1.0)
Creates an window iterator from two iterator ranges. The coincidence order is 2.
Parameters:
beg1 - Beginning of first event range
end1 - End of first event range
beg2 - Beginning of second event range
end2 - End of second event range
window - Anlysis window (in sec)

o WindowIterator(const iterator& beg1, const iterator& end1, const iterator& beg2, const iterator& end2, const iterator& beg3, const iterator& end3, const TimeWindow& window = 1.0)
Creates an window iterator from three iterator ranges. The coincidence order is 3.
Parameters:
beg1 - Beginning of first event range
end1 - End of first event range
beg2 - Beginning of second event range
end2 - End of second event range
beg3 - Beginning of third event range
end3 - End of third event range
window - Anlysis window (in sec)

o WindowIterator(const InputStateList& state, const TimeWindow& window = 1.0)
Creates an window iterator from multiple iterator ranges. The coincidence order is the equal the length of the input list.
Parameters:
- state List of input event ranges
window - Anlysis window (in sec)

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

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

oWindowIterator& operator++ ()
Increment operator (prefix)

oWindowIterator operator++ (int)
Increment operator (postfix)

oreference operator*()
Dereference operator

opointer operator->()
Pointer operator


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

Alphabetic index HTML hierarchy of classes or Java


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