- Fixes to HM code for AMOR TOF

- A couple of TAS fixes
- o2t was fixed to work with any drivable
- FOCUS was mended to include beam monitor in data file
This commit is contained in:
cvs
2002-07-19 15:09:21 +00:00
parent e0c5afcf6d
commit bde19bb973
38 changed files with 604 additions and 249 deletions

View File

@@ -48,6 +48,13 @@
*/
pAmor2T pAmor = NULL;
/*
if to save psd data in TOF mode or not. This is in order to save time
when measureing TOF with a single detector only.
*/
static int psdSave = 1;
/*------------------------------------------------------------------------*/
static void WriteDiaphragm(NXhandle hfil, NXdict hdict, int i,
SConnection *pCon)
@@ -611,8 +618,11 @@ static int WriteTOFDetector(char *name, pHistMem pHM, int *iDim,
}
else
{
WriteTOFDetector("spinup",pHM, iDim,hfil,hdict,pCon);
if(psdSave){
WriteTOFDetector("spinup",pHM, iDim,hfil,hdict,pCon);
} else {
SCWrite(pCon,"PSD writing supressed!",eWarning);
}
/*
now get and write single detectors
*/
@@ -651,8 +661,27 @@ static int WriteTOFDetector(char *name, pHistMem pHM, int *iDim,
int argc, char *argv[])
{
char pBueffel[512], *pFile = NULL;
int iRet;
int iRet, iFlag;
/*
if arguments, check for psdsave
*/
if(argc > 1){
strtolower(argv[1]);
if(strcmp(argv[1],"psdsave") == 0){
if(argc > 2){
psdSave = atof(argv[2]);
SCSendOK(pCon);
return 1;
} else {
sprintf(pBueffel,"storeamor.psdSave = %d",psdSave);
SCWrite(pCon,pBueffel,eValue);
return 1;
}
}
}
pFile = SNXMakeFileName(pSics,pCon);
sprintf(pBueffel,"Writing file %s .....",pFile);
SCWrite(pCon,pBueffel,eWarning);