23 #include <lal/LALDatatypes.h>
24 #include <lal/XLALError.h>
26 #if defined(__cplusplus)
141 #define SEGMENTSH_ALLOCBLOCK 64
150 #define SEGMENTSH_INITMAGICVAL 729415386
171 SWIGLAL(IGNORE_MEMBERS(tagLALSegList, arraySize, dplaces, sorted, disjoint, initMagic, lastFound));
203 XLALSegCmp(
const void *seg0,
const void *seg1 );
250 #elif defined(__cplusplus)
double REAL8
Double precision real floating-point number (8 bytes).
uint32_t UINT4
Four-byte unsigned integer.
int32_t INT4
Four-byte signed integer.
LALSeg * XLALSegCreate(const LIGOTimeGPS *start, const LIGOTimeGPS *end, const INT4 id)
This function is similar to XLALSegSet() except that it allocates memory for a new segment structure ...
int XLALSegListInit(LALSegList *seglist)
This function must be called to initialize a segment list structure before that structure can be used...
int XLALSegListClear(LALSegList *seglist)
This function must be called when you are done with a segment list, in order to free memory that was ...
int XLALSegCmp(const void *seg0, const void *seg1)
This is designed to be usable as a comparison function for qsort() and therefore returns a negative v...
int XLALSegListInitSimpleSegments(LALSegList *seglist, LIGOTimeGPS startTime, UINT4 Nseg, REAL8 Tseg)
(Re-)Initialize a segment list with Nseg 'simple' segments of length 'Tseg', starting at t0 = startTi...
int XLALSegListCoalesce(LALSegList *seglist)
The function XLALSegListCoalesce() first sorts the segments in a segment list (if not already sorted)...
int XLALSegListSort(LALSegList *seglist)
This function sorts the segments in a segment list into forward time order.
int XLALSegListFree(LALSegList *seglist)
This function frees a segment list created with XLALSegListCreate().
int XLALSegListShift(LALSegList *seglist, const LIGOTimeGPS *shift)
UNDOCUMENTED.
char * XLALSegList2String(const LALSegList *seglist)
Output an (octave) formatting of 'seglist' as a string.
int XLALSegListIsInitialized(const LALSegList *seglist)
Simple method to check whether a LALSegList is in an initialized state.
int XLALSegListKeep(LALSegList *seglist, const LIGOTimeGPS *start, const LIGOTimeGPS *end)
UNDOCUMENTED.
int XLALSegListAppend(LALSegList *seglist, const LALSeg *seg)
This function appends a segment to a segment list.
LALSegList * XLALSegListCreate(void)
This function allocates memory for a new segment list structure, initializes the segment list,...
int XLALSegSet(LALSeg *seg, const LIGOTimeGPS *start, const LIGOTimeGPS *end, const INT4 id)
This function sets the start time, the end time, and the id of a segment.
LALSeg * XLALSegListGet(LALSegList *seglist, UINT4 indx)
Get a copy of the segment at indx in the internal array.
LALSeg * XLALSegListSearch(LALSegList *seglist, const LIGOTimeGPS *gps)
The function XLALSegListSearch() determines which segment in the list, if any, contains the GPS time ...
int XLALGPSInSeg(const void *gps, const void *seg)
This is designed to be usable as a comparison function for bsearch() and therefore returns a negative...
int XLALSegListRange(const LALSegList *seglist, LIGOTimeGPS *start, LIGOTimeGPS *end)
The function XLALSegListRange() returns the start and end GPS times of the segment list.
Struct holding a single segment.
LIGOTimeGPS end
Ending time of the segment.
INT4 id
Identifier (segment ID, array index, etc.) for user.
LIGOTimeGPS start
Beginning time of the segment.
Struct holding a segment list.
LALSeg * lastFound
Internal record of last segment found by a search.
UINT4 length
Number of segments in this segment list.
LALSeg * segs
Pointer to array of segments (LALSeg structures)
UINT4 sorted
Flag to indicate whether segment list is sorted.
UINT4 initMagic
Internal value to help ensure list was initialized.
UINT4 dplaces
Decimal places (0,3,6,9) to format GPS times.
size_t arraySize
Size of array for which memory is allocated.
UINT4 disjoint
Flag to indicate whether segment list is disjoint.
Epoch relative to GPS epoch, see LIGOTimeGPS type for more details.