LALSimulation  5.4.0.1-fe68b98
check_series_macros.h File Reference

Go to the source code of this file.

Macros

#define LAL_CHECK_VALID_SERIES(s, val)
 
#define LAL_CHECK_CONSISTENT_TIME_SERIES(s1, s2, val)
 
#define LAL_CHECK_COMPATIBLE_TIME_SERIES(s1, s2, val)
 
#define LAL_CHECK_COMPATIBLE_BUT_UNIT_TIME_SERIES(s1, s2, val)
 

Macro Definition Documentation

◆ LAL_CHECK_VALID_SERIES

#define LAL_CHECK_VALID_SERIES (   s,
  val 
)
Value:
do { \
if ( !(s) ) XLAL_ERROR_VAL( val, XLAL_EFAULT ); \
if ( !(s)->data || !(s)->data->data || !(s)->data->length ) XLAL_ERROR_VAL( val, XLAL_EINVAL ); \
} while (0)
int s
Definition: bh_qnmode.c:137
sigmaKerr data[0]
#define XLAL_ERROR_VAL(val,...)
XLAL_EFAULT
XLAL_EINVAL

Definition at line 7 of file check_series_macros.h.

◆ LAL_CHECK_CONSISTENT_TIME_SERIES

#define LAL_CHECK_CONSISTENT_TIME_SERIES (   s1,
  s2,
  val 
)
Value:
do { \
if ( XLALGPSCmp( &(s1)->epoch, &(s2)->epoch ) != 0 ) XLAL_ERROR_VAL( val, XLAL_ETIME ); \
if ( fabs( (s1)->deltaT - (s2)->deltaT ) > LAL_REAL8_EPS ) XLAL_ERROR_VAL( val, XLAL_ETIME ); \
if ( fabs( (s1)->f0 - (s2)->f0 ) > LAL_REAL8_EPS ) XLAL_ERROR_VAL( val, XLAL_EFREQ ); \
if ( XLALUnitCompare( &(s1)->sampleUnits, &(s2)->sampleUnits ) ) XLAL_ERROR_VAL( val, XLAL_EUNIT ); \
if ( (s1)->data->length != (s1)->data->length ) XLAL_ERROR_VAL(val, XLAL_EBADLEN ); \
} while (0)
int XLALUnitCompare(const LALUnit *unit1, const LALUnit *unit2)
XLAL_EBADLEN
XLAL_EUNIT
XLAL_EFREQ
XLAL_ETIME
int XLALGPSCmp(const LIGOTimeGPS *t0, const LIGOTimeGPS *t1)
LIGOTimeGPS epoch
Definition: unicorn.c:20
double deltaT
Definition: unicorn.c:24

Definition at line 13 of file check_series_macros.h.

◆ LAL_CHECK_COMPATIBLE_TIME_SERIES

#define LAL_CHECK_COMPATIBLE_TIME_SERIES (   s1,
  s2,
  val 
)
Value:
do { \
if ( fabs( (s1)->deltaT - (s2)->deltaT ) > LAL_REAL8_EPS ) XLAL_ERROR_VAL( val, XLAL_ETIME ); \
if ( fabs( (s1)->f0 - (s2)->f0 ) > LAL_REAL8_EPS ) XLAL_ERROR_VAL( val, XLAL_EFREQ ); \
if ( XLALUnitCompare( &(s1)->sampleUnits, &(s2)->sampleUnits ) ) XLAL_ERROR_VAL( val, XLAL_EUNIT ); \
} while (0)

Definition at line 22 of file check_series_macros.h.

◆ LAL_CHECK_COMPATIBLE_BUT_UNIT_TIME_SERIES

#define LAL_CHECK_COMPATIBLE_BUT_UNIT_TIME_SERIES (   s1,
  s2,
  val 
)
Value:
do { \
if ( XLALGPSCmp( &(s1)->epoch, &(s2)->epoch ) != 0 ) XLAL_ERROR_VAL( val, XLAL_ETIME ); \
if ( fabs( (s1)->deltaT - (s2)->deltaT ) > LAL_REAL8_EPS ) XLAL_ERROR_VAL( val, XLAL_ETIME ); \
if ( fabs( (s1)->f0 - (s2)->f0 ) > LAL_REAL8_EPS ) XLAL_ERROR_VAL( val, XLAL_EFREQ ); \
if ( (s1)->data->length != (s1)->data->length ) XLAL_ERROR_VAL(val, XLAL_EBADLEN ); \
} while (0)

Definition at line 29 of file check_series_macros.h.