mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 14:33:45 +02:00
Solved bug on number of measurements
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@250 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
25edfba592
commit
c6d383f770
@ -160,7 +160,7 @@ multiSlsDetector::multiSlsDetector(int id) : slsDetectorUtils(), shmId(-1)
|
|||||||
/** sets angular conversion file to none */
|
/** sets angular conversion file to none */
|
||||||
strcpy(thisMultiDetector->angConvFile,"none");
|
strcpy(thisMultiDetector->angConvFile,"none");
|
||||||
/** set binsize*/
|
/** set binsize*/
|
||||||
thisMultiDetector->binSize=0;
|
thisMultiDetector->binSize=0.001;
|
||||||
thisMultiDetector->stoppedFlag=0;
|
thisMultiDetector->stoppedFlag=0;
|
||||||
|
|
||||||
thisMultiDetector->threadedProcessing=1;
|
thisMultiDetector->threadedProcessing=1;
|
||||||
|
@ -569,7 +569,7 @@ int slsDetector::initializeDetectorSize(detectorType type) {
|
|||||||
/** sets angular conversion file to none */
|
/** sets angular conversion file to none */
|
||||||
strcpy(thisDetector->angConvFile,"none");
|
strcpy(thisDetector->angConvFile,"none");
|
||||||
/** set binsize*/
|
/** set binsize*/
|
||||||
thisDetector->binSize=0;
|
thisDetector->binSize=0.001;
|
||||||
thisDetector->stoppedFlag=0;
|
thisDetector->stoppedFlag=0;
|
||||||
thisDetector->threadedProcessing=1;
|
thisDetector->threadedProcessing=1;
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@ void slsDetectorUtils::acquire(int delflag){
|
|||||||
progressIndex=0;
|
progressIndex=0;
|
||||||
*stoppedFlag=0;
|
*stoppedFlag=0;
|
||||||
|
|
||||||
int measurement = (int)setTimer(slsDetectorDefs::MEASUREMENTS_NUMBER,-1);
|
|
||||||
|
|
||||||
angCalLogClass *aclog=NULL;
|
angCalLogClass *aclog=NULL;
|
||||||
enCalLogClass *eclog=NULL;
|
enCalLogClass *eclog=NULL;
|
||||||
// int lastindex=startindex, nowindex=startindex;
|
// int lastindex=startindex, nowindex=startindex;
|
||||||
@ -90,7 +88,20 @@ void slsDetectorUtils::acquire(int delflag){
|
|||||||
posfinished=0;
|
posfinished=0;
|
||||||
pthread_mutex_unlock(&mp);
|
pthread_mutex_unlock(&mp);
|
||||||
|
|
||||||
for(int im=0;im<measurement;im++) {
|
if (*threadedProcessing) {
|
||||||
|
startThread(delflag);
|
||||||
|
}
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << " starting thread " << endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
int nm=1;
|
||||||
|
|
||||||
|
if (timerValue[MEASUREMENTS_NUMBER]>0)
|
||||||
|
nm=timerValue[MEASUREMENTS_NUMBER];
|
||||||
|
|
||||||
|
for(int im=0;im<nm;im++) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -100,12 +111,9 @@ void slsDetectorUtils::acquire(int delflag){
|
|||||||
|
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << " starting thread " << endl;
|
cout << " starting measurement "<< im << " of " << nm << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (*threadedProcessing) {
|
|
||||||
startThread(delflag);
|
|
||||||
}
|
|
||||||
//cout << "data thread started " << endl;
|
//cout << "data thread started " << endl;
|
||||||
int np=1;
|
int np=1;
|
||||||
if (*numberOfPositions>0)
|
if (*numberOfPositions>0)
|
||||||
@ -309,11 +317,22 @@ void slsDetectorUtils::acquire(int delflag){
|
|||||||
*fileIndex=setLastIndex();
|
*fileIndex=setLastIndex();
|
||||||
if (*stoppedFlag==0) {
|
if (*stoppedFlag==0) {
|
||||||
executeAction(stopScript);
|
executeAction(stopScript);
|
||||||
}
|
} else
|
||||||
|
break;
|
||||||
|
|
||||||
// loop measurements
|
// loop measurements
|
||||||
|
|
||||||
|
|
||||||
|
if (measurement_finished)
|
||||||
|
measurement_finished(im,*fileIndex,measFinished_p);
|
||||||
|
|
||||||
|
if (*stoppedFlag) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// waiting for the data processing thread to finish!
|
// waiting for the data processing thread to finish!
|
||||||
if (*threadedProcessing) {
|
if (*threadedProcessing) {
|
||||||
pthread_mutex_lock(&mp);
|
pthread_mutex_lock(&mp);
|
||||||
@ -321,12 +340,7 @@ void slsDetectorUtils::acquire(int delflag){
|
|||||||
pthread_mutex_unlock(&mp);
|
pthread_mutex_unlock(&mp);
|
||||||
pthread_join(dataProcessingThread, &status);
|
pthread_join(dataProcessingThread, &status);
|
||||||
}
|
}
|
||||||
if (*stoppedFlag) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (measurement_finished)
|
|
||||||
measurement_finished(im,*fileIndex,measFinished_p);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (connectChannels) {
|
if (connectChannels) {
|
||||||
if (disconnect_channels)
|
if (disconnect_channels)
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user