In file IfoSet.hh:

namespace events class IfoSet : public Condition

Defines an event ifo set

Inheritance:


Public Classes

enum Match
Matching criterium
kExact
Exact
kSubset
Subset
kSuperset
Superset
kAnyOne
Any one

Public Fields

typedef ColumnType::ColumnIfo_t ifoset_type
Ifo set type

Public Methods

IfoSet ()
Default constructor
explicit IfoSet (const char* ifoset, Match match = kExact)
Default constructor
explicit IfoSet (const char* ifoset, Match match, int index)
Default constructor
explicit IfoSet (const std::string& ifoset, Match match = kExact)
Constructor
explicit IfoSet (ifoset_type ifoset, Match match = kExact, int index = -1)
Constructor
virtual IfoSet* Copy () const
Copy the event
bool IsValid () const
Is valid?
bool operator== (const IfoSet& ifoset) const
Equality operator
bool operator!= (const IfoSet& ifoset) 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
bool SetIfo (const char* ifoset)
Set the ifo set
bool AddIfo (const char* ifoset)
Add to the ifo set
bool RemoveIfo (const char* ifoset)
Remove from the ifo set
std::string GetIfo () const
Get the ifo set
std::string GetIfoTags () const
Get the ifo set
void SetIfoSet (ifoset_type ifoset)
Set the ifo set
ifoset_type GetIfoSet () const
Get the ifo set
void SetMatch (Match match)
Set match criterium
Match GetMatch () const
Get match criterium
static int Size ()
Number of bits
int Count () const
Number of bits set
bool Any () const
Any bit?
bool None () const
No bit?
bool TestBit (int bit) const
Test bit
IfoSet& Set ()
Set all bits
IfoSet& Set (int bit, bool set = true)
Set bit
IfoSet& Reset ()
Reset all bits
IfoSet& Reset (int bit)
Reset bit
IfoSet& Flip ()
Flip all bits
IfoSet& Flip (int bit)
Flip bit
bool Test (const IfoSet& ifoset) const
Test
bool Test (ifoset_type ifoset) const
Test
static int Register (const char* ifostring)
Register the ifo
static int GetBit (const char* ifostring)
Get the ifo bit
static bool GetBits (const char* ifostring, ifoset_type& ifoset)
Get the ifo bits
static std::string GetTag (int bit)
Get the ifo tag
static bool GetTags (const ifoset_type& ifoset, std::string& ifostring)
Get the ifo bits

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

The event ifo set descibes a condition on the origin of the event. An Interferometer set is specified with a string consisting of one or multiple interferometer tags. An interferometer tag consists of a letter and a number. For example "H1" stands for the 4k interferometer at Hanford, whereas "L1H1" stands for both LIGO 4k interferometers. An ifo set specification can contain wildcards, e.g., "H*" stands for all Hanford interferometers, or "*" stands for all intereferometers.

The interferometer set is bit encoded and a match can be defined as exact, as a subset, as a superset or as any-one. If exact match is specified, the event must define exaclty the same set of interferometers as the ifo set. If subset is specified the interferometer(s) of the event must be a subset of the ones in the IfoSet. Conversely, if superset is specified, the event must specifiy at least the interfereometers of the IfoSet. If any-one is specified, the event must defined exaclty one out of the interferometers of the IfoSet.

If an ifo set is specified without an index it gets applied to all event indices. An event index can be explicitly specified as part of the string or as a separate argument. Examples:

    IfoSet ("H1[0]") && IfoSet ("L1", 1)
    
selects LHO 4K events from the first event stream and LLO 4K events from the second one.

As with the column class an interferometer set can also access the information of events stored as event columns. The same notation applies. For example:

    IfoSet ("Event(1).H1")
    IfoSet ("H1(1)")
    
selects events which contain an LHO 4K event at column "Event(1)".

typedef ColumnType::ColumnIfo_t ifoset_type
Ifo set type

enum Match
Matching criterium

kExact
Exact

kSubset
Subset

kSuperset
Superset

kAnyOne
Any one

IfoSet()
Creates a default event ifo set (matches events which have no interferometer set defined).

explicit IfoSet(const char* ifoset, Match match = kExact)
Creates an event ifo set from the specified pattern and the specified matching criterium.
Parameters:
ifoset - String describing the interferometer set
match - Matching criterium

explicit IfoSet(const char* ifoset, Match match, int index)
Creates a default event ifo set (matches events which have no interferometer set defined).
Parameters:
ifoset - String describing the interferometer set
match - Matching criterium
index - Event index

explicit IfoSet(const std::string& ifoset, Match match = kExact)
Creates an ifo set from the specified string.
Parameters:
ifoset - String describing the interferometer set
match - Matching criterium

explicit IfoSet(ifoset_type ifoset, Match match = kExact, int index = -1)
Creates an ifo set with the specified ID.
Parameters:
ifoset - Bit set describing the interferometer(s)
match - Matching criterium
index - Event index

virtual IfoSet* 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 ifo set.
Returns:
true if valid

bool operator== (const IfoSet& ifoset) const
Equality operator (case insensitive)

bool operator!= (const IfoSet& ifoset) 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

bool SetIfo(const char* ifoset)
Set the ifo set from the specified string. Expects a full name including (optional) event array, event index and interferometer tags.
Returns:
true if valid string

bool AddIfo(const char* ifoset)
Add the specified ifo set to the existing one. Only ifo tags are accepted as an argument.
Returns:
true if valid string

bool RemoveIfo(const char* ifoset)
Remove the specified ifo set from the existing one. Only ifo tags are accepted as an argument.
Returns:
true if valid string

std::string GetIfo() const
Get the string corresponding to the ifo set. Does include the event columns in canonocal form if used.
Returns:
ifo set string

std::string GetIfoTags() const
Get the string corresponding to the ifo set tags. Does not include event column names.
Returns:
ifo set string

void SetIfoSet(ifoset_type ifoset)
Set the ifo set
Parameters:
ifoset - Interferometer set

ifoset_type GetIfoSet() const
Get the ifo set
Returns:
Interferometer set

void SetMatch(Match match)
Set the match criterium.
Parameters:
match - Matching criterium

Match GetMatch() const
Get the match criterium.
Returns:
Matching criterium

static int Size()
Returns the number of bits.
Returns:
Number of bits

int Count() const
Counts the number of bits.
Returns:
Number of bits set

bool Any() const
True if any bit is set.
Returns:
True if any bit is set

bool None() const
True if no bit is set.
Returns:
True if no bit is set

bool TestBit(int bit) const
Test if bit is set.
Returns:
True if specified bit is set

IfoSet& Set()
Set all bits

IfoSet& Set(int bit, bool set = true)
Set bit at specified index.

IfoSet& Reset()
Reset all bits

IfoSet& Reset(int bit)
Reset bit at specified index.

IfoSet& Flip()
Flip all bits

IfoSet& Flip(int bit)
Flip bit at specified index.

bool Test(const IfoSet& ifoset) const
Tests if the specified ifo set matches according to the match criterium. Ignores the event index.
Returns:
true if test answer is positive

bool Test(ifoset_type ifoset) const
Tests if the specified ifo set matches according to the given criterium. Ignores the event index.
Returns:
true if test answer is positive

static int Register(const char* ifostring)
Register a new interferometer.
Returns:
Bit index of ifo, or <0 on error
Parameters:
ifostring - Interferometer string

static int GetBit(const char* ifostring)
Get the bit index of an interferometer tag. An ifo tag has to contain a single letter and a number. Returns -1 if the interferometer does not exist.
Returns:
Bit index of tag
Parameters:
ifostring - Interferometer string

static bool GetBits(const char* ifostring, ifoset_type& ifoset)
Get the encoded value of a set of interferometer tags.
Returns:
True if successful
Parameters:
ifostring - Interferometer string
ifoset - Bit encoded value (return)

static std::string GetTag(int bit)
Get the string of an ifo tag. An empty string is returned if the tag does not exist.
Returns:
Interferometer string
Parameters:
bit - Index of tag

static bool GetTags(const ifoset_type& ifoset, std::string& ifostring)
Get the interferometer set string from the bit encoded value.
Returns:
True if successful
Parameters:
ifoset - Bit encoded value
ifostring - Interferometer string (return)


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