- Fixed a bug in conman.c which could cause a core dump when terminating
a connection during an active run. - Added an additional output mode for the connection in order to support the batch run editor. - Made clientput send everything with eWarning mode in order to support the batch run editor. - Added a better NetReadTillTerm - Fixed a problem in synchronize.c - Fixed an issue with reading empty line on normal connection sockets. - Added a psi scan mode to mesure.c for TRICS - Made motor print warnings when trying to reposition. - Fixed abug in hkl.c which cause wrong signs. SKIPPED: psi/el734driv.c psi/el734hp.c psi/el737driv.c psi/el737hpdriv.c psi/nextrics.c psi/nxamor.c psi/psi.c psi/slsmagnet.c psi/swmotor2.c psi/tasscan.c psi/tasutil.c
This commit is contained in:
25
fomerge.c
25
fomerge.c
@ -30,11 +30,6 @@
|
||||
|
||||
static pFit fitter = NULL;
|
||||
|
||||
/* change this in line with HistMem.h */
|
||||
|
||||
/* typedef int HistInt; */
|
||||
/* commented out by M.Z. (already defined in HistMem.h, g77 complains) */
|
||||
|
||||
|
||||
#include "fomerge.h"
|
||||
|
||||
@ -562,9 +557,10 @@ static int putElastic(SicsInterp *pSics, SConnection *pCon,
|
||||
pNXScript pNexus, char *alias, float fElastic)
|
||||
{
|
||||
|
||||
int status, iTime, iDet;
|
||||
int status, iTime, iDet, i;
|
||||
const float *fTimeBin = NULL;
|
||||
int *sum = NULL;
|
||||
long *lSum = NULL;
|
||||
pHistMem pMem = NULL;
|
||||
float fCenter, fFWHM, fStdDev, fVal;
|
||||
|
||||
@ -594,7 +590,22 @@ static int putElastic(SicsInterp *pSics, SConnection *pCon,
|
||||
return NX_ERROR;
|
||||
}
|
||||
}
|
||||
status = CalculateFitFromData(fitter,fTimeBin,sum,iTime);
|
||||
/*
|
||||
copy sum to make compiler happy
|
||||
*/
|
||||
lSum = (long *)malloc(iDet*sizeof(long));
|
||||
if(lSum == NULL)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: out of memory in putElastc",eError);
|
||||
free(sum);
|
||||
return NX_ERROR;
|
||||
}
|
||||
for(i = 0; i < iDet; i++)
|
||||
{
|
||||
lSum[i] = sum[i];
|
||||
}
|
||||
status = CalculateFitFromData(fitter,(float *)fTimeBin,lSum,iTime);
|
||||
free(lSum);
|
||||
if(status != 1)
|
||||
{
|
||||
SCWrite(pCon,"WARNING: problem locating elastic peak",eWarning);
|
||||
|
Reference in New Issue
Block a user