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

@ -271,6 +271,31 @@ class fileIOStatic {
/** static function that returns the entire filename ithout file name prefix, detector index or extension
This will be concatenated with all the other detector file names for the gui
\param fname complete file name
\returns file name without file name prefix, detector index or extension
*/
static string getReceiverFileNameToConcatenate(string fname) { \
int i; \
string s; \
s=fname; \
size_t slash=s.rfind("/"); \
if (slash!= string::npos) \
s=s.substr(slash,s.size()-slash); \
size_t dot=s.find("."); \
size_t uscore=s.find("_"); \
s=s.substr(uscore,dot-uscore); \
uscore=s.find("_",1); \
if ((uscore!= string::npos) && (sscanf( s.substr(1,uscore-1).c_str(),"d%d",&i))) \
s=s.substr(uscore,s.size()-uscore); \
return s; \
};
/**
writes a data file