few bugs fixed

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@286 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi
2012-10-08 10:34:34 +00:00
parent 05181fa618
commit 1d47eb16a1
6 changed files with 213 additions and 29 deletions

View File

@ -248,11 +248,18 @@ void slsDetectorUtils::acquire(int delflag){
// wait until data processing thread has finished the data
#ifdef VERBOSE
cout << "check data queue size " << endl;
#endif
while (dataQueueSize()){
#ifdef VERBOSE
cout << "AAAAAAAAA check data queue size " << endl;
#endif
usleep(100000);
}
pthread_mutex_lock(&mp);
pthread_mutex_lock(&mp);
if (*stoppedFlag==0) {
executeAction(headerAfter);
setLastIndex(*fileIndex);
@ -489,8 +496,10 @@ double slsDetectorUtils::getCurrentProgress() {
#ifdef VERBOSE
cout << progressIndex << " / " << totalProgress << endl;
#endif
return 100.*((double)progressIndex)/((double)totalProgress);
double p=100.*((double)progressIndex)/((double)totalProgress);
pthread_mutex_unlock(&mp);
return p;
}