mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 23:10:02 +02:00
parallelizing file name has its consequences, file name prefix edited only in multi level
This commit is contained in:
parent
15b86a50d5
commit
3a79f0ad9b
@ -5229,6 +5229,11 @@ string multiSlsDetector::setFileName(string s) {
|
||||
string ret = "error";
|
||||
int posmax = thisMultiDetector->numberOfDetectors;
|
||||
|
||||
if(!s.empty()){
|
||||
fileIO::setFileName(s);
|
||||
s=createReceiverFilePrefix();
|
||||
}
|
||||
|
||||
if(!threadpool){
|
||||
cout << "Error in creating threadpool. Exiting" << endl;
|
||||
return string("");
|
||||
@ -5259,6 +5264,14 @@ string multiSlsDetector::setFileName(string s) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((ret != "error") || (ret != "")) {
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Complete file prefix from receiver: " << ret << std::endl;
|
||||
#endif
|
||||
fileIO::setFileName(getNameFromReceiverFilePrefix(ret));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -7774,17 +7774,14 @@ string slsDetector::setFileName(string s) {
|
||||
int ret = FAIL;
|
||||
char arg[MAX_STR_LENGTH]="";
|
||||
char retval[MAX_STR_LENGTH]="";
|
||||
string sretval="";
|
||||
|
||||
if(!s.empty()){
|
||||
/*if(!s.empty()){
|
||||
pthread_mutex_lock(&ms);
|
||||
fileIO::setFileName(s);
|
||||
/*if(thisDetector->myDetectorType == EIGER)
|
||||
parentDet->setDetectorIndex(posId);
|
||||
else if(parentDet->getNumberOfDetectors()>1)
|
||||
parentDet->setDetectorIndex(-1);*/
|
||||
s=parentDet->createReceiverFilePrefix();
|
||||
pthread_mutex_unlock(&ms);
|
||||
}
|
||||
}*/
|
||||
|
||||
if(thisDetector->receiverOnlineFlag==ONLINE_FLAG){
|
||||
strcpy(arg,s.c_str());
|
||||
@ -7799,20 +7796,25 @@ string slsDetector::setFileName(string s) {
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Complete file prefix from receiver: " << retval << std::endl;
|
||||
#endif
|
||||
/*
|
||||
pthread_mutex_lock(&ms);
|
||||
fileIO::setFileName(parentDet->getNameFromReceiverFilePrefix(string(retval)));
|
||||
pthread_mutex_unlock(&ms);
|
||||
*/
|
||||
sretval = fileIO::getNameFromReceiverFilePrefix(string(retval));
|
||||
|
||||
}
|
||||
|
||||
if(ret==FORCE_UPDATE)
|
||||
updateReceiver();
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&ms);
|
||||
/*pthread_mutex_lock(&ms);
|
||||
s = fileIO::getFileName();
|
||||
pthread_mutex_unlock(&ms);
|
||||
|
||||
return s;
|
||||
return s;*/
|
||||
return sretval;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user