Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALMetaIO 4.0.6.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LIGOLwXMLRead.h File Reference

Provides functions for reading LIGO lightweight XML files to LIGO metadata database tables. More...

Prototypes

int XLALLIGOLwFindColumn (struct MetaioParseEnvironment *env, const char *name, unsigned int type, int required)
 Convenience wrapper for MetaioFindColumn(), translating to XLAL-style error reporting and printing useful error messages on failure. More...
 
long long XLALLIGOLwParseIlwdChar (const struct MetaioParseEnvironment *env, int column_number, const char *ilwd_char_table_name, const char *ilwd_char_column_name)
 Convenience function to extract the integer part of an ilwd:char ID string with some error checking. More...
 
int XLALLIGOLwHasTable (const char *filename, const char *table_name)
 Test a LIGO Light Weight XML file for the presence of a specific table. More...
 
ProcessTableXLALProcessTableFromLIGOLw (const char *filename)
 Read the process table from a LIGO Light Weight XML file into a linked list of ProcessTable structures. More...
 
ProcessParamsTableXLALProcessParamsTableFromLIGOLw (const char *filename)
 Read the process_params table from a LIGO Light Weight XML file into a linked list of ProcessParamsTable structures. More...
 
TimeSlideXLALTimeSlideTableFromLIGOLw (const char *filename)
 Read the time_slide table from a LIGO Light Weight XML file into a linked list of TimeSlide structures. More...
 
SnglInspiralTableXLALSnglInspiralTableFromLIGOLw (const char *fileName)
 Read the sngl_inspiral table from a LIGO Light Weight XML file into a linked list of SnglInspiralTable structures. More...
 
SimInspiralTableXLALSimInspiralTableFromLIGOLw (const char *fileName)
 Read the sim_inspiral table from a LIGO Light Weight XML file into a linked list of SimInspiralTable structures. More...
 
SnglRingdownTableXLALSnglRingdownTableFromLIGOLw (const char *fileName)
 Read the sngl_ringdown table from a LIGO Light Weight XML file into a linked list of SnglRingdownTable structures. More...
 
SimRingdownTableXLALSimRingdownTableFromLIGOLw (const char *fileName)
 Read the sim_ringdown table from a LIGO Light Weight XML file into a linked list of SimRingdownTable structures. More...
 
SnglBurstXLALSnglBurstTableFromLIGOLw (const char *filename)
 Read the sngl_burst table from a LIGO Light Weight XML file into a linked list of SnglBurst structures. More...
 
SimBurstXLALSimBurstTableFromLIGOLw (const char *filename)
 Read the sim_burst table from a LIGO Light Weight XML file into a linked list of SimBurst structures. More...
 
SearchSummaryTableXLALSearchSummaryTableFromLIGOLw (const char *fileName)
 Read the search_summary table from a LIGO Light Weight XML file into a linked list of SearchSummaryTable structures. More...
 

Detailed Description

Provides functions for reading LIGO lightweight XML files to LIGO metadata database tables.

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

Synopsis

#include <lal/LIGOLwXMLRead.h>

Definition in file LIGOLwXMLRead.h.

Go to the source code of this file.

Function Documentation

◆ XLALLIGOLwFindColumn()

int XLALLIGOLwFindColumn ( struct MetaioParseEnvironment *  env,
const char *  name,
unsigned int  type,
int  required 
)

Convenience wrapper for MetaioFindColumn(), translating to XLAL-style error reporting and printing useful error messages on failure.

Returns the integer index of the column, or a negative integer if the column is not found or has the wrong type. If required is non-zero, then an XLAL error is reported if the column is missing, but if required is zero then no error is generated for missing columns. When a column is found, it's type is checked and an XLAL error is reported if it does not match the requested type. Passing METAIO_TYPE_UNKNOWN disables the column type test.

Definition at line 136 of file LIGOLwXMLRead.c.

◆ XLALLIGOLwParseIlwdChar()

long long XLALLIGOLwParseIlwdChar ( const struct MetaioParseEnvironment *  env,
int  column_number,
const char *  ilwd_char_table_name,
const char *  ilwd_char_column_name 
)

Convenience function to extract the integer part of an ilwd:char ID string with some error checking.

If either of ilwd_char_table_name or ilwd_char_column_name is not NULL, then the corresponding portion of the ilwd:char string must match it exactly. The return value is the recovered integer suffix or < 0 on failure.

Definition at line 168 of file LIGOLwXMLRead.c.

◆ XLALLIGOLwHasTable()

int XLALLIGOLwHasTable ( const char *  filename,
const char *  table_name 
)

Test a LIGO Light Weight XML file for the presence of a specific table.

Returns > 0 if the document contains the table, 0 if the document does not contain the table, and < 0 on error.

BUGS:

  • This function can't tell the difference between a missing table and an unparseable document. This is a limitation in libmetaio.
  • This function parses the entire file to determine if the table is present, which is slow.
  • This entire approach to XML I/O is the wrong way to go. What's needed is a "load document" function, and a "save document" function. DO NOT attempt to write such functions by using this function to test for every possible table one-by-one and loading the ones that are found. Put the time into writing a proper XML I/O layer!!

Definition at line 85 of file LIGOLwXMLRead.c.

◆ XLALProcessTableFromLIGOLw()

ProcessTable * XLALProcessTableFromLIGOLw ( const char *  filename)

Read the process table from a LIGO Light Weight XML file into a linked list of ProcessTable structures.

Definition at line 345 of file processtable.c.

◆ XLALProcessParamsTableFromLIGOLw()

ProcessParamsTable * XLALProcessParamsTableFromLIGOLw ( const char *  filename)

Read the process_params table from a LIGO Light Weight XML file into a linked list of ProcessParamsTable structures.

Definition at line 108 of file process_params.c.

◆ XLALTimeSlideTableFromLIGOLw()

TimeSlide * XLALTimeSlideTableFromLIGOLw ( const char *  filename)

Read the time_slide table from a LIGO Light Weight XML file into a linked list of TimeSlide structures.

Definition at line 129 of file time_slide.c.

◆ XLALSnglInspiralTableFromLIGOLw()

SnglInspiralTable * XLALSnglInspiralTableFromLIGOLw ( const char *  fileName)

Read the sngl_inspiral table from a LIGO Light Weight XML file into a linked list of SnglInspiralTable structures.

Definition at line 86 of file sngl_inspiral.c.

◆ XLALSimInspiralTableFromLIGOLw()

SimInspiralTable * XLALSimInspiralTableFromLIGOLw ( const char *  fileName)

Read the sim_inspiral table from a LIGO Light Weight XML file into a linked list of SimInspiralTable structures.

Definition at line 115 of file sim_inspiral.c.

◆ XLALSnglRingdownTableFromLIGOLw()

SnglRingdownTable * XLALSnglRingdownTableFromLIGOLw ( const char *  fileName)

Read the sngl_ringdown table from a LIGO Light Weight XML file into a linked list of SnglRingdownTable structures.

Definition at line 91 of file sngl_ringdown.c.

◆ XLALSimRingdownTableFromLIGOLw()

SimRingdownTable * XLALSimRingdownTableFromLIGOLw ( const char *  fileName)

Read the sim_ringdown table from a LIGO Light Weight XML file into a linked list of SimRingdownTable structures.

Definition at line 91 of file sim_ringdown.c.

◆ XLALSnglBurstTableFromLIGOLw()

SnglBurst * XLALSnglBurstTableFromLIGOLw ( const char *  filename)

Read the sngl_burst table from a LIGO Light Weight XML file into a linked list of SnglBurst structures.

Definition at line 92 of file sngl_burst.c.

◆ XLALSimBurstTableFromLIGOLw()

SimBurst * XLALSimBurstTableFromLIGOLw ( const char *  filename)

Read the sim_burst table from a LIGO Light Weight XML file into a linked list of SimBurst structures.

Definition at line 95 of file sim_burst.c.

◆ XLALSearchSummaryTableFromLIGOLw()

SearchSummaryTable * XLALSearchSummaryTableFromLIGOLw ( const char *  fileName)

Read the search_summary table from a LIGO Light Weight XML file into a linked list of SearchSummaryTable structures.

Definition at line 211 of file search_summary.c.