mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
fixed some probelems wuth scans for receiver and also scans for allframes/frameindex
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@654 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
97aa35a388
commit
3098664c8f
@ -2,10 +2,10 @@
|
||||
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/eigerDetectorServer"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
|
||||
//#define SVNREV 0x649
|
||||
//#define SVNREV 0x652
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "l_maliakal_d"
|
||||
#define SVNREV 0x649
|
||||
#define SVNDATE 0x20130808
|
||||
#define SVNREV 0x652
|
||||
#define SVNDATE 0x20130813
|
||||
//
|
||||
|
@ -2,10 +2,10 @@
|
||||
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/gotthardDetectorServer"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
|
||||
//#define SVNREV 0x651
|
||||
//#define SVNREV 0x653
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "l_maliakal_d"
|
||||
#define SVNREV 0x651
|
||||
#define SVNDATE 0x20130812
|
||||
#define SVNREV 0x653
|
||||
#define SVNDATE 0x20130815
|
||||
//
|
||||
|
@ -2,10 +2,10 @@
|
||||
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/moenchDetectorServer"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
|
||||
//#define SVNREV 0x649
|
||||
//#define SVNREV 0x652
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "l_maliakal_d"
|
||||
#define SVNREV 0x649
|
||||
#define SVNDATE 0x20130808
|
||||
#define SVNREV 0x652
|
||||
#define SVNDATE 0x20130813
|
||||
//
|
||||
|
@ -2,10 +2,10 @@
|
||||
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/mythenDetectorServer"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
|
||||
//#define SVNREV 0x649
|
||||
//#define SVNREV 0x652
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "l_maliakal_d"
|
||||
#define SVNREV 0x649
|
||||
#define SVNDATE 0x20130808
|
||||
#define SVNREV 0x652
|
||||
#define SVNDATE 0x20130813
|
||||
//
|
||||
|
@ -2719,7 +2719,7 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
|
||||
int ret=FAIL;
|
||||
char mess[100];
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "Getting threshold energy "<< std::endl;
|
||||
std::cout<< "Setting threshold energy "<< std::endl;
|
||||
#endif
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
if (connectControl() == OK){
|
||||
|
@ -2,10 +2,10 @@
|
||||
#define SVNURLLIB "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUIDLIB "951219d9-93cf-4727-9268-0efd64621fa3"
|
||||
//#define SVNREV 0x651
|
||||
//#define SVNREV 0x653
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTHLIB "l_maliakal_d"
|
||||
#define SVNREVLIB 0x651
|
||||
#define SVNDATELIB 0x20130812
|
||||
#define SVNREVLIB 0x653
|
||||
#define SVNDATELIB 0x20130815
|
||||
//
|
||||
|
@ -421,7 +421,7 @@ void* postProcessing::processData(int delflag) {
|
||||
*/
|
||||
|
||||
|
||||
int prevCaught=0;
|
||||
int prevCaught=-1;
|
||||
int caught=0;
|
||||
bool newData=false;
|
||||
char currentfName[MAX_STR_LENGTH]="";
|
||||
@ -483,7 +483,7 @@ void* postProcessing::processData(int delflag) {
|
||||
//get data
|
||||
strcpy(currentfName,"");
|
||||
pthread_mutex_lock(&mg);
|
||||
int* receiverData = readFrameFromReceiver(currentfName,currentfIndex);
|
||||
int* receiverData = readFrameFromReceiver(currentfName,currentfIndex);//if(currentfIndex!=-1)cout<<"--currentfIndex:"<<currentfIndex<<endl;
|
||||
pthread_mutex_unlock(&mg);
|
||||
if(setReceiverOnline()==OFFLINE_FLAG)
|
||||
receiverData = NULL;
|
||||
@ -494,14 +494,14 @@ void* postProcessing::processData(int delflag) {
|
||||
|
||||
// determine if new Data for nth frame read
|
||||
if (read_freq){
|
||||
//delete if not new data
|
||||
if (caught <= prevCaught)
|
||||
currentfIndex = -1;
|
||||
#ifdef VERBOSE
|
||||
std::cout << "caught:" << caught << " prevcaught:" << prevCaught << std::endl;
|
||||
#endif
|
||||
//delete if not new data
|
||||
if((caught == prevCaught) || (caught == -1))
|
||||
currentfIndex = -1;
|
||||
else if (currentfIndex!=-1)
|
||||
prevCaught=caught;
|
||||
|
||||
}
|
||||
|
||||
//not garbage frame
|
||||
|
@ -459,7 +459,7 @@ int slsReceiverFunctionList::startListening(){
|
||||
else
|
||||
startFrameIndex = ((((uint32_t)(*((uint32_t*)buffer))) & (frameIndexMask)) >> frameIndexOffset);
|
||||
|
||||
//cout<<"startFrameIndex:"<<startFrameIndex<<endl;
|
||||
cout<<"startFrameIndex:"<<startFrameIndex<<endl;
|
||||
prevframenum=startFrameIndex;
|
||||
measurementStarted = true;
|
||||
}
|
||||
@ -600,9 +600,9 @@ int slsReceiverFunctionList::startWriting(){
|
||||
cout << savefilename << endl;
|
||||
else{
|
||||
if(!frameIndexOffset)
|
||||
packetloss = ((currframenum-prevframenum-(packetsPerFrame*framesInFile))/(double)(packetsPerFrame*framesInFile))*100.000;
|
||||
packetloss = (int)(((currframenum-prevframenum-(packetsPerFrame*framesInFile))/(double)(packetsPerFrame*framesInFile))*100.000);
|
||||
else
|
||||
packetloss = ((currframenum-prevframenum-(framesInFile))/(double)(framesInFile))*100.000;
|
||||
packetloss = (int)(((currframenum-prevframenum-(framesInFile))/(double)(framesInFile))*100.000);
|
||||
cout << savefilename
|
||||
<< "\tpacket loss " << setw(4)<<fixed << setprecision(4) << packetloss
|
||||
<< "%\tframenum "
|
||||
@ -714,6 +714,7 @@ int slsReceiverFunctionList::startWriting(){
|
||||
break;
|
||||
}
|
||||
}
|
||||
cout << "RealTime Frames Caught:" << framesCaught << endl;
|
||||
cout << "Total Frames Caught:"<< totalFramesCaught << endl;
|
||||
|
||||
|
||||
|
@ -1179,6 +1179,9 @@ int slsReceiverFuncs::gotthard_read_frame(){
|
||||
#endif
|
||||
}else{
|
||||
index=(uint32_t)(*(uint32_t*)raw);
|
||||
#ifdef VERBOSE
|
||||
cout<<"index:"<<index<<endl;
|
||||
#endif
|
||||
if(shortFrame==-1)
|
||||
index2= (uint32_t)(*((uint32_t*)((char*)(raw+onebuffersize))));
|
||||
memcpy(origVal,raw,bufferSize);
|
||||
@ -1213,9 +1216,10 @@ int slsReceiverFuncs::gotthard_read_frame(){
|
||||
}
|
||||
|
||||
#ifdef VERBOSE
|
||||
cout << "\nstartIndex:" << startIndex << endl;
|
||||
if(arg!=-1){
|
||||
cout << "fName:" << fName << endl;
|
||||
cout << "index:" << arg << endl;
|
||||
cout << "findex:" << arg << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -1268,11 +1272,11 @@ int slsReceiverFuncs::set_read_frequency(){
|
||||
if (lockStatus==1 && socket->differentClients==1){//necessary???
|
||||
sprintf(mess,"Receiver locked by %s\n", socket->lastClientIP);
|
||||
ret=FAIL;
|
||||
}
|
||||
}/*
|
||||
else if((slsReceiverList->getStatus()==RUNNING) && (index >= 0)){
|
||||
ret = FAIL;
|
||||
strcpy(mess,"cannot set up receiver mode when receiver is running\n");
|
||||
}
|
||||
}*/
|
||||
else
|
||||
retval=slsReceiverList->setNFrameToGui(index);
|
||||
}
|
||||
|
@ -2,10 +2,10 @@
|
||||
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/slsReceiver"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
|
||||
//#define SVNREV 0x649
|
||||
//#define SVNREV 0x652
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "l_maliakal_d"
|
||||
#define SVNREV 0x649
|
||||
#define SVNDATE 0x20130808
|
||||
#define SVNREV 0x652
|
||||
#define SVNDATE 0x20130813
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user