Debugged loadCalibrationFile and loadSettingsFile concerning the extensions

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@238 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi
2012-09-04 10:18:16 +00:00
parent 43c51f5be5
commit 26b4b8a2a7
3 changed files with 22 additions and 8 deletions

View File

@ -31,9 +31,15 @@ int energyConversion::readCalibrationFile(string fname, double &gain, double &of
std::cout<< "Could not open calibration file "<< fname << std::endl;
gain=0.;
offset=0.;
#ifndef MYROOT
return FAIL;
#endif
return -1;
}
#ifndef MYROOT
return OK;
#endif
return 0;
};
int energyConversion::writeCalibrationFile(string fname, double gain, double offset){
@ -47,12 +53,18 @@ int energyConversion::writeCalibrationFile(string fname, double gain, double off
outfile << offset << " " << gain << std::endl;
} else {
std::cout<< "Could not open calibration file "<< fname << " for writing" << std::endl;
#ifndef MYROOT
return FAIL;
#endif
return -1;
}
outfile.close();
#ifndef MYROOT
return OK;
#endif
return 0;
};