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:
bergamaschi
2012-10-10 08:12:42 +00:00
parent 7f8f89f89d
commit b75b09cc7b
10 changed files with 160 additions and 58 deletions

View File

@ -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 << " "; \