mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
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:
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user