mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 08:17:13 +02:00
dataReady called
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@288 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -142,7 +142,10 @@ class fileIOStatic {
|
||||
|
||||
static int writeDataFile(string fname, int nch, double *data, double *err=NULL, double *ang=NULL, char dataformat='f'){ \
|
||||
ofstream outfile; \
|
||||
if (data==NULL) return slsDetectorDefs::FAIL; \
|
||||
if (data==NULL) { \
|
||||
cout << "No data to write!" << endl; \
|
||||
return slsDetectorDefs::FAIL; \
|
||||
} \
|
||||
outfile.open (fname.c_str(),ios_base::out); \
|
||||
if (outfile.is_open()) { \
|
||||
writeDataFile(outfile, nch, data, err, ang, dataformat, 0); \
|
||||
@ -167,8 +170,10 @@ class fileIOStatic {
|
||||
*/
|
||||
static int writeDataFile(ofstream &outfile, int nch, double *data, double *err=NULL, double *ang=NULL, char dataformat='f', int offset=0){ \
|
||||
int idata; \
|
||||
if (data==NULL) \
|
||||
if (data==NULL) { \
|
||||
cout << "No data to write!" << endl; \
|
||||
return slsDetectorDefs::FAIL; \
|
||||
} \
|
||||
for (int ichan=0; ichan<nch; ichan++) { \
|
||||
if (ang==NULL) { \
|
||||
outfile << ichan+offset << " "; \
|
||||
|
Reference in New Issue
Block a user