included a current frame index whch is different than file frame index for gotthard, even when readout through blackfin, for mythen both will alwys be incrememnted by one; gotthard server all of them should be consistent for 32 bit

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@425 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2013-01-11 17:20:57 +00:00
parent 9cfdbdac67
commit 4cc8566311
18 changed files with 79 additions and 23 deletions

View File

@ -119,7 +119,7 @@ void postProcessing::processFrame(int *myData, int delflag) {
//uses static function?!?!?!?
writeDataFile (fname+string(".raw"),fdata, NULL, NULL, 'i');
} else {
writeDataFile ((void*)myData, frameIndex);
writeDataFile ((void*)myData, currentFrameIndex);
}
#ifdef VERBOSE
cout << "done " << endl;
@ -131,14 +131,22 @@ void postProcessing::processFrame(int *myData, int delflag) {
} else
if (dataReady){
thisData=new detectorData(fdata,NULL,NULL,getCurrentProgress(),(fname+string(".raw")).c_str(),getTotalNumberOfChannels());
dataReady(thisData, -1, pCallbackArg);
dataReady(thisData, currentFrameIndex, pCallbackArg);
delete thisData;
fdata=NULL;
}
}
if (getFrameIndex()>=0)
incrementFrameIndex();
incrementCurrentFrameIndex();
if (getFrameIndex()>=0){
if (getDetectorsType()==MYTHEN)
incrementFrameIndex(1);
else if((currentFrameIndex%getFramesPerFile())==0)
incrementFrameIndex(getFramesPerFile());
}
@ -243,7 +251,7 @@ void postProcessing::doProcessing(double *lfdata, int delflag, string fname) {
if (dataReady) {
thisData=new detectorData(val,err,ang,getCurrentProgress(),(fname+ext).c_str(),np);
dataReady(thisData, -1, pCallbackArg);
dataReady(thisData, currentFrameIndex, pCallbackArg);
delete thisData;
ang=NULL;
val=NULL;
@ -386,7 +394,7 @@ void* postProcessing::processData(int delflag) {
//receiver
else{
pthread_mutex_lock(&mg);
int prevCaught=getCurrentFrameIndex();
int prevCaught=getReceiverCurrentFrameIndex();
pthread_mutex_unlock(&mg);
int caught=0;
@ -400,7 +408,7 @@ void* postProcessing::processData(int delflag) {
usleep(200000);
pthread_mutex_lock(&mg);
caught=getCurrentFrameIndex();
caught=getReceiverCurrentFrameIndex();
pthread_mutex_unlock(&mg);
incrementProgress(caught-prevCaught);
if(caught-prevCaught) newData=true;