mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
temporarily removed parallel start to debug bug, fixed flat channel bug, fixed bad channel bug
This commit is contained in:
parent
56a559090d
commit
04f2a5c5ed
@ -1608,6 +1608,36 @@ int* multiSlsDetector::startAndReadAll(){
|
|||||||
|
|
||||||
|
|
||||||
int multiSlsDetector::startAndReadAllNoWait(){
|
int multiSlsDetector::startAndReadAllNoWait(){
|
||||||
|
|
||||||
|
int i=0;
|
||||||
|
int ret=OK, ret1=OK;
|
||||||
|
|
||||||
|
for (i=0; i<thisMultiDetector->numberOfDetectors; i++) {
|
||||||
|
if (i!=thisMultiDetector->masterPosition)
|
||||||
|
if (detectors[i]) {
|
||||||
|
ret=detectors[i]->startAndReadAllNoWait();cout<<"returned from det "<<i<<endl;
|
||||||
|
if(detectors[i]->getErrorMask())
|
||||||
|
setErrorMask(getErrorMask()|(1<<i));
|
||||||
|
if (ret!=OK)
|
||||||
|
ret1=FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cout<<"returned from all dets"<<endl;
|
||||||
|
|
||||||
|
i=thisMultiDetector->masterPosition;
|
||||||
|
if (thisMultiDetector->masterPosition>=0) {cout<<"shouldnt be here"<<endl;
|
||||||
|
if (detectors[i]) {
|
||||||
|
ret=detectors[i]->startAndReadAllNoWait();
|
||||||
|
if(detectors[i]->getErrorMask())
|
||||||
|
setErrorMask(getErrorMask()|(1<<i));
|
||||||
|
if (ret!=OK)
|
||||||
|
ret1=FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret1;
|
||||||
|
|
||||||
|
/* hanging randomly around 4000-5000 frames at 1sec exptime (threads dont return)
|
||||||
int i=0;
|
int i=0;
|
||||||
int ret=OK;
|
int ret=OK;
|
||||||
int posmin=0, posmax=thisMultiDetector->numberOfDetectors;
|
int posmin=0, posmax=thisMultiDetector->numberOfDetectors;
|
||||||
@ -1653,6 +1683,7 @@ int multiSlsDetector::startAndReadAllNoWait(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2291,8 +2322,9 @@ double* multiSlsDetector::decodeData(int *datain, double *fdata) {
|
|||||||
|
|
||||||
|
|
||||||
int multiSlsDetector::setFlatFieldCorrection(string fname){
|
int multiSlsDetector::setFlatFieldCorrection(string fname){
|
||||||
double data[thisMultiDetector->numberOfChannels];//, xmed[thisMultiDetector->numberOfChannels];
|
double* data = new double[thisMultiDetector->numberOfChannels];// xmed[thisMultiDetector->numberOfChannels];
|
||||||
double ffcoefficients[thisMultiDetector->numberOfChannels], fferrors[thisMultiDetector->numberOfChannels];
|
double* ffcoefficients = new double[thisMultiDetector->numberOfChannels];
|
||||||
|
double*fferrors = new double[thisMultiDetector->numberOfChannels];
|
||||||
// int nmed=0;
|
// int nmed=0;
|
||||||
// int idet=0, ichdet=-1;
|
// int idet=0, ichdet=-1;
|
||||||
char ffffname[MAX_STR_LENGTH*2];
|
char ffffname[MAX_STR_LENGTH*2];
|
||||||
|
@ -801,6 +801,13 @@ int slsDetector::initializeDetectorSize(detectorType type) {
|
|||||||
// for (int imod=0; imod< thisDetector->nModsMax; imod++)
|
// for (int imod=0; imod< thisDetector->nModsMax; imod++)
|
||||||
// std::cout<< hex << detectorModules+imod << dec <<std::endl;
|
// std::cout<< hex << detectorModules+imod << dec <<std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
nBadChans=&thisDetector->nBadChans;
|
||||||
|
badChansList=thisDetector->badChansList;
|
||||||
|
badChanFile=thisDetector->badChanFile;
|
||||||
|
nBadFF=&thisDetector->nBadFF;
|
||||||
|
badFFList=thisDetector->badFFList;
|
||||||
|
|
||||||
dacs=(dacs_t*)(goff+thisDetector->dacoff);
|
dacs=(dacs_t*)(goff+thisDetector->dacoff);
|
||||||
adcs=(dacs_t*)(goff+thisDetector->adcoff);
|
adcs=(dacs_t*)(goff+thisDetector->adcoff);
|
||||||
chipregs=(int*)(goff+thisDetector->chipoff);
|
chipregs=(int*)(goff+thisDetector->chipoff);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user