29#include <lal/LALMalloc.h>
30#include <lal/LIGOLwXML.h>
31#include <lal/LIGOLwXMLRead.h>
32#include <lal/LIGOMetadataTables.h>
33#include <lal/LIGOMetadataUtils.h>
34#include <lal/XLALError.h>
56 new->segment_def_id = -1;
57 new->segment_def_cdb = -1;
98 const char *row_head =
"\n\t\t\t";
104 XLALFilePuts(
"\t\t<Column Name=\"process:process_id\" Type=\"int_8s\"/>\n", xml->
fp);
105 XLALFilePuts(
"\t\t<Column Name=\"segment_id\" Type=\"int_8s\"/>\n", xml->
fp);
106 XLALFilePuts(
"\t\t<Column Name=\"start_time\" Type=\"int_4s\"/>\n", xml->
fp);
107 XLALFilePuts(
"\t\t<Column Name=\"start_time_ns\" Type=\"int_4s\"/>\n", xml->
fp);
108 XLALFilePuts(
"\t\t<Column Name=\"end_time\" Type=\"int_4s\"/>\n", xml->
fp);
109 XLALFilePuts(
"\t\t<Column Name=\"end_time_ns\" Type=\"int_4s\"/>\n", xml->
fp);
110 XLALFilePuts(
"\t\t<Column Name=\"segment_definer:segment_def_id\" Type=\"int_8s\"/>\n", xml->
fp);
111 XLALFilePuts(
"\t\t<Stream Name=\"segment:table\" Type=\"Local\" Delimiter=\",\">", xml->
fp);
117 for(; segment_table; segment_table = segment_table->
next) {
118 if(
XLALFilePrintf(xml->
fp,
"%s%ld,%ld,%d,%d,%d,%d,%ld", row_head, segment_table->
process_id, segment_table->
segment_id, segment_table->
start_time.
gpsSeconds, segment_table->
start_time.
gpsNanoSeconds, segment_table->
end_time.
gpsSeconds, segment_table->
end_time.
gpsNanoSeconds, segment_table->
segment_def_id) < 0)
120 row_head =
",\n\t\t\t";
int XLALFilePuts(const char *s, LALFILE *file)
int XLALFilePrintf(LALFILE *file, const char *fmt,...)
void * XLALMalloc(size_t n)
#define XLAL_ERROR_NULL(...)
int XLALGetBaseErrno(void)
LIGOTimeGPS * XLALGPSSet(LIGOTimeGPS *epoch, INT4 gpssec, INT8 gpsnan)
SegmentTable * XLALCreateSegmentTableRow(const ProcessTable *process)
Create a SegmentTable structure.
int XLALWriteLIGOLwXMLSegmentTable(LIGOLwXMLStream *xml, const SegmentTable *segment_table)
Write a segment table to an XML file.
void XLALDestroySegmentTable(SegmentTable *head)
SegmentTable * XLALDestroySegmentTableRow(SegmentTable *row)
This structure contains the file stream and current table type for writing to LIGO lightweight XML fi...
struct tagSegmentTable * next