- Initial commit of a UB calculation setup for four circle

diffractometers
This commit is contained in:
koennecke
2005-03-23 08:19:47 +00:00
parent 2b63ad06b2
commit beba0d4644
18 changed files with 1236 additions and 55 deletions

47
scan.c
View File

@ -42,37 +42,6 @@
#include "lld.h"
#include "stdscan.h"
/*-----------------------------------------------------------------------*/
static char *fixExtension(char *filename)
{
if(strstr(filename,".hdf") != NULL)
{
changeExtension(filename,"dat");
}
return filename;
}
/*------------------------------------------------------------------------*/
char *ScanMakeFileName(SicsInterp *pSics, SConnection *pCon)
{
pSicsVariable pPath = NULL, pPref = NULL, pEnd = NULL;
char *pRes = NULL;
int iLen, iNum, iYear;
char pNumText[10];
CommandList *pCom = NULL;
/*
make a simulated filename if in simulation mode
*/
if(pServ->simMode)
return strdup("sim001001901.sim");
pRes = makeFilename(pSics,pCon);
if(pRes == NULL)
{
pRes = strdup("emergency.scn");
}
return fixExtension(pRes);
}
/*---------------------------------------------------------------------------*/
static void DeleteCountEntry(void *pData)
{
@ -688,21 +657,7 @@ CountEntry CollectCounterData(pScanData self)
return 0;
}
/* allocate a new data file */
pPtr = ScanMakeFileName(self->pSics,self->pCon);
if(!pPtr)
{
SCWrite(self->pCon,
"ERROR: cannot allocate new data filename, Scan aborted",
eError);
self->pCon = NULL;
self->pSics = NULL;
return 0;
}
sprintf(pBueffel,"Writing data file: %s ...",pPtr);
SCWrite(self->pCon,pBueffel,eWarning);
strcpy(self->pFile,pPtr);
free(pPtr);
iRet = self->WriteHeader(self);
if(!iRet)
{