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:
l_maliakal_d
2013-02-22 11:26:43 +00:00
parent b98545814f
commit aae7c68f65
7 changed files with 51 additions and 11 deletions

View File

@ -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;
};