mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
frame index updated for receiver
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@322 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
69d08ac546
commit
7cd1f9138e
@ -320,52 +320,65 @@ int postProcessing::fillBadChannelMask() {
|
|||||||
|
|
||||||
|
|
||||||
void* postProcessing::processData(int delflag) {
|
void* postProcessing::processData(int delflag) {
|
||||||
|
if(setReceiverOnline()==OFFLINE_FLAG){
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< " processing data - threaded mode " << *threadedProcessing << endl;
|
std::cout<< " processing data - threaded mode " << *threadedProcessing << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
queuesize=dataQueueSize();
|
queuesize=dataQueueSize();
|
||||||
|
|
||||||
int *myData;
|
int *myData;
|
||||||
int dum=1;
|
int dum=1;
|
||||||
|
|
||||||
fdata=NULL;
|
fdata=NULL;
|
||||||
|
|
||||||
while(dum | *threadedProcessing) { // ????????????????????????
|
while(dum | *threadedProcessing) { // ????????????????????????
|
||||||
/* IF THERE ARE DATA PROCESS THEM*/
|
/* IF THERE ARE DATA PROCESS THEM*/
|
||||||
while((queuesize=dataQueueSize())>0) {
|
while((queuesize=dataQueueSize())>0) {
|
||||||
/** Pop data queue */
|
/** Pop data queue */
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "data found"<< endl;
|
cout << "data found"<< endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
myData=dataQueueFront(); // get the data from the queue
|
myData=dataQueueFront(); // get the data from the queue
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "got them"<< endl;
|
cout << "got them"<< endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (myData) {
|
if (myData) {
|
||||||
processFrame(myData,delflag);
|
processFrame(myData,delflag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IF THERE ARE NO DATA look if acquisition is finished */
|
/* IF THERE ARE NO DATA look if acquisition is finished */
|
||||||
if (checkJoinThread()) {
|
if (checkJoinThread()) {
|
||||||
if (dataQueueSize()==0) {
|
if (dataQueueSize()==0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dum=0;
|
dum=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fdata) {
|
if (fdata) {
|
||||||
delete [] fdata;
|
delete [] fdata;
|
||||||
}
|
}
|
||||||
return 0;
|
}
|
||||||
|
//receiver
|
||||||
|
else{
|
||||||
|
int prevCaught=getCurrentFrameIndex();
|
||||||
|
int caught=0;
|
||||||
|
while(getRunStatus()!=IDLE){
|
||||||
|
//while((getCurrentProgress()<100)&&(getReceiverStatus()==RUNNING)){
|
||||||
|
caught=getCurrentFrameIndex();
|
||||||
|
incrementProgress(caught-prevCaught);cout<<endl;
|
||||||
|
prevCaught=caught;
|
||||||
|
usleep(1000000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user