LALMetaIO  4.0.4.1-89842e6
LIGOMetadataUtils.h File Reference

Provides functions for manipulating the LAL structures that correspond to the LIGO metadata database tables defined in LIGOMetadataTables.h. More...

Prototypes

ProcessTableXLALCreateProcessTableRow (void)
 Create a ProcessTable structure. More...
 
ProcessTableXLALDestroyProcessTableRow (ProcessTable *)
 Destroy a ProcessTable structure. More...
 
void XLALDestroyProcessTable (ProcessTable *)
 Destroy a ProcessTable linked list. More...
 
long XLALProcessTableGetNextID (ProcessTable *)
 Return the next available process ID. More...
 
int XLALPopulateProcessTable (ProcessTable *ptable, const char *program_name, const char *cvs_revision, const char *cvs_source, const char *cvs_date, long process_id)
 Populate a pre-allocated ProcessTable structure. More...
 
ProcessParamsTableXLALCreateProcessParamsTableRow (const ProcessTable *)
 Create a ProcessParamsTable structure. More...
 
ProcessParamsTableXLALDestroyProcessParamsTableRow (ProcessParamsTable *)
 Destroy a ProcessParamsTable structure. More...
 
void XLALDestroyProcessParamsTable (ProcessParamsTable *)
 Destroy a ProcessParamsTable linked list. More...
 
TimeSlideXLALCreateTimeSlide (void)
 Create a TimeSlide structure. More...
 
TimeSlideXLALDestroyTimeSlide (TimeSlide *)
 Destroy a TimeSlide structure. More...
 
void XLALDestroyTimeSlideTable (TimeSlide *)
 Destroy a TimeSlide linked list. More...
 
const TimeSlideXLALTimeSlideConstGetByIDAndInstrument (const TimeSlide *, long, const char *)
 Find and return the address of the first element in the linked list of TimeSlide objects whose time_slide_id and instrument name equal the values given. More...
 
TimeSlideXLALTimeSlideGetByIDAndInstrument (TimeSlide *, long, const char *)
 Find and return the address of the first element in the linked list of TimeSlide objects whose time_slide_id and instrument name equal the values given. More...
 
SearchSummaryTableXLALCreateSearchSummaryTableRow (const ProcessTable *)
 Create a SearchSummaryTable structure. More...
 
SearchSummaryTableXLALDestroySearchSummaryTableRow (SearchSummaryTable *)
 Destroy a SearchSummaryTable structure. More...
 
void XLALDestroySearchSummaryTable (SearchSummaryTable *)
 Destroy a SearchSummaryTable linked list. More...
 
SegmentTableXLALCreateSegmentTableRow (const ProcessTable *process)
 Create a SegmentTable structure. More...
 
SegmentTableXLALDestroySegmentTableRow (SegmentTable *row)
 
void XLALDestroySegmentTable (SegmentTable *head)
 
SnglInspiralTableXLALCreateSnglInspiralTableRow (const ProcessTable *process)
 Create a SnglInspiralTable structure. More...
 
SnglInspiralTableXLALDestroySnglInspiralTableRow (SnglInspiralTable *row)
 Destroy a SnglInspiralTable structure. More...
 
void XLALDestroySnglInspiralTable (SnglInspiralTable *head)
 Destroy a SnglInspiralTable linked list. More...
 
SimInspiralTableXLALCreateSimInspiralTableRow (const ProcessTable *process)
 Create a SimInspiralTable structure. More...
 
SimInspiralTableXLALDestroySimInspiralTableRow (SimInspiralTable *row)
 Destroy a SimInspiralTable structure. More...
 
void XLALDestroySimInspiralTable (SimInspiralTable *head)
 Destroy a SimInspiralTable linked list. More...
 
SnglRingdownTableXLALCreateSnglRingdownTableRow (const ProcessTable *process)
 Create a SnglRingdownTable structure. More...
 
SnglRingdownTableXLALDestroySnglRingdownTableRow (SnglRingdownTable *row)
 Destroy a SnglRingdownTable structure. More...
 
void XLALDestroySnglRingdownTable (SnglRingdownTable *head)
 Destroy a SnglRingdownTable linked list. More...
 
SimRingdownTableXLALCreateSimRingdownTableRow (const ProcessTable *process)
 Create a SimRingdownTable structure. More...
 
SimRingdownTableXLALDestroySimRingdownTableRow (SimRingdownTable *row)
 Destroy a SimRingdownTable structure. More...
 
void XLALDestroySimRingdownTable (SimRingdownTable *head)
 Destroy a SimRingdownTable linked list. More...
 
SnglBurstXLALCreateSnglBurst (void)
 Create a SnglBurst structure. More...
 
SnglBurstXLALDestroySnglBurst (SnglBurst *event)
 Free a SnglBurst. More...
 
void XLALDestroySnglBurstTable (SnglBurst *head)
 Free a SnglBurst linked list. More...
 
SimBurstXLALCreateSimBurst (void)
 Create a SimBurst structure. More...
 
SimBurstXLALDestroySimBurst (SimBurst *row)
 Destroy a SimBurst structure. More...
 
void XLALDestroySimBurstTable (SimBurst *head)
 Destroy a SimBurst linked list. More...
 
int XLALCountProcessTable (ProcessTable *head)
 Count and return the number of rows in the linked list. More...
 
int XLALCountProcessParamsTable (ProcessParamsTable *head)
 Count the number of rows in a ProcessParamsTable linked the list. More...
 
long XLALSimInspiralAssignIDs (SimInspiralTable *head, long process_id, long simulation_id)
 Assign simulation_id values to the entries in a SimInspiral linked list. More...
 
long XLALSnglBurstAssignIDs (SnglBurst *head, long process_id, long event_id)
 Assign event_id values to the entries in a SnglBurst linked list. More...
 
long XLALSimBurstAssignIDs (SimBurst *head, long process_id, long time_slide_id, long event_id)
 Assign simulation_id values to the entries in a sim_burst linked list. More...
 
void XLALReturnIFO (char *ifo, InterferometerNumber IFONumber)
 
void XLALReturnDetector (LALDetector *det, InterferometerNumber IFONumber)
 
int XLALCompareSearchSummaryByOutTime (const void *a, const void *b)
 
int XLALTimeSortSearchSummary (SearchSummaryTable **summHead, int(*comparfunc)(const void *, const void *))
 
SearchSummaryTableXLALIfoScanSearchSummary (SearchSummaryTable *input, CHAR *ifos)
 Scan through a linked list of search_summary row objects and copy rows whose ifos match the given string into a new linked list, and return the address of the first entry in the new list. More...
 

Detailed Description

Provides functions for manipulating the LAL structures that correspond to the LIGO metadata database tables defined in LIGOMetadataTables.h.

Author
Brown, D. A. and Fairhurst, S.

Synopsis

#include <lal/LIGOMetadataUtils.h>

This header provides prototypes for routines that perform processing on the LAL structures that correspond to the LIGO metadata database tables defined in LIGOMetadataTables.h, such as sorting and eliminating duplictaes. The functions specific to a particular metadata table (e.g. sngl_inspiral, sngl_burst, etc.) are all prototyped in this header.

Types

None.

Definition in file LIGOMetadataUtils.h.

Go to the source code of this file.

Function Documentation

◆ XLALCreateProcessTableRow()

ProcessTable* XLALCreateProcessTableRow ( void  )

Create a ProcessTable structure.

Definition at line 52 of file processtable.c.

◆ XLALDestroyProcessTableRow()

ProcessTable* XLALDestroyProcessTableRow ( ProcessTable row)

Destroy a ProcessTable structure.

Definition at line 83 of file processtable.c.

◆ XLALDestroyProcessTable()

void XLALDestroyProcessTable ( ProcessTable head)

Destroy a ProcessTable linked list.

Definition at line 94 of file processtable.c.

◆ XLALProcessTableGetNextID()

long XLALProcessTableGetNextID ( ProcessTable head)

Return the next available process ID.

Definition at line 104 of file processtable.c.

◆ XLALPopulateProcessTable()

int XLALPopulateProcessTable ( ProcessTable ptable,
const char *  program_name,
const char *  cvs_revision,
const char *  cvs_source,
const char *  cvs_date,
long  process_id 
)

Populate a pre-allocated ProcessTable structure.

Definition at line 220 of file processtable.c.

◆ XLALCreateProcessParamsTableRow()

ProcessParamsTable* XLALCreateProcessParamsTableRow ( const ProcessTable process)

Create a ProcessParamsTable structure.

Definition at line 40 of file process_params.c.

◆ XLALDestroyProcessParamsTableRow()

ProcessParamsTable* XLALDestroyProcessParamsTableRow ( ProcessParamsTable row)

Destroy a ProcessParamsTable structure.

Definition at line 66 of file process_params.c.

◆ XLALDestroyProcessParamsTable()

void XLALDestroyProcessParamsTable ( ProcessParamsTable head)

Destroy a ProcessParamsTable linked list.

Definition at line 79 of file process_params.c.

◆ XLALCreateTimeSlide()

TimeSlide* XLALCreateTimeSlide ( void  )

Create a TimeSlide structure.

Definition at line 40 of file time_slide.c.

◆ XLALDestroyTimeSlide()

TimeSlide* XLALDestroyTimeSlide ( TimeSlide row)

Destroy a TimeSlide structure.

Definition at line 62 of file time_slide.c.

◆ XLALDestroyTimeSlideTable()

void XLALDestroyTimeSlideTable ( TimeSlide head)

Destroy a TimeSlide linked list.

Definition at line 75 of file time_slide.c.

◆ XLALTimeSlideConstGetByIDAndInstrument()

const TimeSlide* XLALTimeSlideConstGetByIDAndInstrument ( const TimeSlide time_slide,
long  time_slide_id,
const char *  instrument 
)

Find and return the address of the first element in the linked list of TimeSlide objects whose time_slide_id and instrument name equal the values given.

TimeSlide elements whose instrument pointer is NULL are skipped. Returns NULL if no matching row is found. This version is for a linked list of const pointers, and returns a const pointer. See also XLALTimeSlideGetByIDAndInstrument().

Definition at line 92 of file time_slide.c.

◆ XLALTimeSlideGetByIDAndInstrument()

TimeSlide* XLALTimeSlideGetByIDAndInstrument ( TimeSlide time_slide,
long  time_slide_id,
const char *  instrument 
)

Find and return the address of the first element in the linked list of TimeSlide objects whose time_slide_id and instrument name equal the values given.

TimeSlide elements whose instrument pointer is NULL are skipped. Returns NULL if no matching row is found. This version is for a linked list of non-const pointers, and returns a non-const pointer. See also XLALTimeSlideConstGetByIDAndInstrument(). NOTE: neither version modifies the TimeSlide rows; the two versions are identical, they are provided to allow the const'ness to be passed through the function.

Definition at line 114 of file time_slide.c.

◆ XLALCreateSearchSummaryTableRow()

SearchSummaryTable* XLALCreateSearchSummaryTableRow ( const ProcessTable process)

Create a SearchSummaryTable structure.

Definition at line 41 of file search_summary.c.

◆ XLALDestroySearchSummaryTableRow()

SearchSummaryTable* XLALDestroySearchSummaryTableRow ( SearchSummaryTable row)

Destroy a SearchSummaryTable structure.

Definition at line 71 of file search_summary.c.

◆ XLALDestroySearchSummaryTable()

void XLALDestroySearchSummaryTable ( SearchSummaryTable head)

Destroy a SearchSummaryTable linked list.

Definition at line 84 of file search_summary.c.

◆ XLALCreateSegmentTableRow()

SegmentTable* XLALCreateSegmentTableRow ( const ProcessTable process)

Create a SegmentTable structure.

Definition at line 40 of file segment.c.

◆ XLALDestroySegmentTableRow()

SegmentTable* XLALDestroySegmentTableRow ( SegmentTable row)

Definition at line 68 of file segment.c.

◆ XLALDestroySegmentTable()

void XLALDestroySegmentTable ( SegmentTable head)

Definition at line 81 of file segment.c.

◆ XLALCreateSnglInspiralTableRow()

SnglInspiralTable* XLALCreateSnglInspiralTableRow ( const ProcessTable process)

Create a SnglInspiralTable structure.

Definition at line 40 of file sngl_inspiral.c.

◆ XLALDestroySnglInspiralTableRow()

SnglInspiralTable* XLALDestroySnglInspiralTableRow ( SnglInspiralTable row)

Destroy a SnglInspiralTable structure.

Definition at line 64 of file sngl_inspiral.c.

◆ XLALDestroySnglInspiralTable()

void XLALDestroySnglInspiralTable ( SnglInspiralTable head)

Destroy a SnglInspiralTable linked list.

Definition at line 75 of file sngl_inspiral.c.

◆ XLALCreateSimInspiralTableRow()

SimInspiralTable* XLALCreateSimInspiralTableRow ( const ProcessTable process)

Create a SimInspiralTable structure.

Definition at line 40 of file sim_inspiral.c.

◆ XLALDestroySimInspiralTableRow()

SimInspiralTable* XLALDestroySimInspiralTableRow ( SimInspiralTable row)

Destroy a SimInspiralTable structure.

Definition at line 67 of file sim_inspiral.c.

◆ XLALDestroySimInspiralTable()

void XLALDestroySimInspiralTable ( SimInspiralTable head)

Destroy a SimInspiralTable linked list.

Definition at line 80 of file sim_inspiral.c.

◆ XLALCreateSnglRingdownTableRow()

SnglRingdownTable* XLALCreateSnglRingdownTableRow ( const ProcessTable process)

Create a SnglRingdownTable structure.

Definition at line 40 of file sngl_ringdown.c.

◆ XLALDestroySnglRingdownTableRow()

SnglRingdownTable* XLALDestroySnglRingdownTableRow ( SnglRingdownTable row)

Destroy a SnglRingdownTable structure.

Definition at line 65 of file sngl_ringdown.c.

◆ XLALDestroySnglRingdownTable()

void XLALDestroySnglRingdownTable ( SnglRingdownTable head)

Destroy a SnglRingdownTable linked list.

Definition at line 78 of file sngl_ringdown.c.

◆ XLALCreateSimRingdownTableRow()

SimRingdownTable* XLALCreateSimRingdownTableRow ( const ProcessTable process)

Create a SimRingdownTable structure.

Definition at line 40 of file sim_ringdown.c.

◆ XLALDestroySimRingdownTableRow()

SimRingdownTable* XLALDestroySimRingdownTableRow ( SimRingdownTable row)

Destroy a SimRingdownTable structure.

Definition at line 65 of file sim_ringdown.c.

◆ XLALDestroySimRingdownTable()

void XLALDestroySimRingdownTable ( SimRingdownTable head)

Destroy a SimRingdownTable linked list.

Definition at line 78 of file sim_ringdown.c.

◆ XLALCreateSnglBurst()

SnglBurst* XLALCreateSnglBurst ( void  )

Create a SnglBurst structure.

Definition at line 40 of file sngl_burst.c.

◆ XLALDestroySnglBurst()

SnglBurst* XLALDestroySnglBurst ( SnglBurst event)

Free a SnglBurst.

Definition at line 70 of file sngl_burst.c.

◆ XLALDestroySnglBurstTable()

void XLALDestroySnglBurstTable ( SnglBurst head)

Free a SnglBurst linked list.

Definition at line 81 of file sngl_burst.c.

◆ XLALCreateSimBurst()

SimBurst* XLALCreateSimBurst ( void  )

Create a SimBurst structure.

Definition at line 40 of file sim_burst.c.

◆ XLALDestroySimBurst()

SimBurst* XLALDestroySimBurst ( SimBurst row)

Destroy a SimBurst structure.

Definition at line 73 of file sim_burst.c.

◆ XLALDestroySimBurstTable()

void XLALDestroySimBurstTable ( SimBurst head)

Destroy a SimBurst linked list.

Definition at line 84 of file sim_burst.c.

◆ XLALCountProcessTable()

int XLALCountProcessTable ( ProcessTable head)

Count and return the number of rows in the linked list.

Definition at line 117 of file processtable.c.

◆ XLALCountProcessParamsTable()

int XLALCountProcessParamsTable ( ProcessParamsTable head)

Count the number of rows in a ProcessParamsTable linked the list.

Definition at line 91 of file process_params.c.

◆ XLALSimInspiralAssignIDs()

long XLALSimInspiralAssignIDs ( SimInspiralTable head,
long  process_id,
long  simulation_id 
)

Assign simulation_id values to the entries in a SimInspiral linked list.

All SimInspiral rows in the list will be blamed on the given process_id, and assigned sequential simulation_ids starting with the given simulation_id. The return value is the next simulation_id after the last one assigned to a row in the list.

Definition at line 97 of file sim_inspiral.c.

◆ XLALSnglBurstAssignIDs()

long XLALSnglBurstAssignIDs ( SnglBurst head,
long  process_id,
long  event_id 
)

Assign event_id values to the entries in a SnglBurst linked list.

All SnglBurst rows in the list will be blamed on the given process_id, and assigned sequential event_ids starting with the given event_id. The return value is the next event_id after the last one assigned to a row in the list.

Definition at line 307 of file sngl_burst.c.

◆ XLALSimBurstAssignIDs()

long XLALSimBurstAssignIDs ( SimBurst sim_burst,
long  process_id,
long  time_slide_id,
long  simulation_id 
)

Assign simulation_id values to the entries in a sim_burst linked list.

All sim_burst rows in the list will be blamed on the given process_id, and assigned simulation_ids in order starting with the given simulation_id. The return value is the next simulation_id after the last one assigned to a row in the list.

Definition at line 388 of file sim_burst.c.

◆ XLALReturnIFO()

void XLALReturnIFO ( char *  ifo,
InterferometerNumber  IFONumber 
)

Definition at line 63 of file LIGOMetadataUtils.c.

◆ XLALReturnDetector()

void XLALReturnDetector ( LALDetector det,
InterferometerNumber  IFONumber 
)

Definition at line 104 of file LIGOMetadataUtils.c.

◆ XLALCompareSearchSummaryByOutTime()

int XLALCompareSearchSummaryByOutTime ( const void *  a,
const void *  b 
)

Definition at line 93 of file search_summary.c.

◆ XLALTimeSortSearchSummary()

int XLALTimeSortSearchSummary ( SearchSummaryTable **  summHead,
int(*)(const void *, const void *)  comparfunc 
)

Definition at line 127 of file search_summary.c.

◆ XLALIfoScanSearchSummary()

SearchSummaryTable* XLALIfoScanSearchSummary ( SearchSummaryTable input,
CHAR ifos 
)

Scan through a linked list of search_summary row objects and copy rows whose ifos match the given string into a new linked list, and return the address of the first entry in the new list.

Returns NULL if no matching rows are found, or if an error occured (out of memory). Use XLAL error functions to check for an error status code if it matters which condition occured.

Definition at line 175 of file search_summary.c.