mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
probes was screwing up gotthard data, changed in places to be only for data
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@429 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -971,36 +971,7 @@ int64_t getTrains(){
|
|||||||
|
|
||||||
|
|
||||||
int64_t setProbes(int64_t value){
|
int64_t setProbes(int64_t value){
|
||||||
int ow;
|
return 0;
|
||||||
int nm=setNMod(-1);
|
|
||||||
switch (getDynamicRange()) {
|
|
||||||
case 32:
|
|
||||||
ow=1;
|
|
||||||
break;
|
|
||||||
case 16:
|
|
||||||
ow=2;
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
ow=3;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
ow=4;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
ow=5;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ow=1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (value>=0) {
|
|
||||||
setCSregister(ALLMOD);
|
|
||||||
initChipWithProbes(0, ow,value, ALLMOD);
|
|
||||||
putout("0000000000000000",ALLMOD);
|
|
||||||
setNMod(nm);
|
|
||||||
getDynamicRange(); // needed to change dataBytes
|
|
||||||
}
|
|
||||||
return getProbes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1068,15 +1039,7 @@ int loadImage(int index, short int ImageVals[]){
|
|||||||
|
|
||||||
|
|
||||||
int64_t getProbes(){
|
int64_t getProbes(){
|
||||||
u_int32_t shiftin=bus_r(GET_SHIFT_IN_REG);
|
return 0;
|
||||||
u_int32_t np=(shiftin >>PROBES_OFF) & PROBES_MASK;
|
|
||||||
#ifdef VERYVERBOSE
|
|
||||||
printf("%08x ",shiftin);
|
|
||||||
printf("probes==%01x\n",np);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return np;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2121,7 +2121,8 @@ int set_timer(int file_des) {
|
|||||||
retval=setGates(tns);
|
retval=setGates(tns);
|
||||||
break;
|
break;
|
||||||
case PROBES_NUMBER:
|
case PROBES_NUMBER:
|
||||||
retval=setProbes(tns);
|
sprintf(mess,"can't set timer for gotthard\n");
|
||||||
|
ret=FAIL;
|
||||||
break;
|
break;
|
||||||
case CYCLES_NUMBER:
|
case CYCLES_NUMBER:
|
||||||
retval=setTrains(tns);
|
retval=setTrains(tns);
|
||||||
@ -2142,7 +2143,6 @@ int set_timer(int file_des) {
|
|||||||
if (ret!=OK) {
|
if (ret!=OK) {
|
||||||
printf(mess);
|
printf(mess);
|
||||||
printf("set timer failed\n");
|
printf("set timer failed\n");
|
||||||
sprintf(mess, "set timer %d failed\n", ind);
|
|
||||||
} else if (ind==FRAME_NUMBER) {
|
} else if (ind==FRAME_NUMBER) {
|
||||||
ret=allocateRAM();
|
ret=allocateRAM();
|
||||||
if (ret!=OK)
|
if (ret!=OK)
|
||||||
|
@ -3385,6 +3385,8 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
|
|||||||
//std::cout<< "offline " << std::endl;
|
//std::cout<< "offline " << std::endl;
|
||||||
if (t>=0)
|
if (t>=0)
|
||||||
thisDetector->timerValue[index]=t;
|
thisDetector->timerValue[index]=t;
|
||||||
|
if(thisDetector->myDetectorType==GOTTHARD)
|
||||||
|
thisDetector->timerValue[PROBES_NUMBER]=0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (t>=0)
|
if (t>=0)
|
||||||
@ -3393,17 +3395,15 @@ int64_t slsDetector::setTimer(timerIndex index, int64_t t){
|
|||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< "Timer " << index << " set to "<< thisDetector->timerValue[index] << "ns" << std::endl;
|
std::cout<< "Timer " << index << " set to "<< thisDetector->timerValue[index] << "ns" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
if (index==PROBES_NUMBER) {
|
|
||||||
|
if ((thisDetector->myDetectorType==MYTHEN)&&(index==PROBES_NUMBER)) {
|
||||||
setDynamicRange();
|
setDynamicRange();
|
||||||
//cout << "Changing probes: data size = " << thisDetector->dataBytes <<endl;
|
//cout << "Changing probes: data size = " << thisDetector->dataBytes <<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set progress */
|
/* set progress */
|
||||||
if ((index==FRAME_NUMBER) || (index==CYCLES_NUMBER)) {
|
if ((index==FRAME_NUMBER) || (index==CYCLES_NUMBER)) {
|
||||||
|
|
||||||
setTotalProgress();
|
setTotalProgress();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return thisDetector->timerValue[index];
|
return thisDetector->timerValue[index];
|
||||||
@ -3826,7 +3826,7 @@ int slsDetector::setDynamicRange(int n){
|
|||||||
updateDetector();
|
updateDetector();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else if(thisDetector->myDetectorType==MYTHEN){
|
||||||
if (n>0)
|
if (n>0)
|
||||||
thisDetector->dynamicRange=n;
|
thisDetector->dynamicRange=n;
|
||||||
retval=thisDetector->dynamicRange;
|
retval=thisDetector->dynamicRange;
|
||||||
|
Reference in New Issue
Block a user