31#include <lal/LALStdlib.h>
32#include <lal/LALString.h>
34#include <lal/XLALError.h>
37#define P_tmpdir "/tmp"
44#define UNUSED __attribute__ ((unused))
50#define tagLALFrameUFrameH FrameH
51#define tagLALFrameUFrTOC FrTOC
52#define tagLALFrameUFrHistory FrHistory
53#include <lal/LALFrameU.h>
61 case FR_ERROR_NO_FRAME:
62 return "FR_ERROR_NO_FRAME";
63 case FR_ERROR_NO_FILE:
64 return "FR_ERROR_NO_FILE";
65 case FR_ERROR_MALLOC_FAILED:
66 return "FR_ERROR_MALLOC_FAILED";
67 case FR_ERROR_BUFF_OVERFLOW:
68 return "FR_ERROR_BUFF_OVERFLOW";
69 case FR_ERROR_WRITE_ERROR:
70 return "FR_ERROR_WRITE_ERROR";
71 case FR_ERROR_READ_ERROR:
72 return "FR_ERROR_READ_ERROR";
74 return "FR_ERROR_FRSET";
75 case FR_ERROR_WRONG_CHAR_LENGTH:
76 return "FR_ERROR_WRONG_CHAR_LENGTH";
77 case FR_ERROR_BAD_END_OF_FRAME:
78 return "FR_ERROR_BAD_END_OF_FRAME";
79 case FR_ERROR_OPEN_ERROR:
80 return "FR_ERROR_OPEN_ERROR";
81 case FR_ERROR_CHECKSUM:
82 return "FR_ERROR_CHECKSUM";
83 case FR_ERROR_BAD_NEVENT:
84 return "FR_ERROR_BAD_NEVENT";
85 case FR_ERROR_BAD_NSTAT:
86 return "FR_ERROR_BAD_NSTAT";
87 case FR_ERROR_TOO_LONG_STRING:
88 return "FR_ERROR_TOO_LONG_STRING";
90 return "Unrecognized FrameL error code";
92 return "Invalid FrameL error code";
134 snprintf(tmpfname, L_tmpnam,
"%s/tmp.lal.XXXXXX",
P_tmpdir);
135 return mkstemp(tmpfname);
148 FrFileIEnd(stream->handle);
150 FrFileOEnd(stream->handle);
162 LALFrameUFrFile *stream;
164 if (*mode !=
'r' && *mode !=
'w')
174 char tmpfname[L_tmpnam + 1];
179 tmpfp = fdopen(
mytmpfd(tmpfname),
"w");
180 while (fwrite(buf, 1, fread(buf, 1,
sizeof(buf), stdin), tmpfp) ==
sizeof(buf)) ;
182 stream->handle = FrFileINew(tmpfname);
185 stream->handle = FrFileINew(fname.s);
186 if (!stream->handle) {
191 stream->handle->chkSumFrFlag = FR_YES;
197 frfd = malloc(
sizeof(*frfd));
203 stream->handle = FrFileONewFd(frfd, -1);
205 stream->handle = FrFileONew(fname.s, -1);
206 if (!stream->handle) {
210 stream->handle->noTOCts = FR_NO;
218#define FR_FILE_HEADER_SIZE 40
222 FrameH *frame = NULL;
223 FRBOOL chkSumFiFlag = stream->handle->chkSumFiFlag;
224 FRBOOL chkSumFrFlag = stream->handle->chkSumFrFlag;
225 stream->handle->chkSumFiFlag = FR_YES;
226 stream->handle->chkSumFrFlag = FR_NO;
234 while ((frame = FrameReadRecycle(stream->handle, frame))) ;
235 stream->handle->chkSumFiFlag = chkSumFiFlag;
236 stream->handle->chkSumFrFlag = chkSumFrFlag;
237 if (stream->handle->error != FR_OK)
239 if (stream->handle->chkTypeFiRead == 0)
241 if (stream->handle->chkSumFiRead != stream->handle->chkSumFi)
243 FrFileIRewind(stream->handle);
259 return FrTOCReadFull(stream->handle);
269 if (pos < (
size_t) toc->nFrame) {
279 if (pos >= (
size_t) toc->nFrame)
288 for (ts = toc->adc; ts != NULL; ts = ts->next)
296 FrTOCts *ts = toc->adc;
310 for (ts = toc->sim; ts != NULL; ts = ts->next)
318 FrTOCts *ts = toc->sim;
332 for (ts = toc->proc; ts != NULL; ts = ts->next)
340 FrTOCts *ts = toc->proc;
354 for (d = toc->detector; d != NULL; d = d->next)
362 FrTOCdet *d = toc->detector;
388 frame = calloc(1,
sizeof(*frame));
393 fp1 = modf(start1, &ip1);
394 fp2 = modf(start2, &ip2);
395 fp = modf(fp1 + fp2, &ip);
402 frame->classe = FrameHDef();
403 frame->name = strdup(
name);
405 frame->GTimeN = floor(0.5 + 1e9 *
fp);
406 if (frame->GTimeN >= 1000000000) {
407 frame->GTimeN -= 1000000000;
410 frame->frame = frnum;
422 if (stream->handle->toc == NULL)
423 if (FrTOCReadFull(stream->handle) == NULL || stream->handle->error != FR_OK)
427 if (FrFileIOSet(stream->handle, stream->handle->toc->positionH[pos]) == -1)
431 frame = FrameRead(stream->handle);
432 if (!frame || stream->handle->error != FR_OK)
435 copy = FrameHCopy(frame);
436 FrSetIni(stream->handle);
437 stream->handle->curFrame = NULL;
445 if (FrameWrite(frame, stream->handle) != FR_OK)
458 copy = calloc(1,
sizeof(*copy));
461 memcpy(copy, original,
sizeof(*copy));
465 copy->comment = NULL;
467 if (original->name) {
468 copy->name = strdup(original->name);
472 if (original->comment) {
473 copy->comment = strdup(original->comment);
477 if (original->next) {
492 copy = calloc(1,
sizeof(*copy));
495 memcpy(copy, original,
sizeof(*copy));
499 copy->comment = NULL;
504 if (original->name) {
505 copy->name = strdup(original->name);
509 if (original->comment) {
510 copy->comment = strdup(original->comment);
514 if (original->units) {
515 copy->units = strdup(original->units);
519 if (original->data) {
520 copy->data = FrVectCopy(original->data);
525 copy->aux = FrVectCopy(original->aux);
529 if (original->next) {
544 copy = calloc(1,
sizeof(*copy));
547 memcpy(copy, original,
sizeof(*copy));
551 copy->comment = NULL;
553 copy->auxParam = NULL;
554 copy->auxParamNames = NULL;
558 copy->history = NULL;
560 if (original->name) {
561 copy->name = strdup(original->name);
565 if (original->comment) {
566 copy->comment = strdup(original->comment);
570 if (original->nAuxParam > 0) {
572 copy->auxParam = calloc(original->nAuxParam,
sizeof(*copy->auxParam));
573 copy->auxParamNames = calloc(original->nAuxParam,
sizeof(*copy->auxParamNames));
574 if (!copy->auxParam || !copy->auxParamNames)
576 copy->nAuxParam = original->nAuxParam;
577 memcpy(copy->auxParam, original->auxParam, copy->nAuxParam *
sizeof(*copy->auxParam));
578 for (i = 0; i < copy->nAuxParam; ++i)
579 copy->auxParamNames[i] = strdup(original->auxParamNames[i]);
581 if (original->data) {
582 copy->data = FrVectCopy(original->data);
587 copy->aux = FrVectCopy(original->aux);
591 if (original->table) {
592 copy->table = FrTableCopy(original->table);
596 if (original->history) {
601 if (original->next) {
609 FrProcDataFree(copy);
616 copy = calloc(1,
sizeof(*copy));
619 memcpy(copy, original,
sizeof(*copy));
623 copy->comment = NULL;
628 if (original->name) {
629 copy->name = strdup(original->name);
633 if (original->comment) {
634 copy->comment = strdup(original->comment);
638 if (original->data) {
639 copy->data = FrVectCopy(original->data);
643 if (original->input) {
644 copy->input = FrVectCopy(original->input);
648 if (original->table) {
649 copy->table = FrTableCopy(original->table);
653 if (original->next) {
667 LALFrameUFrChan copy;
671 if (!copy.handle.adc)
673 if (frame->rawData == NULL)
675 copy.handle.adc->next = frame->rawData->firstAdc;
676 frame->rawData->firstAdc = copy.handle.adc;
680 if (!copy.handle.proc)
682 copy.handle.proc->next = frame->procData;
683 frame->procData = copy.handle.proc;
687 if (!copy.handle.sim)
689 copy.handle.sim->next = frame->simData;
690 frame->simData = copy.handle.sim;
701 copy = calloc(1,
sizeof(*copy));
705 copy->classe = FrDetectorDef();
706 if (detector->handle->name) {
707 copy->name = strdup(detector->handle->name);
713 memcpy(copy->prefix, detector->handle->prefix, 2);
715 copy->longitude = detector->handle->longitude;
716 copy->latitude = detector->handle->latitude;
717 copy->elevation = detector->handle->elevation;
718 copy->armXazimuth = detector->handle->armXazimuth;
719 copy->armYazimuth = detector->handle->armYazimuth;
720 copy->armXaltitude = detector->handle->armXaltitude;
721 copy->armYaltitude = detector->handle->armYaltitude;
722 copy->armXmidpoint = detector->handle->armXmidpoint;
723 copy->armYmidpoint = detector->handle->armYmidpoint;
724 copy->localTime = detector->handle->localTime;
727 copy->next = frame->detectProc;
728 frame->detectProc = copy;
735 copy = FrHistoryNew(history->name ? history->name : frame->name, history->time, history->comment);
738 copy->next = frame->history;
739 frame->history = copy;
761 return frame->dataQuality;
773 return frame->ULeapS;
798 FrAdcDataFree(
channel->handle.adc);
801 FrProcDataFree(
channel->handle.proc);
804 FrSimDataFree(
channel->handle.sim);
821 toc = stream->handle->toc;
823 toc = FrTOCReadFull(stream->handle);
824 if (!toc || stream->handle->error != FR_OK)
826 if (pos >= (
size_t) toc->nFrame)
830 gtime = toc->GTimeS[pos] + 1e-9 * toc->GTimeN[pos];
838 stream->handle->relocation = FR_NO;
839 for (ts = toc->adc; ts != NULL; ts = ts->next)
840 if (strcmp(
name, ts->name) == 0) {
842 if (FrTOCSetPos(stream->handle, ts->position[pos]))
844 adc = FrAdcDataRead(stream->handle);
847 gtime += adc->timeOffset;
849 adc->data = FrVectReadNext(stream->handle, gtime, adc->name);
850 if (stream->handle->error != FR_OK)
858 for (ts = toc->proc; ts != NULL; ts = ts->next)
859 if (strcmp(
name, ts->name) == 0) {
861 if (FrTOCSetPos(stream->handle, ts->position[pos]))
863 proc = FrProcDataRead(stream->handle);
866 gtime += proc->timeOffset;
868 proc->data = FrVectReadNext(stream->handle, gtime, proc->name);
869 if (stream->handle->error != FR_OK)
877 for (ts = toc->sim; ts != NULL; ts = ts->next)
878 if (strcmp(
name, ts->name) == 0) {
880 if (FrTOCSetPos(stream->handle, ts->position[pos]))
882 sim = FrSimDataRead(stream->handle);
885 gtime += sim->timeOffset;
887 sim->data = FrVectReadNext(stream->handle, gtime, sim->name);
888 if (stream->handle->error != FR_OK)
898 if (stream->handle->error == FR_OK)
908 adcData = calloc(1,
sizeof(*adcData));
911 adcData->classe = FrAdcDataDef();
912 adcData->name = strdup(
name);
913 if (!adcData->name) {
914 FrAdcDataFree(adcData);
938 adcData->nBits = 128;
941 FrAdcDataFree(adcData);
951 simData = calloc(1,
sizeof(*simData));
954 simData->classe = FrSimDataDef();
955 simData->name = strdup(
name);
956 if (!simData->name) {
957 FrSimDataFree(simData);
966 FrProcData *procData;
967 procData = calloc(1,
sizeof(*procData));
970 procData->classe = FrProcDataDef();
971 procData->name = strdup(
name);
972 if (!procData->name) {
973 FrProcDataFree(procData);
1037 channel->handle.proc->type = type;
1038 channel->handle.proc->subType = subtype;
1047 return channel->handle.adc->name;
1050 return channel->handle.sim->name;
1053 return channel->handle.proc->name;
1064 return channel->handle.adc->timeOffset;
1067 return channel->handle.sim->timeOffset;
1070 return channel->handle.proc->timeOffset;
1081 channel->handle.adc->sampleRate = sampleRate;
1084 channel->handle.sim->sampleRate = sampleRate;
1098 channel->handle.adc->timeOffset = timeOffset;
1101 channel->handle.sim->timeOffset = timeOffset;
1104 channel->handle.proc->timeOffset = timeOffset;
1117 channel->handle.proc->tRange = tRange;
1160 if (ndata * bytes > (
size_t)INT_MAX)
1161 XLAL_ERROR(
XLAL_ESIZE,
"FrameL cannot create FrVect of size %zu bytes (max size = %d bytes)", ndata * bytes, INT_MAX);
1169 channel->handle.adc->nBits = 8;
1173 channel->handle.adc->nBits = 16;
1178 channel->handle.adc->nBits = 32;
1184 channel->handle.adc->nBits = 64;
1187 channel->handle.adc->nBits = 128;
1193 FrVectFree(
channel->handle.adc->data);
1195 channel->handle.adc->data = FrVectNew1D(
channel->handle.adc->name, -dtype, ndata, 0.0, NULL, NULL);
1196 if (!
channel->handle.adc->data)
1212 FrVectFree(
channel->handle.sim->data);
1214 channel->handle.sim->data = FrVectNew1D(
channel->handle.sim->name, -dtype, ndata, 0.0, NULL, NULL);
1215 if (!
channel->handle.sim->data)
1220 FrVectFree(
channel->handle.proc->data);
1222 channel->handle.proc->data = FrVectNew1D(
channel->handle.proc->name, -dtype, ndata, 0.0, NULL, NULL);
1223 if (!
channel->handle.proc->data)
1237 return channel->handle.adc->data;
1239 return channel->handle.sim->data;
1241 return channel->handle.proc->data;
1254 FrVectCompress(vect, compressLevel, -1);
1284 return vect->compress;
1312 return vect->nBytes;
1339 if (dim >= vect->nDim)
1341 return vect->nx[dim];
1350 if (dim >= vect->nDim)
1352 return vect->dx[dim];
1361 if (dim >= vect->nDim)
1363 return vect->startX[dim];
1373 if (dim >= vect->nDim)
1375 return vect->unitX[dim];
1394 vect->name = strdup(
name);
1404 vect->unitY = strdup(unit);
1426 vect->startX[0] = x0;
1436 vect->unitX[0] = strdup(unit);
1447 FrDetectorFree(detector->handle);
1455 LALFrameUFrDetector *detector;
1457 for (d = stream->handle->toc->detector; d != NULL; d = d->next)
1458 if (strcmp(d->name,
name) == 0) {
1461 if (FrTOCSetPos(stream->handle, d->position) != 0)
1463 det = FrDetectorRead(stream->handle);
1464 prefix[0] = det->prefix[0];
1465 prefix[1] = det->prefix[1];
1469 det->longitude, det->elevation, det->armXazimuth,
1470 det->armYazimuth, det->armXaltitude, det->armYaltitude, det->armXmidpoint, det->armYmidpoint, det->localTime);
1478 const char *prefix,
double latitude,
double longitude,
double elevation,
1479 double azimuthX,
double azimuthY,
double altitudeX,
double altitudeY,
double midpointX,
double midpointY,
int localTime)
1481 LALFrameUFrDetector *detector;
1482 detector =
LALCalloc(1,
sizeof(*detector));
1485 detector->handle = calloc(1,
sizeof(*detector->handle));
1486 if (!detector->handle)
1488 detector->handle->classe = FrDetectorDef();
1489 detector->handle->name = strdup(
name);
1490 if (!detector->handle->name) {
1495 memcpy(detector->prefix, prefix, 2);
1496 memcpy(detector->handle->prefix, prefix, 2);
1499 detector->handle->longitude = longitude;
1500 detector->handle->latitude = latitude;
1501 detector->handle->elevation = elevation;
1502 detector->handle->armXazimuth = azimuthX;
1503 detector->handle->armYazimuth = azimuthY;
1505 detector->handle->armXaltitude = altitudeX;
1506 detector->handle->armYaltitude = altitudeY;
1507 detector->handle->armXmidpoint = midpointX;
1508 detector->handle->armYmidpoint = midpointY;
1509 detector->handle->localTime = localTime;
1516 return detector->handle->name;
1522 return detector->prefix;
1527 return detector->handle->longitude;
1532 return detector->handle->latitude;
1537 return detector->handle->elevation;
1542 return detector->handle->armXazimuth;
1547 return detector->handle->armYazimuth;
1552 return detector->handle->armXaltitude;
1557 return detector->handle->armYaltitude;
1562 return detector->handle->armXmidpoint;
1567 return detector->handle->armYmidpoint;
1572 return detector->handle->localTime;
1581 FrHistoryFree(history);
1588 history = calloc(1,
sizeof(*history));
1591 history->classe = FrHistoryDef();
1592 history->time = floor(gpssec);
1593 if (
name && !(history->name = strdup(
name))) {
1597 if (!(history->comment = strdup(comment))) {
int XLALFrameUFrameHFrHistoryAdd_FrameL_(LALFrameUFrameH *frame, LALFrameUFrHistory *history)
int XLALFrameUFrDetectorQueryLocalTime_FrameL_(const LALFrameUFrDetector *detector)
LALFrameUFrameH * XLALFrameUFrameHRead_FrameL_(LALFrameUFrFile *stream, int pos)
const char * XLALFrameUFrDetectorQueryPrefix_FrameL_(const LALFrameUFrDetector *detector)
int XLALFrameUFrameHQueryRun_FrameL_(const LALFrameUFrameH *frame)
#define FR_FILE_HEADER_SIZE
size_t XLALFrameUFrTOCQuerySimN_FrameL_(const LALFrameUFrTOC *toc)
LALFrameUFrFile * XLALFrameUFrFileOpen_FrameL_(const char *filename, const char *mode)
int XLALFrameUFrameHQueryDataQuality_FrameL_(const LALFrameUFrameH *frame)
void XLALFrameUFrTOCFree_FrameL_(UNUSED LALFrameUFrTOC *toc)
void XLALFrameUFrHistoryFree_FrameL_(LALFrameUFrHistory *history)
int XLALFrameUFileCksumValid_FrameL_(LALFrameUFrFile *stream)
static FrSimData * XLALFrameUFrSimDataNew(const char *name)
const char * XLALFrameUFrTOCQuerySimName_FrameL_(const LALFrameUFrTOC *toc, size_t sim)
int XLALFrameUFrChanVectorCompress_FrameL_(LALFrameUFrChan *channel, int compressLevel)
static FrSimData * XLALFrSimDataCopy(const FrSimData *original)
int XLALFrameUFrChanVectorQueryCompress_FrameL_(const LALFrameUFrChan *channel)
int XLALFrameUFrameHQueryULeapS_FrameL_(const LALFrameUFrameH *frame)
double XLALFrameUFrDetectorQueryLongitude_FrameL_(const LALFrameUFrDetector *detector)
const char * XLALFrameUFrTOCQueryDetectorName_FrameL_(const LALFrameUFrTOC *toc, size_t det)
const char * XLALFrameUFrChanVectorQueryUnitY_FrameL_(const LALFrameUFrChan *channel)
LALFrameUFrameH * XLALFrameUFrameHAlloc_FrameL_(const char *name, double start1, double start2, double dt, int frnum)
const char * XLALFrameUFrChanVectorQueryName_FrameL_(const LALFrameUFrChan *channel)
size_t XLALFrameUFrTOCQueryNFrame_FrameL_(const LALFrameUFrTOC *toc)
const char * XLALFrameUFrChanVectorQueryUnitX_FrameL_(const LALFrameUFrChan *channel, size_t dim)
int XLALFrameUFrChanVectorExpand_FrameL_(LALFrameUFrChan *channel)
static FrProcData * XLALFrProcDataCopy(const FrProcData *original)
double XLALFrameUFrameHQueryGTimeModf_FrameL_(double *iptr, const LALFrameUFrameH *frame)
LALFrameUFrDetector * XLALFrameUFrDetectorRead_FrameL_(LALFrameUFrFile *stream, const char *name)
size_t XLALFrameUFrChanVectorQueryNData_FrameL_(const LALFrameUFrChan *channel)
int XLALFrameUFrameHFrDetectorAdd_FrameL_(LALFrameUFrameH *frame, LALFrameUFrDetector *detector)
LALFrameUFrChan * XLALFrameUFrChanRead_FrameL_(LALFrameUFrFile *stream, const char *name, size_t pos)
void * XLALFrameUFrChanVectorQueryData_FrameL_(const LALFrameUFrChan *channel)
void XLALFrameUFrDetectorFree_FrameL_(LALFrameUFrDetector *detector)
static FrProcData * XLALFrameUFrProcDataNew(const char *name)
size_t XLALFrameUFrTOCQueryDetectorN_FrameL_(const LALFrameUFrTOC *toc)
double XLALFrameUFrDetectorQueryArmXAltitude_FrameL_(const LALFrameUFrDetector *detector)
int XLALFrameUFrChanSetTRange_FrameL_(LALFrameUFrChan *channel, double tRange)
int XLALFrameUFrChanVectorSetUnitY_FrameL_(LALFrameUFrChan *channel, const char *unit)
size_t XLALFrameUFrChanVectorQueryNBytes_FrameL_(const LALFrameUFrChan *channel)
double XLALFrameUFrChanVectorQueryStartX_FrameL_(const LALFrameUFrChan *channel, size_t dim)
double XLALFrameUFrTOCQueryDt_FrameL_(const LALFrameUFrTOC *toc, size_t pos)
double XLALFrameUFrDetectorQueryLatitude_FrameL_(const LALFrameUFrDetector *detector)
int XLALFrameUFrChanVectorSetName_FrameL_(LALFrameUFrChan *channel, const char *name)
static FrAdcData * XLALFrAdcDataCopy(const FrAdcData *original)
LALFrameUFrHistory * XLALFrameUFrHistoryAlloc_FrameL_(const char *name, double gpssec, const char *comment)
static FrVect * XLALFrameUFrChanVectorPtr(const LALFrameUFrChan *channel)
int XLALFrameUFrChanVectorSetStartX_FrameL_(LALFrameUFrChan *channel, double x0)
LALFrameUFrChan * XLALFrameUFrProcChanAlloc_FrameL_(const char *name, int type, int subtype, int dtype, size_t ndata)
@ XLAL_FRAMEU_FR_CHAN_TYPE_ADC
@ XLAL_FRAMEU_FR_CHAN_TYPE_PROC
@ XLAL_FRAMEU_FR_CHAN_TYPE_SIM
double XLALFrameUFrTOCQueryGTimeModf_FrameL_(double *iptr, const LALFrameUFrTOC *toc, size_t pos)
static LALFrameUFrChan * XLALFrameUFrChanAlloc(const char *name, int chanType, int dataType, size_t ndata)
static FrAdcData * XLALFrameUFrAdcDataNew(const char *name, int type)
int XLALFrameUFrChanVectorSetDx_FrameL_(LALFrameUFrChan *channel, double dx)
int XLALFrameUFrameHSetRun_FrameL_(LALFrameUFrameH *frame, int run)
static int mytmpfd(char *tmpfname)
int XLALFrameUFrameHQueryFrame_FrameL_(const LALFrameUFrameH *frame)
LALFrameUFrChan * XLALFrameUFrSimChanAlloc_FrameL_(const char *name, int dtype, size_t ndata)
const char * XLALFrameUFrDetectorQueryName_FrameL_(const LALFrameUFrDetector *detector)
size_t XLALFrameUFrTOCQueryProcN_FrameL_(const LALFrameUFrTOC *toc)
double XLALFrameUFrChanVectorQueryDx_FrameL_(const LALFrameUFrChan *channel, size_t dim)
int XLALFrameUFrameHFrChanAdd_FrameL_(LALFrameUFrameH *frame, LALFrameUFrChan *channel)
double XLALFrameUFrDetectorQueryArmXMidpoint_FrameL_(const LALFrameUFrDetector *detector)
double XLALFrameUFrChanQueryTimeOffset_FrameL_(const LALFrameUFrChan *channel)
double XLALFrameUFrDetectorQueryArmYAzimuth_FrameL_(const LALFrameUFrDetector *detector)
size_t XLALFrameUFrChanVectorQueryNDim_FrameL_(const LALFrameUFrChan *channel)
int XLALFrameUFrameHWrite_FrameL_(LALFrameUFrFile *stream, LALFrameUFrameH *frame)
LALFrameUFrDetector * XLALFrameUFrDetectorAlloc_FrameL_(const char *name, const char *prefix, double latitude, double longitude, double elevation, double azimuthX, double azimuthY, double altitudeX, double altitudeY, double midpointX, double midpointY, int localTime)
int XLALFrameUFrChanVectorQueryType_FrameL_(const LALFrameUFrChan *channel)
int XLALFrameUFrChanSetTimeOffset_FrameL_(LALFrameUFrChan *channel, double timeOffset)
void XLALFrameUFrFileClose_FrameL_(LALFrameUFrFile *stream)
LALFrameUFrChan * XLALFrameUFrAdcChanAlloc_FrameL_(const char *name, int dtype, size_t ndata)
LALFrameUFrTOC * XLALFrameUFrTOCRead_FrameL_(LALFrameUFrFile *stream)
double XLALFrameUFrDetectorQueryArmYAltitude_FrameL_(const LALFrameUFrDetector *detector)
double XLALFrameUFrDetectorQueryArmYMidpoint_FrameL_(const LALFrameUFrDetector *detector)
static const char * XLALFrameLErrorMessage(FRERROR frerror)
const char * XLALFrameUFrameHQueryName_FrameL_(const LALFrameUFrameH *frame)
@ XLAL_FRAMEU_FR_FILE_MODE_W
@ XLAL_FRAMEU_FR_FILE_MODE_R
size_t XLALFrameUFrTOCQueryAdcN_FrameL_(const LALFrameUFrTOC *toc)
double XLALFrameUFrameHQueryDt_FrameL_(const LALFrameUFrameH *frame)
int XLALFrameUFrChanSetSampleRate_FrameL_(LALFrameUFrChan *channel, double sampleRate)
size_t XLALFrameUFrChanVectorQueryNx_FrameL_(const LALFrameUFrChan *channel, size_t dim)
static FrHistory * XLALFrHistoryCopy(const FrHistory *original)
const char * XLALFrameUFrChanQueryName_FrameL_(const LALFrameUFrChan *channel)
void XLALFrameUFrChanFree_FrameL_(LALFrameUFrChan *channel)
const char * XLALFrameUFrTOCQueryProcName_FrameL_(const LALFrameUFrTOC *toc, size_t proc)
double XLALFrameUFrDetectorQueryArmXAzimuth_FrameL_(const LALFrameUFrDetector *detector)
double XLALFrameUFrDetectorQueryElevation_FrameL_(const LALFrameUFrDetector *detector)
int XLALFrameUFrChanVectorAlloc_FrameL_(LALFrameUFrChan *channel, int dtype, size_t ndata)
int XLALFrameUFrChanVectorSetUnitX_FrameL_(LALFrameUFrChan *channel, const char *unit)
const char * XLALFrameUFrTOCQueryAdcName_FrameL_(const LALFrameUFrTOC *toc, size_t adc)
void XLALFrameUFrameHFree_FrameL_(LALFrameUFrameH *frame)
LALFrameUFrDetector * XLALFrameUFrDetectorAlloc(const char *name, const char *prefix, double latitude, double longitude, double elevation, double azimuthX, double azimuthY, double altitudeX, double altitudeY, double midpointX, double midpointY, int localTime)
Allocate memory for a new detector FrDetector structure.
void XLALFrameUFrChanFree(LALFrameUFrChan *channel)
Free a FrChan structure.
void XLALFrameUFrHistoryFree(LALFrameUFrHistory *history)
Free a FrHistory structure.
struct tagLALFrameUFrameH LALFrameUFrameH
Incomplete type for a frame header FrameH structure.
int XLALFrameUFrChanVectorAlloc(LALFrameUFrChan *channel, int dtype, size_t ndata)
Allocate memory for a FrVect structure within a FrChan structure.
struct tagLALFrameUFrHistory LALFrameUFrHistory
Incomplete type for a history data FrHistory structure.
void XLALFrameUFrDetectorFree(LALFrameUFrDetector *detector)
Free a FrDetector structure.
struct tagLALFrameUFrTOC LALFrameUFrTOC
Incomplete type for a table of contents FrTOC structure.
int XLALLeapSeconds(INT4 gpssec)
#define XLAL_ERROR_REAL8(...)
#define XLAL_ERROR_VAL(val,...)
#define XLAL_ERROR_NULL(...)
LIGOTimeGPS * XLALGPSSet(LIGOTimeGPS *epoch, INT4 gpssec, INT8 gpsnan)
REAL8 XLALGPSModf(REAL8 *iptr, const LIGOTimeGPS *epoch)
Incomplete type for a data channel FrChan structure.
union tagLALFrameUFrChan::@3 handle
Incomplete type for a detector data FrDetector structure.
Incomplete type for a frame file FrFile stream.