fixed merge2

This commit is contained in:
Erik Frojdh
2019-08-08 17:16:02 +02:00
6 changed files with 123 additions and 20 deletions

View File

@ -254,7 +254,7 @@ void Detector::setReceiverPort(int value, Positions pos) {
pimpl->Parallel(&slsDetector::setReceiverPort, pos, value);
}
Result<bool> Detector::getLockServer(Positions pos) {
Result<bool> Detector::getLockServer(Positions pos) const {
return pimpl->Parallel(&slsDetector::lockServer, pos, -1);
}
@ -262,7 +262,7 @@ void Detector::setLockServer(bool value, Positions pos) {
pimpl->Parallel(&slsDetector::lockServer, pos, static_cast<int>(value));
}
Result<std::string> Detector::getLastClientIP(Positions pos) {
Result<std::string> Detector::getLastClientIP(Positions pos) const {
return pimpl->Parallel(&slsDetector::getLastClientIP, pos);
}
@ -274,6 +274,42 @@ void Detector::execCommand(const std::string &value, Positions pos) {
pimpl->Parallel(&slsDetector::execCommand, pos, value);
}
void Detector::writeConfigurationFile(const std::string &value) {
pimpl->writeConfigurationFile(value);
}
Result<defs::detectorSettings> Detector::getSettings(Positions pos) const {
return pimpl->Parallel(&slsDetector::getSettings, pos);
}
void Detector::setSettings(defs::detectorSettings value, Positions pos) {
pimpl->Parallel(&slsDetector::setSettings, pos, value);
}
Result<int> Detector::getThresholdEnergy(Positions pos) const {
return pimpl->Parallel(&slsDetector::getThresholdEnergy, pos);
}
void Detector::setThresholdEnergy(int value, defs::detectorSettings sett, int tb, Positions pos) {
pimpl->Parallel(&slsDetector::setThresholdEnergy, pos, value, sett, tb);
}
Result<std::string> Detector::getSettingsDir(Positions pos) const {
return pimpl->Parallel(&slsDetector::getSettingsDir, pos);
}
void Detector::setSettingsDir(const std::string &value, Positions pos) {
pimpl->Parallel(&slsDetector::setSettingsDir, pos, value);
}
void Detector::loadSettingsFile(const std::string &value, Positions pos) {
pimpl->Parallel(&slsDetector::loadSettingsFile, pos, value);
}
void Detector::saveSettingsFile(const std::string &value, Positions pos) {
pimpl->Parallel(&slsDetector::saveSettingsFile, pos, value);
}
// Erik
Result<int> Detector::getFramesCaughtByReceiver(Positions pos) const {
return pimpl->Parallel(&slsDetector::getFramesCaughtByReceiver, pos);

View File

@ -880,7 +880,7 @@ void multiSlsDetector::readConfigurationFile(const std::string &fname) {
input_file.close();
}
int multiSlsDetector::writeConfigurationFile(const std::string &fname) {
void multiSlsDetector::writeConfigurationFile(const std::string &fname) {
// TODO! make exception safe!
const std::vector<std::string> header{"detsizechan", "hostname"};
std::ofstream outfile;
@ -901,7 +901,6 @@ int multiSlsDetector::writeConfigurationFile(const std::string &fname) {
throw RuntimeError("Could not open configuration file " + fname +
" for writing");
}
return OK;
}
slsDetectorDefs::detectorSettings multiSlsDetector::getSettings(int detPos) {

View File

@ -40,8 +40,8 @@ int slsDetectorUsers::readConfigurationFile(const std::string& fname){
}
}
int slsDetectorUsers::writeConfigurationFile(const std::string& fname){
return detector.writeConfigurationFile(fname);
void slsDetectorUsers::writeConfigurationFile(const std::string& fname){
detector.writeConfigurationFile(fname);
}
int slsDetectorUsers::retrieveDetectorSetup(const std::string& fname){