1#include <lal/LALSimInspiralTestGRParams.h>
2#include <lal/LALStatusMacros.h>
4int main(
int argc ,
char *argv[])
13 printf(
"Creating a new struct with one parameter...\n");
20 printf(
"Adding a second parameter to the struct...\n");
23 printf(
"Printing the struct after adding second parameter...\n");
26 printf(
"Get second parameter and print its value...\n");
30 printf(
"Setting first parameter to new value...\n");
34 printf(
"new value:%lf\n",
38 printf(
"Checking for existing first parameter and non-existent third parameter...\n");
39 printf(
"first_param:%d second_param:%d third_param:%d\n",
43 printf(
"Now add a third parameter...\n");
46 printf(
"first_param:%d second_param:%d third_param:%d\n",
52 printf(
"We print the struct as it appears now...\n");
57 printf(
"Trying to add a parameter that already exists...\n");
59 printf(
"This throws the above message and error code %d\n", errnum);
int main(int argc, char *argv[])
int XLALSimInspiralPrintTestGRParam(FILE *fp, LALSimInspiralTestGRParam *parameter)
Function that prints the whole test GR params linked list.
double XLALSimInspiralGetTestGRParam(const LALSimInspiralTestGRParam *parameter, const char *name)
Function that returns the value of the desired parameters in the test GR parameters linked list.
int XLALSimInspiralSetTestGRParam(LALSimInspiralTestGRParam *parameter, const char *name, const double value)
Function that sets the value of the desired parameter in the test GR parameters linked list to 'value...
int XLALSimInspiralAddTestGRParam(LALSimInspiralTestGRParam **parameter, const char *name, double value)
Function that adds a prameter to the test GR parameters linked list.
void XLALSimInspiralDestroyTestGRParam(LALSimInspiralTestGRParam *parameter)
Function that destroys the whole test GR params linked list.
bool XLALSimInspiralTestGRParamExists(const LALSimInspiralTestGRParam *parameter, const char *name)
Function that checks whether the requested parameter exists within the test GR parameters linked list...
#define XLAL_TRY(statement, errnum)
Linked list of any number of parameters for testing GR.