- Added a sinq module for monitoring the Accelerator broadcast
- Added automatic notification via SMS SKIPPED: psi/dgrambroadcast.c psi/dgrambroadcast.h psi/make_gen psi/psi.c psi/sinq.c psi/sinq.h
This commit is contained in:
33
mesure.c
33
mesure.c
@@ -371,6 +371,9 @@ static void ListMesure(pMesure self, char *name, SConnection *pCon)
|
||||
|
||||
/* loop over all scan variables */
|
||||
status = 1;
|
||||
memset(pHead,0,512*sizeof(char));
|
||||
memset(pStatus,0,512*sizeof(char));
|
||||
memset(pItem,0,20*sizeof(char));
|
||||
for(i = 0; i < self->iScanVar; i++)
|
||||
{
|
||||
DynarGet(self->pScanVar,i,&pDings);
|
||||
@@ -378,7 +381,7 @@ static void ListMesure(pMesure self, char *name, SConnection *pCon)
|
||||
if(pVar)
|
||||
{
|
||||
fVal = pVar->pInter->GetValue(pVar->pObject,self->pCon);
|
||||
AppendScanVar(pVar,fVal);
|
||||
AppendScanVar(pVar,fVal);
|
||||
sprintf(pItem,"%-10.10s",pVar->Name);
|
||||
strcat(pHead,pItem);
|
||||
sprintf(pItem,"%-10.3f",fVal);
|
||||
@@ -551,12 +554,14 @@ int weakScan(pMesure self, double twoTheta)
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------------------*/
|
||||
static int PerformPSDScan(pMesure self, char *scanVar, float fStart, float step, int np)
|
||||
static int PerformPSDScan(pMesure self, char *scanVar, float fStart,
|
||||
float step, int np, float two_theta)
|
||||
{
|
||||
int status;
|
||||
char pCommand[1024];
|
||||
char countMode[20];
|
||||
Tcl_Interp *pTcl;
|
||||
float fPreset;
|
||||
|
||||
/*
|
||||
PSD scans are done by calling the routine Tcl procedure tricsscan with the
|
||||
@@ -570,7 +575,12 @@ static int PerformPSDScan(pMesure self, char *scanVar, float fStart, float step,
|
||||
{
|
||||
strcpy(countMode,"monitor");
|
||||
}
|
||||
snprintf(pCommand,1023,"tricsscan %f %f %d %s %f", fStart, step, np,countMode,self->fPreset);
|
||||
fPreset = GetFourCirclePreset(self->stepTable,(double)two_theta);
|
||||
if(fPreset < .0){
|
||||
fPreset = self->fPreset;
|
||||
}
|
||||
snprintf(pCommand,1023,"tricsscan %f %f %d %s %f", fStart, step, np,
|
||||
countMode,fPreset);
|
||||
pTcl = InterpGetTcl(pServ->pSics);
|
||||
status = Tcl_Eval(pTcl,pCommand);
|
||||
if(status != TCL_OK)
|
||||
@@ -585,7 +595,7 @@ static int PerformPSDScan(pMesure self, char *scanVar, float fStart, float step,
|
||||
/*------------------------------------------------------------------------*/
|
||||
static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
{
|
||||
float fStart, stepWidth;
|
||||
float fStart, stepWidth, fPreset;
|
||||
int iRet, np;
|
||||
char pBueffel[132];
|
||||
char *scanVar = NULL;
|
||||
@@ -619,7 +629,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
*/
|
||||
if(self->psd == 1)
|
||||
{
|
||||
iRet = PerformPSDScan(self,scanVar,fStart, stepWidth, np);
|
||||
iRet = PerformPSDScan(self,scanVar,fStart, stepWidth, np,twoTheta);
|
||||
free(scanVar);
|
||||
return iRet;
|
||||
}
|
||||
@@ -668,6 +678,14 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
memset(self->lCounts,0,np*sizeof(long));
|
||||
}
|
||||
|
||||
/*
|
||||
* determine preset
|
||||
*/
|
||||
fPreset = GetFourCirclePreset(self->stepTable,(double)twoTheta);
|
||||
if(fPreset < .0){
|
||||
fPreset = self->fPreset;
|
||||
}
|
||||
|
||||
/* do the scan */
|
||||
free(scanVar);
|
||||
if(self->iCompact)
|
||||
@@ -679,7 +697,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
self->pScanner->ScanDrive = ScanFastDrive;
|
||||
}
|
||||
iRet = SilentScan(self->pScanner,np,self->CountMode,
|
||||
self->fPreset,pServ->pSics,pCon);
|
||||
fPreset,pServ->pSics,pCon);
|
||||
if(weakScan(self,twoTheta))
|
||||
{
|
||||
/*
|
||||
@@ -701,7 +719,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
*/
|
||||
SCWrite(pCon,"Remeasuring weak reflection",eWarning);
|
||||
iRet = SilentScan(self->pScanner,np,self->CountMode,
|
||||
self->fPreset*5.,pServ->pSics,pCon);
|
||||
fPreset*5.,pServ->pSics,pCon);
|
||||
|
||||
}
|
||||
ResetScanFunctions(self->pScanner);
|
||||
@@ -941,6 +959,7 @@ static int ScanReflection(pMesure self, float twoTheta, SConnection *pCon)
|
||||
|
||||
assert(self);
|
||||
assert(pCon);
|
||||
memset(pTime,0,132*sizeof(char));
|
||||
|
||||
#ifdef MESSDEBUG
|
||||
self->np = 90;
|
||||
|
||||
Reference in New Issue
Block a user