Commit 9d55edac authored by Reinhard Prix's avatar Reinhard Prix

Replaced all empty_XXX initializers by XLAL_INIT_MEM()/XLAL_INIT_DECL() macros

- closes #1091
Original: 47e2b0d0a728ab658f1746564676a1335d7191ce
parent 69407b06
......@@ -72,11 +72,10 @@ extern "C" {
* REAL8 specialGeekSwitch;
* } UserInput_t;
*
* UserInput_t empty_UserInput; // this is zero-intialized!
*
* int main(int argc,char *argv[])
* {
* UserInput_t UserVariables = empty_UserInput; // initializes this struct to {0}
* UserInput_t XLAL_INIT_DECL(UserVariables); // initializes this struct to {0}
* UserInput_t *uvar = &UserVariables; // struct-pointer allows us to use the XLALreg<TYPE>UserStruct() macros...
*
* // 1. step: set default-values for optional user-input variables
......
......@@ -39,7 +39,6 @@ typedef struct
INT4 dummy;
} UserInput_t;
UserInput_t empty_UserInput_t;
#define TESTSTRING "this is also possible, and # here does nothing "
const char *cfgfile_content = \
......@@ -76,7 +75,7 @@ main(int argc, char *argv[])
#define CFG_FNAME "ConfigFile.cfg"
char **my_argv;
const char *argv_in[] = { "progname", "--argNum=1", "--argStr=xyz", "--argBool=true", "-a", "1", "-b", "@" CFG_FNAME };
UserInput_t my_uvars = empty_UserInput_t;
UserInput_t XLAL_INIT_DECL(my_uvars);
if ( argc > 1 ) {
XLALPrintError ("No input arguments allowed.\n");
......
......@@ -28,8 +28,6 @@
/*---------- DEFINES ----------*/
/*---------- internal types ----------*/
/*---------- empty initializers ---------- */
const LALStringVector empty_LALStringVector;
/*---------- Global variables ----------*/
/*---------- internal prototypes ----------*/
......
......@@ -201,8 +201,6 @@ int XLALREAL4TimeSeriesToFrame(CHAR *outdir,REAL4TimeSeries *ts,FrameCombination
int XLALReadFrameHistory(CHAR **history_string, FrFile *file);
/***********************************************************************************************/
/* empty initializers */
UserInput_t empty_UserInput;
/**
* The main function of xtefitstoframe.c
......@@ -212,8 +210,8 @@ UserInput_t empty_UserInput;
*/
int main( int argc, char *argv[] )
{
LALStatus status = blank_status; /* empty LAL status structure */
UserInput_t uvar = empty_UserInput; /* user input variables */
LALStatus XLAL_INIT_DECL(status); /* empty LAL status structure */
UserInput_t XLAL_INIT_DECL(uvar); /* user input variables */
FrameChannelList *framechannels = NULL; /* list of input frame channels */
GoodPCUIntervals *pcu = NULL; /* the operational pcu count */
CHAR clargs[LONGSTRINGLENGTH]; /* store the command line args */
......
......@@ -123,8 +123,6 @@ int XLALReadFrameHistory(CHAR **history_string, FrFile *file);
int XLALReadXTEFrameINT4Keyword(INT4 *value, CHAR *filename, const CHAR *keyword);
/***********************************************************************************************/
/* empty initializers */
UserInput_t empty_UserInput;
/**
* The main function of framestats.c
......@@ -135,7 +133,7 @@ UserInput_t empty_UserInput;
int main( int argc, char *argv[] )
{
LALStatus status = blank_status; /* empty LAL status structure */
UserInput_t uvar = empty_UserInput; /* user input variables */
UserInput_t XLAL_INIT_DECL(uvar); /* user input variables */
glob_t filelist; /* stores the matching frame file names */
StatsVector stats; /* a structure containing statistical info */
INT4 i; /* counter */
......
......@@ -332,8 +332,6 @@ int XLALReallocXTEUINT4TimeSeries(XTEUINT4TimeSeries **ts,INT8 N);
int XLALFreeBarycentricData(BarycentricData *stamps);
/***********************************************************************************************/
/* empty initializers */
UserInput_t empty_UserInput;
/**
* The main function of xtefitstoframe.c
......@@ -346,7 +344,7 @@ int main( int argc, char *argv[] ) {
static const char *fn = __func__; /* store function name for log output */
LALStatus status = blank_status; /* empty LAL status structure */
UserInput_t uvar = empty_UserInput; /* user input variables */
UserInput_t XLAL_INIT_DECL(uvar); /* user input variables */
FITSData *fitsdata = NULL; /* a FITS data structure */
XTEUINT4TimeSeriesArray *ts = NULL; /* a timeseries array structure */
CHAR clargs[LONGSTRINGLENGTH]; /* store the command line args */
......
......@@ -274,8 +274,8 @@ int main( int argc, char *argv[] )
CHAR nameArrayCData[6][LALNameLength];
DopplerSkyScanInit scanInit = empty_DopplerSkyScanInit; /* init-structure for DopperScanner */
DopplerSkyScanState thisScan = empty_DopplerSkyScanState; /* current state of the Doppler-scan */
DopplerSkyScanInit XLAL_INIT_DECL(scanInit); /* init-structure for DopperScanner */
DopplerSkyScanState XLAL_INIT_DECL(thisScan); /* current state of the Doppler-scan */
const DopplerSkyGrid *skyGrid;
UINT4 threeSiteCase = 0;
......
......@@ -142,12 +142,6 @@ int createTopHat(ParamStruct *userParams, VectorStruct *tophat, ExRegion *exr);
int ComputeCstat(VectorStruct *template, VectorStruct *Fstat, VectorStruct *Cstat, ExRegion *exr);
int OutputCstats(UserInput_t *uvar, ParamStruct *userParams, VectorStruct *Fstat, VectorStruct *Cstat, ExRegion *exr);
/* empty initializers */
UserInput_t empty_UserInput;
VectorStruct empty_VectorStruct;
ParamStruct empty_ParamStruct;
ExRegion empty_ExRegion;
/***********************************************************************************************/
/* Function definitions */
......@@ -162,12 +156,12 @@ ExRegion empty_ExRegion;
int main(int argc,char *argv[])
{
static const char *fn = __func__; /* store function name for log output */
UserInput_t uvar = empty_UserInput; /* global container for user variables */
ParamStruct userParams = empty_ParamStruct; /* initialise paramStruct for search parameters, set by user */
VectorStruct Fstat = empty_VectorStruct; /* initialise Fstat structure */
VectorStruct Cstat = empty_VectorStruct; /* initialise Cstat structure */
VectorStruct template = empty_VectorStruct; /* initialise template structure */
ExRegion exr = empty_ExRegion; /* initialise the exclusion region structure */
UserInput_t XLAL_INIT_DECL(uvar); /* global container for user variables */
ParamStruct XLAL_INIT_DECL(userParams); /* initialise paramStruct for search parameters, set by user */
VectorStruct XLAL_INIT_DECL(Fstat); /* initialise Fstat structure */
VectorStruct XLAL_INIT_DECL(Cstat); /* initialise Cstat structure */
VectorStruct XLAL_INIT_DECL(template); /* initialise template structure */
ExRegion XLAL_INIT_DECL(exr); /* initialise the exclusion region structure */
vrbflg = 1; /* verbose error-messages */
......
......@@ -91,8 +91,6 @@ typedef struct {
BOOLEAN version; /**< output version-info */
} UserInput_t;
static UserInput_t empty_UserInput;
/* ---------- local prototypes ---------- */
int main(int argc, char *argv[]);
......@@ -109,8 +107,8 @@ void LoadInputSFTs ( LALStatus *status, InputSFTData *data, const UserInput_t *u
*/
int main(int argc, char *argv[])
{
UserInput_t uvar = empty_UserInput;
LALStatus status = blank_status; /* initialize status */
UserInput_t XLAL_INIT_DECL(uvar);
LALStatus XLAL_INIT_DECL(status);
InputSFTData inputData; /**< container for input-data and its meta-info */
SFTtype *outputLFT = NULL; /**< output 'Long Fourier Transform */
MultiSFTVector *SSBmultiSFTs = NULL; /**< SFT vector transferred to the SSB */
......@@ -274,7 +272,7 @@ LoadInputSFTs ( LALStatus *status, InputSFTData *sftData, const UserInput_t *uva
{
static const CHAR *fn = "LoadInputSFTs()";
SFTCatalog *catalog = NULL;
SFTConstraints constraints = empty_SFTConstraints;
SFTConstraints XLAL_INIT_DECL(constraints);
LIGOTimeGPS minStartTimeGPS, maxEndTimeGPS;
MultiSFTVector *multiSFTs = NULL; /* multi-IFO SFT-vectors */
......
......@@ -98,7 +98,7 @@ int main(int argc, char *argv[]) {
gsl_matrix *mism_hist = NULL;
SFTCatalog *catalog = NULL;
MultiSFTVector *sfts = NULL;
EphemerisData ephemeris = empty_EphemerisData;
EphemerisData XLAL_INIT_DECL(ephemeris);
MultiDetectorStateSeries *detector_states = NULL;
MultiPSDVector *rng_med = NULL;
MultiNoiseWeights *noise_weights = NULL;
......@@ -228,7 +228,7 @@ int main(int argc, char *argv[]) {
/* Load the SFTs */
{
SFTConstraints constraints = empty_SFTConstraints;
SFTConstraints XLAL_INIT_DECL(constraints);
REAL8 extra = 0.0, f_min = 0.0, f_max = 0.0;
/* Load the catalog */
......@@ -631,7 +631,7 @@ BOOLEAN calc_AM_coeffs(
{
MultiAMCoeffs *AM_coeffs = NULL;
SkyPosition sky = empty_SkyPosition;
SkyPosition XLAL_INIT_DECL(sky);
/* Generate a random sky position */
sky.system = COORDINATESYSTEM_EQUATORIAL;
......
......@@ -294,8 +294,6 @@ INT4 cfsRunNo = 0; /**< CFS run-number: 0=run only once, 1=first run, 2=second r
toplist_t* toplist = NULL;
char *fstatbuff = NULL;
FstatOutputEntry empty_FstatOutputEntry;
INT4 maxSFTindex = 0;
/*----------------------------------------------------------------------*/
......@@ -438,13 +436,13 @@ int main(int argc,char *argv[])
INT4 *maxIndex=NULL; /* array that contains indexes of maximum of each cluster */
INT4 spdwn; /* counter over spindown-params */
DopplerSkyScanState thisScan = empty_DopplerSkyScanState; /* current state of the Doppler-scan */
DopplerSkyScanState XLAL_INIT_DECL(thisScan); /* current state of the Doppler-scan */
PulsarDopplerParams dopplerpos; /* current search-parameters */
SkyPosition thisPoint;
UINT4 loopcounter; /* Checkpoint-counters for restarting checkpointed search */
long fstat_bytecounter;
UINT4 fstat_checksum = 0; /* Checksum of fstats file contents */
FstatOutputEntry loudest = empty_FstatOutputEntry; /* loudest canidate in search-region */
FstatOutputEntry XLAL_INIT_DECL(loudest); /* loudest canidate in search-region */
#ifdef RUN_POLKA
INT4 fstats_completed = FALSE; /* did we find a completed fstats file? */
......@@ -1003,7 +1001,7 @@ int main(int argc,char *argv[])
if (uvar_outputFstat || uvar_outputLoudest)
{
INT4 i;
FstatOutputEntry outputLine = empty_FstatOutputEntry;
FstatOutputEntry XLAL_INIT_DECL(outputLine);
for(i=0;i < GV.FreqImax ;i++)
{
......@@ -4184,7 +4182,7 @@ InitSearchGrid ( LALStatus *status,
DopplerSkyScanState *scan,
ConfigVariables *cfg)
{
DopplerSkyScanInit scanInit = empty_DopplerSkyScanInit; /* init-structure for DopperScanner */
DopplerSkyScanInit XLAL_INIT_DECL(scanInit); /* init-structure for DopperScanner */
INITSTATUS(status);
ATTATCHSTATUSPTR (status);
......
......@@ -317,10 +317,6 @@ typedef struct {
/*---------- Global variables ----------*/
extern int vrbflg; /**< defined in lalapps.c */
/* empty initializers */
static UserInput_t empty_UserInput;
static timingInfo_t empty_timingInfo;
/* ---------- local prototypes ---------- */
int main(int argc,char *argv[]);
void initUserVars (LALStatus *, UserInput_t *uvar);
......@@ -348,10 +344,6 @@ void XLALDestroyScanlineWindow ( scanlineWindow_t *scanlineWindow );
int XLALAdvanceScanlineWindow ( const FstatCandidate *nextCand, scanlineWindow_t *scanWindow );
BOOLEAN XLALCenterIsLocalMax ( const scanlineWindow_t *scanWindow, const UINT4 sortingStatistic );
/*---------- empty initializers ---------- */
static const ConfigVariables empty_ConfigVariables;
static const FstatCandidate empty_FstatCandidate;
/* ----- which timing function to use ----- */
#ifdef HIGHRES_TIMING
REAL8 XLALGetUserCPUTime ( void );
......@@ -376,13 +368,14 @@ int main(int argc,char *argv[])
FILE *fpFstat = NULL, *fpTransientStats = NULL;
REAL8 numTemplates, templateCounter;
time_t clock0;
PulsarDopplerParams dopplerpos = empty_PulsarDopplerParams; /* current search-parameters */
FstatCandidate loudestFCand = empty_FstatCandidate, thisFCand = empty_FstatCandidate;
PulsarDopplerParams XLAL_INIT_DECL(dopplerpos);
FstatCandidate XLAL_INIT_DECL(loudestFCand);
FstatCandidate XLAL_INIT_DECL(thisFCand);
FILE *fpLogPrintf = NULL;
gsl_vector_int *Fstat_histogram = NULL;
UserInput_t uvar = empty_UserInput;
ConfigVariables GV = empty_ConfigVariables; /**< global container for various derived configuration settings */
UserInput_t XLAL_INIT_DECL(uvar);
ConfigVariables XLAL_INIT_DECL(GV);
vrbflg = 1; /* verbose error-messages */
......@@ -535,7 +528,7 @@ int main(int argc,char *argv[])
clock0 = time(NULL);
REAL8 tic0, tic, toc, timeOfLastProgressUpdate = 0; // high-precision timing counters
timingInfo_t timing = empty_timingInfo; // timings of Fstatistic computation, transient Fstat-map, transient Bayes factor
timingInfo_t XLAL_INIT_DECL(timing); // timings of Fstatistic computation, transient Fstat-map, transient Bayes factor
timing.NSFTs = GV.NSFTs;
/* fixed time-offset between internalRefTime and refTime */
......@@ -791,7 +784,7 @@ int main(int argc,char *argv[])
/* ----- compute transient-CW statistics if their output was requested ----- */
if ( fpTransientStats )
{
transientCandidate_t transientCand = empty_transientCandidate;
transientCandidate_t XLAL_INIT_DECL(transientCand);
/* compute Fstat map F_mn over {t0, tau} */
tic = GETTIME();
......@@ -946,7 +939,7 @@ int main(int argc,char *argv[])
if ( uvar.outputLoudest )
{
FILE *fpLoudest;
PulsarCandidate pulsarParams = empty_PulsarCandidate;
PulsarCandidate XLAL_INIT_DECL(pulsarParams);
pulsarParams.Doppler = loudestFCand.doppler;
if ( XLALEstimatePulsarAmplitudeParams ( &pulsarParams, &loudestFCand.FaFb_refTime, loudestFCand.Fa, loudestFCand.Fb, &loudestFCand.Mmunu )
......@@ -1255,9 +1248,9 @@ InitFStat ( LALStatus *status, ConfigVariables *cfg, const UserInput_t *uvar )
{
REAL8 fCoverMin, fCoverMax; /* covering frequency-band to read from SFTs */
SFTCatalog *catalog = NULL;
SFTConstraints constraints = empty_SFTConstraints;
LIGOTimeGPS minStartTimeGPS = empty_LIGOTimeGPS;
LIGOTimeGPS maxStartTimeGPS = empty_LIGOTimeGPS;
SFTConstraints XLAL_INIT_DECL(constraints);
LIGOTimeGPS XLAL_INIT_DECL(minStartTimeGPS);
LIGOTimeGPS XLAL_INIT_DECL(maxStartTimeGPS);
LIGOTimeGPS endTime;
size_t toplist_length = uvar->NumCandidatesToKeep;
......
......@@ -143,8 +143,6 @@ typedef struct {
} UserInput_t;
static UserInput_t empty_UserInput;
/* ---------- local prototypes ---------- */
int main(int argc,char *argv[]);
......@@ -166,7 +164,7 @@ int main(int argc,char *argv[])
LALStatus status = blank_status; /* initialize status */
REAL8 rho2; /* SNR^2 */
UserInput_t uvar = empty_UserInput;
UserInput_t XLAL_INIT_DECL(uvar);
CHAR *VCSInfoString; /**< LAL + LALapps Git version string */
vrbflg = 1; /* verbose error-messages */
......@@ -351,7 +349,7 @@ InitPFS ( LALStatus *status, ConfigVariables *cfg, const UserInput_t *uvar )
static const char *fn = "InitPFS()";
SFTCatalog *catalog = NULL;
SFTConstraints constraints = empty_SFTConstraints;
SFTConstraints XLAL_INIT_DECL(constraints);
SkyPosition skypos;
LIGOTimeGPS minStartTimeGPS, maxStartTimeGPS;
......
......@@ -198,7 +198,7 @@ typedef struct {
scanlineWindow_t *scanlineWindow; /**< moving window of candidates on scanline to find local maxima */
} ConfigVariables;
LALUnit empty_Unit;
LALUnit emptyUnit;
/*---------- Global variables ----------*/
extern UINT4 vrbflg; /**< defined in lalapps.c */
......@@ -398,12 +398,6 @@ void XLALDestroyScanlineWindow ( scanlineWindow_t *scanlineWindow );
int XLALAdvanceScanlineWindow ( const FstatCandidate *nextCand, scanlineWindow_t *scanWindow );
BOOLEAN XLALCenterIsLocalMax ( const scanlineWindow_t *scanWindow );
/*---------- empty initializers ---------- */
static const ConfigVariables empty_ConfigVariables;
static const FstatCandidate empty_FstatCandidate;
static const ReSampBuffer empty_ReSampBuffer;
/*----------------------------------------------------------------------*/
/* Function definitions start here */
/*----------------------------------------------------------------------*/
......@@ -420,14 +414,15 @@ int main(int argc,char *argv[])
FILE *fpFstat = NULL;
FILE *fpTSeries = NULL;
ReSampBuffer Buffer = empty_ReSampBuffer;
ReSampBuffer XLAL_INIT_DECL(Buffer);
REAL8 numTemplates, templateCounter;
REAL8 tickCounter;
time_t clock0;
PulsarDopplerParams dopplerpos = empty_PulsarDopplerParams; /* current search-parameters */
FstatCandidate loudestFCand = empty_FstatCandidate, thisFCand = empty_FstatCandidate;
PulsarDopplerParams XLAL_INIT_DECL(dopplerpos); /* current search-parameters */
FstatCandidate XLAL_INIT_DECL(loudestFCand);
FstatCandidate XLAL_INIT_DECL(thisFCand);
UINT4 k;
ConfigVariables GV = empty_ConfigVariables; /**< global container for various derived configuration settings */
ConfigVariables XLAL_INIT_DECL(GV); /**< global container for various derived configuration settings */
REAL8FrequencySeries *fstatVector = Buffer.fstatVector;
Resamp_Variables Vars;
gsl_vector_int *Fstat_histogram = NULL;
......@@ -677,7 +672,7 @@ int main(int argc,char *argv[])
if ( uvar_outputLoudest )
{
FILE *fpLoudest;
PulsarCandidate pulsarParams = empty_PulsarCandidate;
PulsarCandidate XLAL_INIT_DECL(pulsarParams);
pulsarParams.Doppler = loudestFCand.doppler;
// deactivated the following call, which is defunct: this function requires {Fa,Fb} in loudestFCand.Fstat, but this is not
......@@ -921,10 +916,10 @@ InitFStat ( LALStatus *status, ConfigVariables *cfg )
{
REAL8 fCoverMin, fCoverMax; /* covering frequency-band to read from SFTs */
SFTCatalog *catalog = NULL;
SFTConstraints constraints = empty_SFTConstraints;
LIGOTimeGPS minStartTimeGPS = empty_LIGOTimeGPS;
LIGOTimeGPS maxStartTimeGPS = empty_LIGOTimeGPS;
PulsarSpinRange spinRangeRef = empty_PulsarSpinRange;
SFTConstraints XLAL_INIT_DECL(constraints);
LIGOTimeGPS XLAL_INIT_DECL(minStartTimeGPS);
LIGOTimeGPS XLAL_INIT_DECL(maxStartTimeGPS);
PulsarSpinRange XLAL_INIT_DECL(spinRangeRef);
UINT4 numSFTs;
LIGOTimeGPS startTime, endTime;
......@@ -1112,8 +1107,8 @@ InitFStat ( LALStatus *status, ConfigVariables *cfg )
}
{ /* ----- set up Doppler region (at internalRefTime) to scan ----- */
LIGOTimeGPS internalRefTime = empty_LIGOTimeGPS;
PulsarSpinRange spinRangeInt = empty_PulsarSpinRange;
LIGOTimeGPS XLAL_INIT_DECL(internalRefTime);
PulsarSpinRange XLAL_INIT_DECL(spinRangeInt);
BOOLEAN haveAlphaDelta = (LALUserVarWasSet(&uvar_Alpha) && LALUserVarWasSet(&uvar_Delta)) || (LALUserVarWasSet(&uvar_RA) && LALUserVarWasSet(&uvar_Dec));
/* define sky position variables from user input */
......@@ -2666,7 +2661,7 @@ void ComputeFStat_resamp(LALStatus *status, const PulsarDopplerParams *doppler,
UINT4 numFreqBins = floor(uvar_FreqBand/dF_closest + 0.5);
if(Buffer->fstatVector)
XLALDestroyREAL8FrequencySeries(Buffer->fstatVector);
fstatVector = XLALCreateREAL8FrequencySeries ("Fstat vector", &doppler->refTime, doppler->fkdot[0], dF_closest, &empty_Unit, numFreqBins );
fstatVector = XLALCreateREAL8FrequencySeries ("Fstat vector", &doppler->refTime, doppler->fkdot[0], dF_closest, &emptyUnit, numFreqBins );
Buffer->fstatVector = fstatVector;
}
......
......@@ -18,12 +18,6 @@
#include<zlib.h>
#include<gsl/gsl_blas.h>
/*---------- empty initializers ---------- */
LALStatus empty_status;
SFTConstraints empty_constraints;
/*---------- Global variables ----------*/
SFTVector *sft_vect = NULL;
......@@ -292,7 +286,7 @@ int main(int argc, char **argv)
REAL8 InputST = 1800.0;
/****** LALStatus for debugging ******/
LALStatus status = empty_status;
LALStatus XLAL_INIT_DECL(status);
/****** Type of Window used (its not used for the whole data, but only at the edges, so its split in two parts and attached to ramp function) ******/
WindowType W = HANN;
......@@ -307,7 +301,7 @@ int main(int argc, char **argv)
double f_min,f_max;
/****** Internal LAL variable ******/
SFTConstraints constraints=empty_constraints;
SFTConstraints XLAL_INIT_DECL(constraints);
/****** Start and End times of the time series to be outputted ******/
LIGOTimeGPS startTime, endTime;
......
......@@ -29,6 +29,7 @@
#include <lal/UserInput.h>
#include <lal/LALConstants.h>
#include <lal/PulsarDataTypes.h>
// ----- defines & macros ----------
#define TRUE (1==1)
......
......@@ -185,10 +185,6 @@ double BstatIntegrand ( double A[], size_t dim, void *p );
REAL8 XLALComputeBhatCorrection ( const gsl_vector * A_Mu, const gsl_matrix *M_mu_nu );
/*---------- empty initializers ---------- */
ConfigVariables empty_ConfigVariables;
UserInput_t empty_UserInput;
/*----------------------------------------------------------------------*/
/* Main Function starts here */
/*----------------------------------------------------------------------*/
......@@ -199,8 +195,8 @@ UserInput_t empty_UserInput;
int main(int argc,char *argv[])
{
LALStatus status = blank_status;
UserInput_t uvar = empty_UserInput;
ConfigVariables GV = empty_ConfigVariables; /**< various derived configuration settings */
UserInput_t XLAL_INIT_DECL(uvar);
ConfigVariables XLAL_INIT_DECL(GV); /**< various derived configuration settings */
UINT4 i;
CHAR *version_string;
......
......@@ -168,10 +168,6 @@ int write_LV_candidate_to_fp ( FILE *fp, const LVcomponents *LVstat, const Pulsa
/*---------- Global variables ----------*/
extern int vrbflg; /**< defined in lalapps.c */
/*---------- empty initializers ---------- */
ConfigVariables empty_ConfigVariables;
UserInput_t empty_UserInput;
/*----------------------------------------------------------------------*/
/* Main Function starts here */
/*----------------------------------------------------------------------*/
......@@ -181,8 +177,8 @@ UserInput_t empty_UserInput;
*/
int main(int argc,char *argv[])
{
UserInput_t uvar = empty_UserInput;
ConfigVariables cfg = empty_ConfigVariables; /**< various derived configuration settings */
UserInput_t XLAL_INIT_DECL(uvar);
ConfigVariables XLAL_INIT_DECL(cfg);
vrbflg = 1; /* verbose error-messages */
LogSetLevel(lalDebugLevel);
......@@ -278,10 +274,10 @@ int main(int argc,char *argv[])
INT4 i;
for ( i=0; i < uvar.numDraws; i ++ )
{
InjParams_t injParamsDrawn = empty_InjParams_t;
InjParams_t XLAL_INIT_DECL(injParamsDrawn);
/* ----- generate signal random draws from ranges and generate Fstat atoms */
multiAMBuffer_t multiAMBuffer = empty_multiAMBuffer; /* prepare AM-buffer */
multiAMBuffer_t XLAL_INIT_DECL(multiAMBuffer); /* prepare AM-buffer */
MultiFstatAtomVector *multiAtoms;
multiAtoms = XLALSynthesizeTransientAtoms ( &injParamsDrawn, cfg.skypos, cfg.AmpPrior, cfg.transientInjectRange, cfg.multiDetStates, cfg.SignalOnly, &multiAMBuffer, cfg.rng, lineX);
......@@ -839,7 +835,7 @@ write_LV_candidate_to_fp ( FILE *fp, const LVcomponents *LVstat, const PulsarDop
XLAL_ERROR ( XLAL_EFAULT);
}
PulsarDopplerParams dopplerParams = empty_PulsarDopplerParams;
PulsarDopplerParams XLAL_INIT_DECL(dopplerParams);
XLAL_INIT_MEM( dopplerParams.fkdot );
if ( dopplerParams_in == NULL ) { /* just write zeros */
dopplerParams.Alpha = 0.0;
......
......@@ -167,10 +167,6 @@ int XLALInitAmplitudePrior ( AmplitudePrior_t *AmpPrior, const UserInput_t *uvar
/*---------- Global variables ----------*/
extern int vrbflg; /**< defined in lalapps.c */
/*---------- empty initializers ---------- */
ConfigVariables empty_ConfigVariables;
UserInput_t empty_UserInput;
/*----------------------------------------------------------------------*/
/* Main Function starts here */
/*----------------------------------------------------------------------*/
......@@ -180,8 +176,8 @@ UserInput_t empty_UserInput;
*/
int main(int argc,char *argv[])
{
UserInput_t uvar = empty_UserInput;
ConfigVariables cfg = empty_ConfigVariables; /**< various derived configuration settings */
UserInput_t XLAL_INIT_DECL(uvar);
ConfigVariables XLAL_INIT_DECL(cfg); /**< various derived configuration settings */
vrbflg = 1; /* verbose error-messages */
LogSetLevel(lalDebugLevel);
......@@ -255,12 +251,12 @@ int main(int argc,char *argv[])
} /* if outputInjParams */
/* ----- main MC loop over numDraws trials ---------- */
multiAMBuffer_t multiAMBuffer = empty_multiAMBuffer; /* prepare AM-buffer */
multiAMBuffer_t XLAL_INIT_DECL(multiAMBuffer); /* prepare AM-buffer */
INT4 i;
for ( i=0; i < uvar.numDraws; i ++ )
{
InjParams_t injParamsDrawn = empty_InjParams_t;
InjParams_t XLAL_INIT_DECL(injParamsDrawn);
/* ----- generate signal random draws from ranges and generate Fstat atoms */
MultiFstatAtomVector *multiAtoms;
......@@ -277,7 +273,7 @@ int main(int argc,char *argv[])
/* ----- add meta-info on current transient-CW candidate */
transientCandidate_t cand = empty_transientCandidate;
transientCandidate_t XLAL_INIT_DECL(cand);
cand.doppler.Alpha = multiAMBuffer.skypos.longitude;
cand.doppler.Delta = multiAMBuffer.skypos.latitude;
cand.windowRange = cfg.transientSearchRange;
......@@ -342,7 +338,7 @@ int main(int argc,char *argv[])
{
transientFstatMap_t *FtotalMap;