now processing all files of a sequence

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@157 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
x04sa 2012-03-23 08:30:24 +00:00
parent e3ca421c3c
commit ca896b8b30

View File

@ -1759,6 +1759,9 @@ void* slsDetectorUtils::processData(int delflag) {
#ifdef VERBOSE
// cout << "**************Current position index is " << currentPositionIndex << endl;
#endif
if (*numberOfPositions>0 || delflag==0) {
if (currentPositionIndex<=1) {
if (*binSize>0)
bs=*binSize;
@ -1785,6 +1788,7 @@ void* slsDetectorUtils::processData(int delflag) {
#endif
resetMerging(mergingBins, mergingCounts,mergingErrors, mergingMultiplicity, bs);
}
}
/* it would be better to create an ang0 with 0 encoder position and add to merging/write to file simply specifying that offset so that when it cycles writing the data or adding to merging it also calculates the angular position */
#ifdef VERBOSE
@ -1792,8 +1796,8 @@ void* slsDetectorUtils::processData(int delflag) {
#endif
ang=convertAngles(currentPosition);
if (*correctionMask!=0) {
if (*numberOfPositions>1) {
// if (*correctionMask!=0) {
// if (*numberOfPositions>1) {
//uses static function?!?!?!?
//writeDataFile (fname+string(".dat"), getTotalNumberOfChannels(), ffcdata, ffcerr,ang);
#ifdef VERBOSE
@ -1801,11 +1805,12 @@ void* slsDetectorUtils::processData(int delflag) {
#endif
writeDataFile (fname+string(".dat"), ffcdata, ffcerr,ang);
}
}
// }
// }
#ifdef VERBOSE
// cout << "add to merging "<< currentPositionIndex << endl;
#endif
if (*numberOfPositions>0 || delflag==0) {
addToMerging(ang, ffcdata, ffcerr, mergingBins, mergingCounts,mergingErrors, mergingMultiplicity, getTotalNumberOfChannels(), bs, *angDirection, *correctionMask, badChannelMask );
#ifdef VERBOSE
@ -1815,7 +1820,7 @@ void* slsDetectorUtils::processData(int delflag) {
pthread_mutex_lock(&mp);
if (currentPositionIndex>=(*numberOfPositions) && posfinished==1 && queuesize==1) {
if ((currentPositionIndex>=(*numberOfPositions) && posfinished==1 && queuesize==1)) {
// if ((currentPositionIndex>=(*numberOfPositions)) || (currentPositionIndex==0)) {
@ -1884,8 +1889,10 @@ void* slsDetectorUtils::processData(int delflag) {
// cout << mergingBins<< " " << mergingCounts<< " " << mergingErrors << " " << mergingMultiplicity << " " << endl;
#endif
}
} else {
thisData=new detectorData(mergingCounts,mergingErrors,mergingBins,getCurrentProgress(),(fname+string(ext)).c_str(),np);
finalDataQueue.push(thisData);
}
pthread_mutex_lock(&mp);