mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
concatenated filenames for the gui when using receiver
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@469 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -4160,6 +4160,10 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
|
||||
int n;
|
||||
int* retval=new int[nel];
|
||||
int *retdet, *p=retval;
|
||||
string fullFName="";
|
||||
string ext="";
|
||||
|
||||
|
||||
|
||||
for (int id=0; id<thisMultiDetector->numberOfDetectors; id++) {
|
||||
if (detectors[id]) {
|
||||
@ -4169,6 +4173,14 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
|
||||
memcpy(p,retdet,n);
|
||||
delete [] retdet;
|
||||
p+=n/sizeof(int);
|
||||
//concatenate filenames
|
||||
if(!fullFName.length()){
|
||||
fullFName.assign(fileIO::getFileName());
|
||||
size_t dot = fullFName.rfind(".");
|
||||
if(dot != string::npos)
|
||||
ext = fullFName.substr(dot,fullFName.size()-dot);
|
||||
}
|
||||
fullFName.append(getReceiverFileNameToConcatenate(fName));
|
||||
}else {
|
||||
#ifdef VERBOSE
|
||||
cout << "Receiver for detector " << id << " does not have data left " << endl;
|
||||
@ -4178,6 +4190,8 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
|
||||
}
|
||||
}
|
||||
}
|
||||
fullFName.append(ext);
|
||||
strcpy(fName,fullFName.c_str());
|
||||
return retval;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user