Cleaned up ANSTO code to merge with sinqdev.sics

This is our new RELEASE-4_0 branch which was taken from ansto/93d9a7c
Conflicts:
	.gitignore
	SICSmain.c
	asynnet.c
	confvirtualmot.c
	counter.c
	devexec.c
	drive.c
	event.h
	exebuf.c
	exeman.c
	histmem.c
	interface.h
	motor.c
	motorlist.c
	motorsec.c
	multicounter.c
	napi.c
	napi.h
	napi4.c
	network.c
	nwatch.c
	nxscript.c
	nxxml.c
	nxxml.h
	ofac.c
	reflist.c
	scan.c
	sicshipadaba.c
	sicsobj.c
	site_ansto/docs/Copyright.txt
	site_ansto/instrument/lyrebird/config/tasmad/sicscommon/nxsupport.tcl
	site_ansto/instrument/lyrebird/config/tasmad/taspub_sics/tasscript.tcl
	statusfile.c
	tasdrive.c
	tasub.c
	tasub.h
	tasublib.c
	tasublib.h
This commit is contained in:
Ferdi Franceschini
2015-04-23 20:49:26 +10:00
parent c650788a2c
commit 10d29d597c
1336 changed files with 9430 additions and 226646 deletions

View File

@@ -19,6 +19,9 @@
extended to support nxscripted file writing: Mark Koennecke, May 2004
extended to support GTSE, Mark Koennecke, May 2008
modifed to support second generation HM's via the bridge,
Mark Koennecke, December 2012
--------------------------------------------------------------------------*/
#include <stdlib.h>
#include <assert.h>
@@ -428,20 +431,20 @@ static int updateHMFMData(SicsInterp * pSics, SConnection * pCon)
HistInt *data = NULL;
pHistMem pMem = NULL;
pMem = (pHistMem) FindCommandData(pSics, "hm2", "HistMem");
pMem = (pHistMem) FindHM(pSics, "hm2");
if (pMem == NULL) {
return 0;
}
fTimeBin = GetHistTimeBin(pMem, &iTime);
setFMDataPointer(GetHistogramPointer(pMem, pCon), iTime, MIDDLE);
pMem = (pHistMem) FindCommandData(pSics, "hm1", "HistMem");
pMem = (pHistMem) FindHM(pSics, "hm1");
if (pMem == NULL) {
return 0;
}
setFMDataPointer(GetHistogramPointer(pMem, pCon), iTime, LOWER);
pMem = (pHistMem) FindCommandData(pSics, "hm3", "HistMem");
pMem = (pHistMem) FindHM(pSics, "hm3");
if (pMem == NULL) {
return 0;
}
@@ -567,7 +570,7 @@ static int TOFLambda(SicsInterp * pSics, SConnection * pCon,
float fCenter, fFWHM, fStdDev, fVal;
float fMon, fData, distMonoDet, distFermiDet, tdiff, lambda;
pMem = (pHistMem) FindCommandData(pSics, "hm1", "HistMem");
pMem = (pHistMem) FindHM(pSics, "hm1");
if (pMem == NULL) {
SCWrite(pCon,
"ERROR: need lower detector bank for lambda calculation",
@@ -650,7 +653,7 @@ static float calcElastic(SicsInterp * pSics, SConnection * pCon)
pHistMem pMem = NULL;
float fCenter, fFWHM, fStdDev, fVal;
pMem = (pHistMem) FindCommandData(pSics, "hm2", "HistMem");
pMem = (pHistMem) FindHM(pSics, "hm2");
if (pMem == NULL) {
SCWrite(pCon,
"ERROR: need middle detector bank for elastic peak calculation",