- Connections write timeouts were incorrectly handled in asynnetc. Fixed.
- Implemented the desired run/drive behaviour: drive waits for what it started run starts, and success waits for everything to finish. This required changes to a lot of files. - Fixed a bug in remob which supressed required messages
This commit is contained in:
13
histmem.c
13
histmem.c
@ -203,6 +203,7 @@ static int HistStartCount(void *pData, SConnection * pCon)
|
||||
}
|
||||
SCWrite(pCon, "ERROR: failed to fix histogram memory problem", eError);
|
||||
SCSetInterrupt(pCon, eAbortBatch);
|
||||
ReleaseCountLock(self->pCountInt);
|
||||
return HWFault;
|
||||
}
|
||||
|
||||
@ -237,12 +238,14 @@ static int HistPause(void *pData, SConnection * pCon)
|
||||
SCWrite(pCon, "ERROR: failed to fix histogram memory problem",
|
||||
eError);
|
||||
SCSetInterrupt(pCon, eAbortBatch);
|
||||
ReleaseCountLock(self->pCountInt);
|
||||
return HWFault;
|
||||
}
|
||||
}
|
||||
}
|
||||
SCWrite(pCon, "ERROR: failed to fix histogram memory problem", eError);
|
||||
SCSetInterrupt(pCon, eAbortBatch);
|
||||
ReleaseCountLock(self->pCountInt);
|
||||
return HWFault;
|
||||
}
|
||||
|
||||
@ -277,11 +280,13 @@ static int HistContinue(void *pData, SConnection * pCon)
|
||||
SCWrite(pCon, "ERROR: failed to fix histogram memory problem",
|
||||
eError);
|
||||
SCSetInterrupt(pCon, eAbortBatch);
|
||||
ReleaseCountLock(self->pCountInt);
|
||||
return HWFault;
|
||||
}
|
||||
}
|
||||
}
|
||||
SCWrite(pCon, "ERROR: failed to fix histogram memory problem", eError);
|
||||
ReleaseCountLock(self->pCountInt);
|
||||
SCSetInterrupt(pCon, eAbortBatch);
|
||||
return HWFault;
|
||||
}
|
||||
@ -299,6 +304,7 @@ static int HistCountStatus(void *pData, SConnection * pCon)
|
||||
if (!self->iInit) {
|
||||
SCWrite(pCon, "ERROR: histogram memory not initialised", eError);
|
||||
InvokeCallBack(self->pCall, COUNTEND, NULL);
|
||||
ReleaseCountLock(self->pCountInt);
|
||||
return COTERM;
|
||||
}
|
||||
|
||||
@ -726,7 +732,7 @@ int HistDoCount(pHistMem self, SConnection * pCon)
|
||||
|
||||
/* start */
|
||||
return StartDevice(GetExecutor(), "HistogramMemory", self->pDes, self,
|
||||
pCon, self->pDriv->fCountPreset);
|
||||
pCon, RUNRUN, self->pDriv->fCountPreset);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
@ -738,7 +744,7 @@ int HistBlockCount(pHistMem self, SConnection * pCon)
|
||||
|
||||
/* start counting */
|
||||
iRet = StartDevice(GetExecutor(), "HistogramMemory", self->pDes, self,
|
||||
pCon, self->pDriv->fCountPreset);
|
||||
pCon, RUNDRIVE, self->pDriv->fCountPreset);
|
||||
if (!iRet) {
|
||||
/* error has already been reported */
|
||||
return 0;
|
||||
@ -1569,7 +1575,8 @@ int HistAction(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
/* getdelay */
|
||||
else if(strcmp(argv[1],"getdelay") == 0){
|
||||
if(self->pDriv->data->nTimeChan > 1) {
|
||||
SCPrintf(pCon,eValue,"hm.delay = %d", self->pDriv->data->timeBinning[0]);
|
||||
iVal = (int)self->pDriv->data->timeBinning[0];
|
||||
SCPrintf(pCon,eValue,"hm.delay = %d", iVal);
|
||||
return 1;
|
||||
} else {
|
||||
SCPrintf(pCon,eError,"ERROR: no TOF configured");
|
||||
|
Reference in New Issue
Block a user