- Introduced a command history log for statistical and
syntax checking input purposes - Rectified an error message in fourmess.c - HMcontrol did not check for the HM to stop before returning. This caused weird data files at AMOR as the data had not yet been downloaded from the HM. - Fixed an issue about parameters in multicounter - Temporary fix in nxscript.c to always read the Hm from the HM and not a buffer. This is prior to rethinking caching strategies for old style HM's. - Synchronize now copies fixed motors correctly. This used to cause irritation with users. This now requires a script syncdrive to exist in the sync server which takes care of handling the fixed flag when this is desired. - Added initify to sicsdata in order to copy large value timebins over properly at AMOR SKIPPED: psi/amorstat.c psi/make_gen psi/makefile_linux psi/polterwrite.c psi/sinq.c psi/sinqhttp.c psi/sinqhttpprot.c psi/sps.c psi/tdchm.c
This commit is contained in:
65
hmcontrol.c
65
hmcontrol.c
@ -74,6 +74,17 @@ static int HMCStart(void *pData, SConnection * pCon)
|
||||
return status;
|
||||
}
|
||||
}
|
||||
/*
|
||||
Warning: this assumes that slaves 1 - MAXSLAVE are histogram memories.
|
||||
If this assumption does not hold, change this code to check if this
|
||||
is really a histogram memory.
|
||||
*/
|
||||
for (i = 1; i < MAXSLAVE; i++) {
|
||||
if (self->slaves[i] != NULL) {
|
||||
HistDirty((pHistMem) self->slaveData[i]);
|
||||
}
|
||||
}
|
||||
self->checkSlaves = 0;
|
||||
return OKOK;
|
||||
}
|
||||
|
||||
@ -86,26 +97,42 @@ static int HMCStatus(void *pData, SConnection * pCon)
|
||||
self = (pHMcontrol) pData;
|
||||
assert(self);
|
||||
|
||||
status = self->slaves[0]->CheckCountStatus(self->slaveData[0], pCon);
|
||||
if (status == HWIdle || status == HWFault) {
|
||||
/*
|
||||
stop counting on slaves when finished or when an error
|
||||
occurred.
|
||||
*/
|
||||
InvokeCallBack(self->pCall, COUNTEND, pCon);
|
||||
HMCHalt(self);
|
||||
if(self->checkSlaves == 0) {
|
||||
status = self->slaves[0]->CheckCountStatus(self->slaveData[0], pCon);
|
||||
/*
|
||||
Warning: this assumes that slaves 1 - MAXSLAVE are histogram memories.
|
||||
If this assumption does not hold, change this code to check if this
|
||||
is really a histogram memory.
|
||||
*/
|
||||
for (i = 1; i < MAXSLAVE; i++) {
|
||||
if (self->slaves[i] != NULL) {
|
||||
HistDirty((pHistMem) self->slaveData[i]);
|
||||
}
|
||||
}
|
||||
if (status == HWIdle || status == HWFault) {
|
||||
/*
|
||||
stop counting on slaves when finished or when an error
|
||||
occurred.
|
||||
*/
|
||||
HMCHalt(self);
|
||||
self->checkSlaves = 1;
|
||||
status = HWBusy;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* wait for the detectors to report finish too. Otherwise, with the second
|
||||
* generation HM data may not be fully transferred.
|
||||
*/
|
||||
for(i = 1; i < self->nSlaves; i++){
|
||||
status = self->slaves[i]->CheckCountStatus(self->slaveData[i], pCon);
|
||||
if(status != HWIdle || status != HWFault){
|
||||
return status;
|
||||
}
|
||||
}
|
||||
status = HWIdle;
|
||||
InvokeCallBack(self->pCall, COUNTEND, pCon);
|
||||
self->checkSlaves = 0;
|
||||
}
|
||||
/*
|
||||
Warning: this assumes that salves 1 - MAXSLAVE are histogram memories.
|
||||
If this assumption does not hold, change this code to check if this
|
||||
is really a histogram memory.
|
||||
*/
|
||||
for (i = 1; i < MAXSLAVE; i++) {
|
||||
if (self->slaves[i] != NULL) {
|
||||
HistDirty((pHistMem) self->slaveData[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user