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