added loadCalibrationfile and saving it

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@236 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-09-03 09:21:25 +00:00
parent b0eea2a6e6
commit 2b59857032
6 changed files with 130 additions and 5 deletions

View File

@ -31,9 +31,9 @@ int energyConversion::readCalibrationFile(string fname, double &gain, double &of
std::cout<< "Could not open calibration file "<< fname << std::endl;
gain=0.;
offset=0.;
return -1;
return FAIL;
}
return 0;
return OK;
};
int energyConversion::writeCalibrationFile(string fname, double gain, double offset){
@ -47,12 +47,12 @@ 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;
return -1;
return FAIL;
}
outfile.close();
return 0;
return OK;
};