22#include <lal/LIGOLwXML.h>
39 for (
c = 1;
c < argc; ++
c )
50 error(
"%s is not an option\n", opt );
53 if ( ( val = strchr( opt,
'=' ) ) )
55 else if (
c < argc - 1 && !
is_option( argv[
c+1] ) )
64 thisParam =
LALCalloc( 1,
sizeof( *thisParam ) );
65 thisParam->
next = processParamsTable;
66 processParamsTable = thisParam;
78 return processParamsTable;
86 const char *row_head =
"\n\t\t\t";
91 XLALFilePuts(
"\t<Table Name=\"time_slide_segment_map:table\">\n", xml->
fp);
92 XLALFilePuts(
"\t\t<Column Name=\"time_slide_segment_map:segment_def_id\" Type=\"ilwd:char\"/>\n", xml->
fp);
93 XLALFilePuts(
"\t\t<Column Name=\"time_slide_segment_map:time_slide_id\" Type=\"ilwd:char\"/>\n", xml->
fp);
94 XLALFilePuts(
"\t\t<Stream Name=\"time_slide_segment_map:table\" Type=\"Local\" Delimiter=\",\">", xml->
fp);
100 for(; time_slide_seg_map; time_slide_seg_map = time_slide_seg_map->
next) {
101 if(
XLALFilePrintf(xml->
fp,
"%s\"segment_def:segment_def_id:%ld\",\"time_slide:time_slide_id:%ld\"",
107 row_head =
",\n\t\t\t";
137 verbose(
"output events to LIGOLw XML file %s\n", outputFile );
169 if (!
params->writeSnglInspiralTable)
172 memset( &ringEvents, 0,
sizeof( ringEvents ) );
203 verbose(
"output template bank to LIGOLw XML file %s\n", outputFile );
207 processParams = processParamsTable;
243 processTable =
LALCalloc( 1,
sizeof( *processTable ) );
253 if (
params->numIFO == 1 )
256 "%s",
params->ifoName[0] );
258 else if(
params->numIFO == 2 )
263 else if (
params->numIFO == 3 )
269 else if (
params->numIFO == 4 )
293 searchSummary =
LALCalloc( 1,
sizeof( *searchSummary ) );
295 searchSummary->
nnodes = 1;
303 if(
params->trigStartTimeNS && (
params->trigStartTimeNS > outStartTimeNS))
304 outStartTimeNS = (outEndTimeNS <
params->trigStartTimeNS) ?
305 outEndTimeNS :
params->trigStartTimeNS;
306 if(
params->trigEndTimeNS && (
params->trigEndTimeNS < outEndTimeNS))
307 outEndTimeNS = (outStartTimeNS >
params->trigEndTimeNS) ?
308 outStartTimeNS :
params->trigEndTimeNS;
322 if (
params->numIFO == 1 )
325 "%s",
params->ifoName[0] );
327 else if(
params->numIFO == 2 )
332 else if (
params->numIFO == 3 )
338 else if (
params->numIFO == 4 )
345 return searchSummary;
398 const char *sname,
int t,
int dt )
405 strncpy( tmp_name, sname,
size - 1 );
406 tmp_name[
size-1] = 0;
409 if ( strchr( tmp_name,
'/' ) )
410 error(
"slashes are not allowed in output file name %s\n", tmp_name );
413 while ( (
c = strchr( tmp_name,
'-' ) ) )
417 while ( (
c = strchr( tmp_name,
':' ) ) )
421 while ( (
c = strchr( tmp_name,
' ' ) ) )
424 snprintf(
fname,
size,
"%s-%d-%d.dat", tmp_name,
t,
dt );
const LALVCSInfo lalAppsVCSIdentInfo
Identable VCS and build information for LALApps.
#define LAL_CALL(function, statusptr)
int XLALCloseLIGOLwXMLFile(LIGOLwXMLStream *xml)
LIGOLwXMLStream * XLALOpenLIGOLwXMLFile(const char *path)
int XLALWriteLIGOLwXMLProcessTable(LIGOLwXMLStream *, const ProcessTable *)
int XLALWriteLIGOLwXMLProcessParamsTable(LIGOLwXMLStream *, const ProcessParamsTable *)
int XLALWriteLIGOLwXMLSegmentTable(LIGOLwXMLStream *xml, const SegmentTable *segment_table)
int XLALWriteLIGOLwXMLSimInspiralTable(LIGOLwXMLStream *, const SimInspiralTable *)
int XLALWriteLIGOLwXMLSnglInspiralTable(LIGOLwXMLStream *xml, const SnglInspiralTable *sngl_inspiral)
int XLALWriteLIGOLwXMLSearchSummaryTable(LIGOLwXMLStream *, const SearchSummaryTable *)
int XLALWriteLIGOLwXMLTimeSlideTable(LIGOLwXMLStream *, const TimeSlide *)
void LALWriteLIGOLwXMLTable(LALStatus *status, LIGOLwXMLStream *xml, MetadataTable tablePtr, MetadataTableType table)
void LALBeginLIGOLwXMLTable(LALStatus *status, LIGOLwXMLStream *xml, MetadataTableType table)
void LALEndLIGOLwXMLTable(LALStatus *status, LIGOLwXMLStream *xml)
Provides prototypes for obsolete code.
int coh_PTF_output_events_xml(char *outputFile, MultiInspiralTable *events, SnglInspiralTable *snglEvents, SimInspiralTable *injections, ProcessParamsTable *processParamsTable, TimeSlide *time_slide_head, TimeSlideSegmentMapTable *time_slide_map_head, SegmentTable *segment_table_head, struct coh_PTF_params *params)
static int XLALWriteLIGOLwXMLTimeSlideSegmentMapTable(LIGOLwXMLStream *xml, const TimeSlideSegmentMapTable *time_slide_seg_map)
int write_COMPLEX8FrequencySeries(COMPLEX8FrequencySeries *series)
ProcessTable * coh_PTF_create_process_table(struct coh_PTF_params *params)
int write_REAL4FrequencySeries(REAL4FrequencySeries *series)
ProcessParamsTable * create_process_params(int argc, char **argv, const char *program)
int generate_file_name(char *fname, size_t size, const char *sname, int t, int dt)
int coh_PTF_output_tmpltbank(char *outputFile, SnglInspiralTable *tmplts, ProcessParamsTable *processParamsTable, struct coh_PTF_params *params)
SearchSummaryTable * coh_PTF_create_search_summary(struct coh_PTF_params *params)
int write_REAL4TimeSeries(REAL4TimeSeries *series)
int error(const char *fmt,...)
INT8 sec_to_ns(REAL8 sec)
LIGOTimeGPS * ns_to_epoch(LIGOTimeGPS *epoch, INT8 ns)
INT8 epoch_to_ns(LIGOTimeGPS *epoch)
LIGOTimeGPS * XLALGPSTimeNow(LIGOTimeGPS *gpstime)
int XLALFilePuts(const char *s, LALFILE *file)
int XLALFilePrintf(LALFILE *file, const char *fmt,...)
#define XLAL_INIT_DECL(var,...)
int XLALStringPrint(char *s, size_t n, const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(3
void LALCPrintFrequencySeries(COMPLEX8FrequencySeries *series, const CHAR *filename)
void LALSPrintFrequencySeries(REAL4FrequencySeries *series, const CHAR *filename)
void LALSPrintTimeSeries(REAL4TimeSeries *series, const CHAR *filename)
int XLALGetBaseErrno(void)
SimInspiralTable * injections
const char *const vcsDate
const char *const vcsStatus
CHAR type[LIGOMETA_TYPE_MAX]
CHAR param[LIGOMETA_PARAM_MAX]
CHAR value[LIGOMETA_VALUE_MAX]
struct tagProcessParamsTable * next
CHAR program[LIGOMETA_PROGRAM_MAX]
CHAR ifos[LIGOMETA_IFOS_MAX]
CHAR comment[LIGOMETA_COMMENT_MAX]
CHAR comment[LIGOMETA_COMMENT_MAX]
LIGOTimeGPS out_start_time
CHAR ifos[LIGOMETA_IFOS_MAX]
LIGOTimeGPS in_start_time
struct tagTimeSlideSegmentMapTable * next