LALFrame 3.0.7.1-eeff03c
LALFrameU.c File Reference

Prototypes

static int XLALFrameLibrary (void)
 
void XLALFrameUFrFileClose (LALFrameUFrFile *stream)
 Close a FrFile stream. More...
 
LALFrameUFrFile * XLALFrameUFrFileOpen (const char *filename, const char *mode)
 Open a frame file FrFile stream. More...
 
int XLALFrameUFileCksumValid (LALFrameUFrFile *stream)
 Use checksum to determine if FrFile stream is valid. More...
 
void XLALFrameUFrTOCFree (LALFrameUFrTOC *toc)
 Free a FrTOC structure. More...
 
LALFrameUFrTOCXLALFrameUFrTOCRead (LALFrameUFrFile *stream)
 Read the table of contents FrTOC structure for a FrFile stream. More...
 
size_t XLALFrameUFrTOCQueryNFrame (const LALFrameUFrTOC *toc)
 Query FrTOC structure for number of FrameH structures contained. More...
 
double XLALFrameUFrTOCQueryGTimeModf (double *iptr, const LALFrameUFrTOC *toc, size_t pos)
 Query FrTOC structure for start time of a FrameH structure. More...
 
double XLALFrameUFrTOCQueryDt (const LALFrameUFrTOC *toc, size_t pos)
 Query FrTOC structure for duration of a FrameH structure. More...
 
size_t XLALFrameUFrTOCQueryAdcN (const LALFrameUFrTOC *toc)
 Query FrTOC structure for number of FrAdcData structures. More...
 
const char * XLALFrameUFrTOCQueryAdcName (const LALFrameUFrTOC *toc, size_t adc)
 Query FrTOC structure for the name of a FrAdcData structure. More...
 
size_t XLALFrameUFrTOCQuerySimN (const LALFrameUFrTOC *toc)
 Query FrTOC structure for number of FrSimData structures. More...
 
const char * XLALFrameUFrTOCQuerySimName (const LALFrameUFrTOC *toc, size_t sim)
 Query FrTOC structure for the name of a FrSimData structure. More...
 
size_t XLALFrameUFrTOCQueryProcN (const LALFrameUFrTOC *toc)
 Query FrTOC structure for number of FrProcData structures. More...
 
const char * XLALFrameUFrTOCQueryProcName (const LALFrameUFrTOC *toc, size_t proc)
 Query FrTOC structure for the name of a FrProcData structure. More...
 
size_t XLALFrameUFrTOCQueryDetectorN (const LALFrameUFrTOC *toc)
 Query FrTOC structure for number of FrDetector structures. More...
 
const char * XLALFrameUFrTOCQueryDetectorName (const LALFrameUFrTOC *toc, size_t det)
 Query FrTOC structure for the name of a FrDetector structure. More...
 
void XLALFrameUFrameHFree (LALFrameUFrameH *frame)
 Free a FrameH structure. More...
 
LALFrameUFrameHXLALFrameUFrameHAlloc (const char *name, double start1, double start2, double dt, int frnum)
 Allocate memory for a new frame header FrameH structure. More...
 
LALFrameUFrameHXLALFrameUFrameHRead (LALFrameUFrFile *stream, int pos)
 Read a frame header FrameH structure from a FrFile stream. More...
 
int XLALFrameUFrameHWrite (LALFrameUFrFile *stream, LALFrameUFrameH *frame)
 Write a FrameH structure to an output FrFile stream. More...
 
int XLALFrameUFrameHFrChanAdd (LALFrameUFrameH *frame, LALFrameUFrChan *channel)
 Add a FrChan structure to a FrameH structure. More...
 
int XLALFrameUFrameHFrDetectorAdd (LALFrameUFrameH *frame, LALFrameUFrDetector *detector)
 Add a FrDetector structure to a FrameH structure. More...
 
int XLALFrameUFrameHFrHistoryAdd (LALFrameUFrameH *frame, LALFrameUFrHistory *history)
 Add a FrHistory structure to a FrameH structure. More...
 
const char * XLALFrameUFrameHQueryName (const LALFrameUFrameH *frame)
 Query FrameH structure for its name. More...
 
int XLALFrameUFrameHQueryRun (const LALFrameUFrameH *frame)
 Query FrameH structure for the run number. More...
 
int XLALFrameUFrameHQueryFrame (const LALFrameUFrameH *frame)
 Query FrameH structure for the frame number. More...
 
int XLALFrameUFrameHQueryDataQuality (const LALFrameUFrameH *frame)
 Query FrameH structure for the data quality word. More...
 
double XLALFrameUFrameHQueryGTimeModf (double *iptr, const LALFrameUFrameH *frame)
 Query FrameH structure for the start time. More...
 
int XLALFrameUFrameHQueryULeapS (const LALFrameUFrameH *frame)
 Query FrameH structure for the number of leap seconds. More...
 
double XLALFrameUFrameHQueryDt (const LALFrameUFrameH *frame)
 Query FrameH structure for the duration. More...
 
int XLALFrameUFrameHSetRun (LALFrameUFrameH *frame, int run)
 Set the run number in a FrameH structure. More...
 
void XLALFrameUFrChanFree (LALFrameUFrChan *channel)
 Free a FrChan structure. More...
 
LALFrameUFrChan * XLALFrameUFrChanRead (LALFrameUFrFile *stream, const char *name, size_t pos)
 Read a channel FrChan structure from a FrFile stream. More...
 
LALFrameUFrChan * XLALFrameUFrAdcChanAlloc (const char *name, int dtype, size_t ndata)
 Allocate memory for a new FrChan structure of FrAdcData type. More...
 
LALFrameUFrChan * XLALFrameUFrSimChanAlloc (const char *name, int dtype, size_t ndata)
 Allocate memory for a new FrChan structure of FrSimData type. More...
 
LALFrameUFrChan * XLALFrameUFrProcChanAlloc (const char *name, int type, int subtype, int dtype, size_t ndata)
 Allocate memory for a new FrChan structure of FrAdcData type. More...
 
const char * XLALFrameUFrChanQueryName (const LALFrameUFrChan *channel)
 Query FrChan structure for its name. More...
 
double XLALFrameUFrChanQueryTimeOffset (const LALFrameUFrChan *channel)
 Query FrChan structure for time offset for this channel. More...
 
int XLALFrameUFrChanSetSampleRate (LALFrameUFrChan *channel, double sampleRate)
 Set the sample rate in a FrChan structure. More...
 
int XLALFrameUFrChanSetTimeOffset (LALFrameUFrChan *channel, double timeOffset)
 Set the time offset in a FrChan structure. More...
 
int XLALFrameUFrChanSetTRange (LALFrameUFrChan *channel, double tRange)
 Set the time range in a FrChan structure. More...
 
int XLALFrameUFrChanVectorAlloc (LALFrameUFrChan *channel, int dtype, size_t ndata)
 Allocate memory for a FrVect structure within a FrChan structure. More...
 
int XLALFrameUFrChanVectorCompress (LALFrameUFrChan *channel, int compressLevel)
 Compress a FrVect structure within a FrChan structure. More...
 
int XLALFrameUFrChanVectorExpand (LALFrameUFrChan *channel)
 Expands a FrVect structure within a FrChan structure. More...
 
const char * XLALFrameUFrChanVectorQueryName (const LALFrameUFrChan *channel)
 Query FrChan structure for the name of its FrVect structure. More...
 
int XLALFrameUFrChanVectorQueryCompress (const LALFrameUFrChan *channel)
 Query FrChan structure for the compression scheme of its FrVect structure. More...
 
int XLALFrameUFrChanVectorQueryType (const LALFrameUFrChan *channel)
 Query FrChan structure for the data type of its FrVect structure. More...
 
void * XLALFrameUFrChanVectorQueryData (const LALFrameUFrChan *channel)
 Query FrChan structure for the data pointer in its FrVect structure. More...
 
size_t XLALFrameUFrChanVectorQueryNBytes (const LALFrameUFrChan *channel)
 Query FrChan structure for the number of bytes of data in its FrVect structure. More...
 
size_t XLALFrameUFrChanVectorQueryNData (const LALFrameUFrChan *channel)
 Query FrChan structure for the number of points of data in its FrVect structure. More...
 
size_t XLALFrameUFrChanVectorQueryNDim (const LALFrameUFrChan *channel)
 Query FrChan structure for the number of dimensions of the multi-dimensional data in its FrVect structure. More...
 
size_t XLALFrameUFrChanVectorQueryNx (const LALFrameUFrChan *channel, size_t dim)
 Query FrChan structure for the number of points in the dim dimension of the multi-dimensional data in the FrVect structure. More...
 
double XLALFrameUFrChanVectorQueryDx (const LALFrameUFrChan *channel, size_t dim)
 Query FrChan structure for the sampling interval in the dim dimension of the multi-dimensional data in the FrVect structure. More...
 
double XLALFrameUFrChanVectorQueryStartX (const LALFrameUFrChan *channel, size_t dim)
 Query FrChan structure for the starting value of the dim dimension of the multi-dimensional data in the FrVect structure. More...
 
const char * XLALFrameUFrChanVectorQueryUnitX (const LALFrameUFrChan *channel, size_t dim)
 Query FrChan structure for the units of the domain of the dim dimension of the multi-dimensional data in the FrVect structure. More...
 
const char * XLALFrameUFrChanVectorQueryUnitY (const LALFrameUFrChan *channel)
 Query FrChan structure for sample units of the data in the FrVect structure. More...
 
int XLALFrameUFrChanVectorSetName (LALFrameUFrChan *channel, const char *name)
 Set the name of the FrVect structure contained in a FrChan structure. More...
 
int XLALFrameUFrChanVectorSetDx (LALFrameUFrChan *channel, double dx)
 Set the sampling interval for the data in the FrVect structure contained in a FrChan structure. More...
 
int XLALFrameUFrChanVectorSetStartX (LALFrameUFrChan *channel, double x0)
 Set the starting value for the domain of the data in the FrVect structure contained in a FrChan structure. More...
 
int XLALFrameUFrChanVectorSetUnitX (LALFrameUFrChan *channel, const char *unit)
 Set the units of the domain of the data in the FrVect structure contained in a FrChan structure. More...
 
int XLALFrameUFrChanVectorSetUnitY (LALFrameUFrChan *channel, const char *unit)
 Set the units of the data in the FrVect structure contained in a FrChan structure. More...
 
void XLALFrameUFrDetectorFree (LALFrameUFrDetector *detector)
 Free a FrDetector structure. More...
 
LALFrameUFrDetector * XLALFrameUFrDetectorRead (LALFrameUFrFile *stream, const char *name)
 Read a detector FrDetector structure from a FrFile stream. More...
 
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. More...
 
const char * XLALFrameUFrDetectorQueryName (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector name. More...
 
const char * XLALFrameUFrDetectorQueryPrefix (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector prefix. More...
 
double XLALFrameUFrDetectorQueryLongitude (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector longitude. More...
 
double XLALFrameUFrDetectorQueryLatitude (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector latitude. More...
 
double XLALFrameUFrDetectorQueryElevation (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector elevation. More...
 
double XLALFrameUFrDetectorQueryArmXAzimuth (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector x-arm azimuth. More...
 
double XLALFrameUFrDetectorQueryArmYAzimuth (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector y-arm azimuth. More...
 
double XLALFrameUFrDetectorQueryArmXAltitude (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector x-arm altitude. More...
 
double XLALFrameUFrDetectorQueryArmYAltitude (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector y-arm altitude. More...
 
double XLALFrameUFrDetectorQueryArmXMidpoint (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector x-arm midpoint. More...
 
double XLALFrameUFrDetectorQueryArmYMidpoint (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the detector y-arm midpoint. More...
 
int XLALFrameUFrDetectorQueryLocalTime (const LALFrameUFrDetector *detector)
 Query FrDetector structure for the local time offset at the detector. More...
 
void XLALFrameUFrHistoryFree (LALFrameUFrHistory *history)
 Free a FrHistory structure. More...
 
LALFrameUFrHistoryXLALFrameUFrHistoryAlloc (const char *name, double gpssec, const char *comment)
 Allocate memory for a new detector FrHistory structure. More...
 

Go to the source code of this file.

Macros

#define CASE_FRAMEL(errval, function, ...)   case LAL_FRAMEU_FRAME_LIBRARY_FRAMEL: XLAL_ERROR_VAL(errval, XLAL_EERR, "FrameL library unavailable")
 
#define CASE_FRAMEC(errval, function, ...)   case LAL_FRAMEU_FRAME_LIBRARY_FRAMEC: XLAL_ERROR_VAL(errval, XLAL_EERR, "FrameC library unavailable")
 
#define LAL_FRAMEU_FRAME_LIBRARY_DEFAULT   LAL_FRAMEU_FRAME_LIBRARY_UNAVAILABLE
 
#define FRAME_LIBRARY_SELECT_VAL(errval, function, ...)
 
#define FRAME_LIBRARY_SELECT_VOID(function, ...)   FRAME_LIBRARY_SELECT_VAL(/*void*/, function, __VA_ARGS__)
 
#define FRAME_LIBRARY_SELECT_NULL(function, ...)   FRAME_LIBRARY_SELECT_VAL(NULL, function, __VA_ARGS__)
 
#define FRAME_LIBRARY_SELECT_REAL8(function, ...)   FRAME_LIBRARY_SELECT_VAL(XLAL_REAL8_FAIL_NAN, function, __VA_ARGS__)
 
#define FRAME_LIBRARY_SELECT(function, ...)   FRAME_LIBRARY_SELECT_VAL(XLAL_FAILURE, function, __VA_ARGS__)
 

Enumerations

enum  { LAL_FRAMEU_FRAME_LIBRARY_UNAVAILABLE , LAL_FRAMEU_FRAME_LIBRARY_FRAMEL , LAL_FRAMEU_FRAME_LIBRARY_FRAMEC }
 

Macro Definition Documentation

◆ CASE_FRAMEL

#define CASE_FRAMEL (   errval,
  function,
  ... 
)    case LAL_FRAMEU_FRAME_LIBRARY_FRAMEL: XLAL_ERROR_VAL(errval, XLAL_EERR, "FrameL library unavailable")

Definition at line 41 of file LALFrameU.c.

◆ CASE_FRAMEC

#define CASE_FRAMEC (   errval,
  function,
  ... 
)    case LAL_FRAMEU_FRAME_LIBRARY_FRAMEC: XLAL_ERROR_VAL(errval, XLAL_EERR, "FrameC library unavailable")

Definition at line 52 of file LALFrameU.c.

◆ LAL_FRAMEU_FRAME_LIBRARY_DEFAULT

#define LAL_FRAMEU_FRAME_LIBRARY_DEFAULT   LAL_FRAMEU_FRAME_LIBRARY_UNAVAILABLE

Definition at line 58 of file LALFrameU.c.

◆ FRAME_LIBRARY_SELECT_VAL

#define FRAME_LIBRARY_SELECT_VAL (   errval,
  function,
  ... 
)
Value:
do { \
switch (XLALFrameLibrary()) { \
CASE_FRAMEL(errval, function, __VA_ARGS__); \
CASE_FRAMEC(errval, function, __VA_ARGS__); \
default: \
XLAL_ERROR_VAL(errval, XLAL_EERR, "No frame library available"); \
} \
} while (0)
static int XLALFrameLibrary(void)
Definition: LALFrameU.c:84
XLAL_EERR

Definition at line 62 of file LALFrameU.c.

◆ FRAME_LIBRARY_SELECT_VOID

#define FRAME_LIBRARY_SELECT_VOID (   function,
  ... 
)    FRAME_LIBRARY_SELECT_VAL(/*void*/, function, __VA_ARGS__)

Definition at line 72 of file LALFrameU.c.

◆ FRAME_LIBRARY_SELECT_NULL

#define FRAME_LIBRARY_SELECT_NULL (   function,
  ... 
)    FRAME_LIBRARY_SELECT_VAL(NULL, function, __VA_ARGS__)

Definition at line 73 of file LALFrameU.c.

◆ FRAME_LIBRARY_SELECT_REAL8

#define FRAME_LIBRARY_SELECT_REAL8 (   function,
  ... 
)    FRAME_LIBRARY_SELECT_VAL(XLAL_REAL8_FAIL_NAN, function, __VA_ARGS__)

Definition at line 74 of file LALFrameU.c.

◆ FRAME_LIBRARY_SELECT

#define FRAME_LIBRARY_SELECT (   function,
  ... 
)    FRAME_LIBRARY_SELECT_VAL(XLAL_FAILURE, function, __VA_ARGS__)

Definition at line 75 of file LALFrameU.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LAL_FRAMEU_FRAME_LIBRARY_UNAVAILABLE 
LAL_FRAMEU_FRAME_LIBRARY_FRAMEL 
LAL_FRAMEU_FRAME_LIBRARY_FRAMEC 

Definition at line 27 of file LALFrameU.c.

Function Documentation

◆ XLALFrameLibrary()

static int XLALFrameLibrary ( void  )
static

Definition at line 84 of file LALFrameU.c.