mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
changing file name prefix orders, reset frames caught command from command line
This commit is contained in:
@ -59,11 +59,11 @@ class fileIOStatic {
|
||||
static string createFileName(char *filepath, char *filename, int aMask, double sv0, int prec0, double sv1, int prec1, int pindex, int npos, int findex, int frameindex=-1, int detindex=-1){ \
|
||||
ostringstream osfn; \
|
||||
osfn << filepath << "/" << filename; \
|
||||
if(detindex>=0) osfn << "_d"<< detindex; \
|
||||
if ( aMask& (1 << (slsDetectorDefs::MAX_ACTIONS))) osfn << "_S" << fixed << setprecision(prec0) << sv0; \
|
||||
if (aMask & (1 << (slsDetectorDefs::MAX_ACTIONS+1))) osfn << "_s" << fixed << setprecision(prec1) << sv1; \
|
||||
if (pindex>0 && pindex<=npos) osfn << "_p" << pindex; \
|
||||
if(frameindex>=0) osfn << "_f" << frameindex; \
|
||||
if(detindex>=0) osfn << "_d"<< detindex; \
|
||||
osfn << "_" << findex; \
|
||||
return osfn.str(); \
|
||||
};
|
||||
@ -89,10 +89,10 @@ class fileIOStatic {
|
||||
static string createReceiverFilePrefix(char *filename, int aMask, double sv0, int prec0, double sv1, int prec1, int pindex, int npos,int detindex=-1){ \
|
||||
ostringstream osfn; \
|
||||
osfn << filename; \
|
||||
if(detindex!=-1) osfn << "_d"<< detindex; \
|
||||
if ( aMask& (1 << (slsDetectorDefs::MAX_ACTIONS))) osfn << "_S" << fixed << setprecision(prec0) << sv0; \
|
||||
if (aMask & (1 << (slsDetectorDefs::MAX_ACTIONS+1))) osfn << "_s" << fixed << setprecision(prec1) << sv1; \
|
||||
if (pindex>0 && pindex<=npos) osfn << "_p" << pindex; \
|
||||
if(detindex!=-1) osfn << "_d"<< detindex; \
|
||||
return osfn.str(); \
|
||||
};
|
||||
|
||||
@ -218,6 +218,11 @@ class fileIOStatic {
|
||||
} \
|
||||
else cout << "******************************** cannot parse frame index" << endl; \
|
||||
uscore=s.rfind("_"); \
|
||||
if (sscanf( s.substr(uscore+1,s.size()-uscore-1).c_str(),"d%d",&i)) { \
|
||||
detindex=i; \
|
||||
} \
|
||||
else cout << "******************************** cannot parse detector id" << endl; \
|
||||
uscore=s.rfind("_"); \
|
||||
if (sscanf( s.substr(uscore+1,s.size()-uscore-1).c_str(),"p%d",&i)) { \
|
||||
p_index=i; \
|
||||
s=fname.substr(0,uscore); \
|
||||
@ -235,11 +240,6 @@ class fileIOStatic {
|
||||
s=fname.substr(0,uscore); \
|
||||
} \
|
||||
else cout << "******************************** cannot parse scan varable 0" << endl; \
|
||||
uscore=s.rfind("_"); \
|
||||
if (sscanf( s.substr(uscore+1,s.size()-uscore-1).c_str(),"d%d",&i)) { \
|
||||
detindex=i; \
|
||||
} \
|
||||
else cout << "******************************** cannot parse detector id" << endl; \
|
||||
return index; \
|
||||
};
|
||||
|
||||
@ -254,6 +254,9 @@ class fileIOStatic {
|
||||
double f; \
|
||||
string s; \
|
||||
s=fname; \
|
||||
uscore=s.rfind("_"); \
|
||||
if (sscanf( s.substr(uscore+1,s.size()-uscore-1).c_str(),"d%d",&i)) \
|
||||
s=fname.substr(0,uscore); \
|
||||
size_t uscore=s.rfind("_"); \
|
||||
if (sscanf( s.substr(uscore+1,s.size()-uscore-1).c_str(),"p%d",&i)) \
|
||||
s=fname.substr(0,uscore); \
|
||||
@ -263,9 +266,6 @@ class fileIOStatic {
|
||||
uscore=s.rfind("_"); \
|
||||
if (sscanf( s.substr(uscore+1,s.size()-uscore-1).c_str(),"S%lf",&f)) \
|
||||
s=fname.substr(0,uscore); \
|
||||
uscore=s.rfind("_"); \
|
||||
if (sscanf( s.substr(uscore+1,s.size()-uscore-1).c_str(),"d%d",&i)) \
|
||||
s=fname.substr(0,uscore); \
|
||||
return s; \
|
||||
};
|
||||
|
||||
|
@ -563,7 +563,7 @@ void* postProcessing::processData(int delflag) {
|
||||
#endif
|
||||
pthread_mutex_unlock(&mg);
|
||||
//go through once more to get last nth frame data
|
||||
if (acquiringDone >= 4){
|
||||
if (acquiringDone >= 5){cout<<"acquiringdone:"<<acquiringDone<<endl;
|
||||
if((!nthframe) ||(!newData)){
|
||||
#ifdef VERY_VERY_DEBUG
|
||||
cout << "gonna post for it to end" << endl;
|
||||
@ -596,9 +596,9 @@ void* postProcessing::processData(int delflag) {
|
||||
}
|
||||
|
||||
if(newData){
|
||||
#ifdef VERY_VERY_DEBUG
|
||||
//#ifdef VERY_VERY_DEBUG
|
||||
cout << "new data" << endl;
|
||||
#endif
|
||||
//#endif
|
||||
if(setReceiverOnline()==ONLINE_FLAG){
|
||||
//get data
|
||||
strcpy(currentfName,"");
|
||||
|
Reference in New Issue
Block a user