diff --git a/slsDetectorSoftware/mythenDetectorServer/mcb_funcs.c b/slsDetectorSoftware/mythenDetectorServer/mcb_funcs.c index 40774e26d..5efb2ae4f 100755 --- a/slsDetectorSoftware/mythenDetectorServer/mcb_funcs.c +++ b/slsDetectorSoftware/mythenDetectorServer/mcb_funcs.c @@ -2198,7 +2198,7 @@ int testExtPulseMux(int imod, int ow) { if (v!=vright) { result++; chipr++; - printf("Counter test mux %d mode: channel %d chip %d read %d instead of %d\n",ow, ichan+(ichip+imod*NCHIP)*NCHAN, ichip, v, vright); + // printf("Counter test mux %d mode: channel %d chip %d read %d instead of %d\n",ow, ichan+(ichip+imod*NCHIP)*NCHAN, ichip, v, vright); //break; } //printf("\n"); @@ -2272,7 +2272,7 @@ int testDataInOutMux(int imod, int ow, int num) { if (v!=vright) { result++; chipr++; - printf("DataInOut test mux %d mode: channel %d chip %d read %d instead of %d\n",ow, ichan+(ichip+imod*NCHIP)*NCHAN, ichip, v, vright); + printf("DataInOut test mux %d mode: channel %d chip %d read %08x instead of %08x\n",ow, ichan+(ichip+imod*NCHIP)*NCHAN, ichip, v, vright); //break; } //printf("\n"); @@ -2363,13 +2363,13 @@ int testOutMux(int imod) { v=val & 1<< j; if (pat & (1<<(i*dist))) { if (v==0) { - printf("Outmux: module %d chip %i bit %d read %d instead of %ld\n",k, j,(i*dist), v,pat & (1<<(i*dist) )); + // printf("Outmux: module %d chip %i bit %d read %d instead of %ld\n",k, j,(i*dist), v,pat & (1<<(i*dist) )); result++; } // should be 1 } else { if (v) { - printf("Outmux: module %d chip %i bit %d read %d instead of %ld\n",k, j,(i*dist), v,pat & (1<<(i*dist) )); + // printf("Outmux: module %d chip %i bit %d read %d instead of %ld\n",k, j,(i*dist), v,pat & (1<<(i*dist) )); result++; } } @@ -2564,13 +2564,13 @@ int testFpgaMux(int imod) { v=val & 1<< j; if (pat & (1<<(i*dist))) { if (v==0) { - printf("Fpgamux: module %d chip %i bit %d read %d instead of %ld\n",k,j,(i*dist), v,pat & (1<<(i*dist) )); + // printf("Fpgamux: module %d chip %i bit %d read %d instead of %ld\n",k,j,(i*dist), v,pat & (1<<(i*dist) )); result++; } // should be 1 } else { if (v) { - printf("Fpgamux: module %d chip %i bit %d read %d instead of %ld\n",k,j,(i*dist), v,pat & (1<<(i*dist) )); + // printf("Fpgamux: module %d chip %i bit %d read %d instead of %ld\n",k,j,(i*dist), v,pat & (1<<(i*dist) )); result++; } } diff --git a/slsDetectorSoftware/mythenDetectorServer/mythenDetectorServer b/slsDetectorSoftware/mythenDetectorServer/mythenDetectorServer index 4f08aa734..de79377bf 100755 Binary files a/slsDetectorSoftware/mythenDetectorServer/mythenDetectorServer and b/slsDetectorSoftware/mythenDetectorServer/mythenDetectorServer differ diff --git a/slsDetectorSoftware/slsDetectorAnalysis/angularConversionStatic.cpp b/slsDetectorSoftware/slsDetectorAnalysis/angularConversionStatic.cpp index 9eca91610..43e5a4436 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/angularConversionStatic.cpp +++ b/slsDetectorSoftware/slsDetectorAnalysis/angularConversionStatic.cpp @@ -330,7 +330,6 @@ int angularConversionStatic::finalizeMerging(double *mp, double *mv, double *me, int np=0; for (int ibin=0; ibin0) { - #ifdef VERBOSE cout << "finalize " << ibin << " "<< mm[ibin] << " " << mp[ibin]<< " " << mv[ibin] << " " << me[ibin] << endl; #endif @@ -452,9 +451,10 @@ int angularConversionStatic::addPointToMerging(double p1, double v1, double e1, // #ifdef VERBOSE // cout << "add " << ibin << " "<< mm[ibin] << " " << mp[ibin]<< mv[ibin] << me[ibin] << endl; // #endif - } else + } else { + cout << "Bin out of range! " << ibin << endl; return slsDetectorDefs::FAIL; - + } return slsDetectorDefs::OK; diff --git a/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.cpp b/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.cpp index 60a2d68c4..3e8d2b96b 100644 --- a/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.cpp +++ b/slsDetectorSoftware/slsDetectorAnalysis/postProcessing.cpp @@ -233,9 +233,13 @@ void postProcessing::doProcessing(double *lfdata, int delflag, string fname) { #endif addFrame(lfdata,currentPosition, currentI0, t, fname, 0); + cout << "++++++++++++++++++++" << GetCurrentPositionIndex() << " " << npos << " " << positionFinished() << " " << dataQueueSize() << endl; + if ((GetCurrentPositionIndex()>=npos && dataQueueSize()) || npos<2) { + //&& - if ((GetCurrentPositionIndex()>=npos && positionFinished() && dataQueueSize()) || npos<2) { - + while(positionFinished()==0) { + ; + } #ifdef VERBOSE cout << "finalize dataset" << endl; #endif @@ -248,7 +252,7 @@ void postProcessing::doProcessing(double *lfdata, int delflag, string fname) { fname=createFileName(); pthread_mutex_unlock(&mp); //} - + if((*correctionMask)&(1<