In file trig/SegList.hh:

class LockSegment

Segment manipulation class.

Inheritance:


Public Methods

[more] LockSegment (id_type id, const Time& t0, const Interval dT, flag_type flg=0)
Segment constructor.
[more] LockSegment (id_type id, const Time& t0, const Time& tEnd, flag_type flg=0)
Segment constructor.
[more]Interval getDuration (void) const
Get the segment duration
[more]Time getEndTime (void) const
Get the segment end time
[more]flag_type getFlags (void) const
Get the segment flag field
[more]id_type getID (void) const
Get the segment ID
[more]const Time& getStartTime (void) const
Get (a reference to)the start time
[more]bool inSegment (const Time& t) const
Test if a time is inside the segment.
[more]bool inSegment (const Time& t1, const Time& t2) const
Test whether a time interval is inside the segment.
[more]bool operator< (const LockSegment& s) const
Test if segment is earlier than argument.
[more]bool operator< (const Time& t) const
Test whether the specified time is before this segment.
[more]LockSegment& operator&= (const LockSegment& s)
And the current segment with the argument.
[more]LockSegment& operator|= (const LockSegment& s)
Or the current segment with the argument.
[more]bool overlap (const Time& t, const Time& t2) const
Test whether the argument time span overlaps this segment at any time
[more]bool overlap (const LockSegment& s) const
Test whether the argument segment overlaps this segment at any time
[more]void pad (Interval pFront=0, Interval pBack=0)
Extend the segment start and/or end times.
[more]void setRange (const Time& t0, Interval dT)
Modify the segment time range
[more]void setRange (const Time& t0, const Time& tEnd)
Set the segment time range
[more]bool touch (const LockSegment& s) const
Test whether the argument segment overlaps or is adjacent to this segment
[more]std::ostream& write (std::ostream& s, const std::string& f) const
Write this semgment with the appropriate list;

Public Members

[more]typedef unsigned long flag_type
Define type of data to represent flag
[more]typedef long id_type
Define type of data to represent ID


Documentation

LockSegment represents a single segment for list manipulation. The segment contains a start time, duration, ID and type flag-word.
otypedef unsigned long flag_type
Define type of data to represent flag

otypedef long id_type
Define type of data to represent ID

o LockSegment(id_type id, const Time& t0, const Interval dT, flag_type flg=0)
LockSegment data constructor.
Parameters:
id - Segment identifier.
t0 - Segment start time.
dT - Segment duaration.
flg - Segment flags.

o LockSegment(id_type id, const Time& t0, const Time& tEnd, flag_type flg=0)
LockSegment data constructor.
Parameters:
id - Segment identifier.
t0 - Segment start time.
tEnd - Segment end time.
flg - Segment flags.

oInterval getDuration(void) const
Get the segment duration

oTime getEndTime(void) const
Get the segment end time

oflag_type getFlags(void) const
Get the segment flag field

oid_type getID(void) const
Get the segment ID

oconst Time& getStartTime(void) const
Get (a reference to)the start time

obool inSegment(const Time& t) const
Test whether the specified time is in this segmentA time is outside the segment if it is equal to the end time.
Parameters:
t - Test time.
Returns:
true if time is in segment.

obool inSegment(const Time& t1, const Time& t2) const
Test whether a specified time interval is entirely inside the segment. The segment [t1:t2] is inside the segment only if t1 < t2, and the start time is inside the segment and the end time is not not after the end of this segment.
Parameters:
t1 - Start of test segment.
t2 - End of test segment.
Returns:
True if test segment is valid and is entirely inside segment.

obool operator< (const LockSegment& s) const
Test whether start of segment is earlier than start time of the argument segment.

obool operator< (const Time& t) const
Test whether the specified time is before this segment. The argument time is considered to be before the segment if it is earlier than the start time of this segment.

oLockSegment& operator&= (const LockSegment& s)
And the current segment with the argument. This segment is replaced by a segment representing its overlap with the argument. The ID is left unchanged and the flags are 'and'ed.

oLockSegment& operator|= (const LockSegment& s)
Or the current segment with the argument. This segment is replaced by a segment representing its union eith the argument. The ID ls left unchanged and the flags are 'or'ed.

obool overlap(const Time& t, const Time& t2) const
Test whether the argument time span overlaps this segment at any time

obool overlap(const LockSegment& s) const
Test whether the argument segment overlaps this segment at any time

ovoid pad(Interval pFront=0, Interval pBack=0)
Pad the front and back of the segment by pFront and pBack. The pFront and pBack intervals are defined such that positive intervals increase the segment duration and negative intervals decrease the resulting segment duration. i.e. the resulting segment is [start - pStart, end + pBack]. The result of pad is limited so that the segment can't extend outside of the interval [0, SEGMENT_TINF].
Parameters:
pFront - Length of padding to add to the start of the segment.
pBack - Length of padding to add to the back of the segment.

ovoid setRange(const Time& t0, Interval dT)
Modify the segment time range

ovoid setRange(const Time& t0, const Time& tEnd)
Set the segment time range

obool touch(const LockSegment& s) const
Test whether the argument segment overlaps or is adjacent to this segment

ostd::ostream& write(std::ostream& s, const std::string& f) const
Write this semgment with the appropriate list;


This class has no child classes.
Author:
J.Zweizig
Version:
1.2; last modified 10/05/2006

Alphabetic index HTML hierarchy of classes or Java


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