58#include <lal/LALFrameU.h>
61#define FAILURE(...) do { fprintf(stderr, __VA_ARGS__); exit(99); } while (0)
63int main(
int argc,
char *argv[])
66 char *defaultfilev[1] = { stdio };
67 int filec = (argc == 1 ? 1 : argc - 1);
68 char **filev = (argc == 1 ? defaultfilev : &argv[1]);
73 FAILURE(
"could not create output file\n");
76 char *fname = *filev++;
77 LALFrameUFrFile *input;
84 FAILURE(
"file %s not found\n", fname);
88 FAILURE(
"no TOC found in file %s\n", fname);
91 if ((
int)(nframe) <= 0)
92 FAILURE(
"no frames found in file %s\n", fname);
95 for (pos = 0; pos < nframe; ++pos) {
int main(int argc, char *argv[])
size_t XLALFrameUFrTOCQueryNFrame(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrameH structures contained.
int XLALFrameUFrameHWrite(LALFrameUFrFile *stream, LALFrameUFrameH *frame)
Write a FrameH structure to an output FrFile stream.
void XLALFrameUFrameHFree(LALFrameUFrameH *frame)
Free a FrameH structure.
struct tagLALFrameUFrameH LALFrameUFrameH
Incomplete type for a frame header FrameH structure.
LALFrameUFrTOC * XLALFrameUFrTOCRead(LALFrameUFrFile *stream)
Read the table of contents FrTOC structure for a FrFile stream.
LALFrameUFrFile * XLALFrameUFrFileOpen(const char *filename, const char *mode)
Open a frame file FrFile stream.
struct tagLALFrameUFrTOC LALFrameUFrTOC
Incomplete type for a table of contents FrTOC structure.
void XLALFrameUFrFileClose(LALFrameUFrFile *stream)
Close a FrFile stream.
void output(int gps_sec, int output_type)
LALFrameUFrameH * framecpy(LALFrameUFrFile *frfile, size_t pos)
int copydetectors(LALFrameUFrameH *frame, LALFrameUFrFile *frfile)
int copychannels(LALFrameUFrameH *frame, LALFrameUFrFile *frfile, size_t pos, const char *match)