moench: removed api that goes only to processor (future: one has to use rX_jsonaddheader or rx_jsonpara to set key and values)

This commit is contained in:
2020-09-08 12:34:56 +02:00
parent aecde086a0
commit 8e49a114db
8 changed files with 1 additions and 247 deletions

View File

@ -1840,71 +1840,6 @@ void Detector::setAdditionalJsonParameter(const std::string &key,
pimpl->Parallel(&Module::setAdditionalJsonParameter, pos, key, value);
}
Result<int> Detector::getDetectorMinMaxEnergyThreshold(const bool isEmax,
Positions pos) const {
auto res = pimpl->Parallel(&Module::getAdditionalJsonParameter, pos,
isEmax ? "emax" : "emin");
Result<int> intResult(res.size());
try {
for (unsigned int i = 0; i < res.size(); ++i) {
intResult[i] = stoi(res[i]);
}
} catch (...) {
throw RuntimeError(
"Cannot find or convert emin/emax string to integer");
}
return intResult;
}
void Detector::setDetectorMinMaxEnergyThreshold(const bool isEmax,
const int value,
Positions pos) {
pimpl->Parallel(&Module::setAdditionalJsonParameter, pos,
isEmax ? "emax" : "emin", std::to_string(value));
}
Result<defs::frameModeType> Detector::getFrameMode(Positions pos) const {
auto res =
pimpl->Parallel(&Module::getAdditionalJsonParameter, pos, "frameMode");
Result<defs::frameModeType> intResult(res.size());
try {
for (unsigned int i = 0; i < res.size(); ++i) {
intResult[i] =
sls::StringTo<slsDetectorDefs::frameModeType>(res[i]);
}
} catch (...) {
throw RuntimeError(
"Cannot find or convert frameMode string to integer");
}
return intResult;
}
void Detector::setFrameMode(defs::frameModeType value, Positions pos) {
pimpl->Parallel(&Module::setAdditionalJsonParameter, pos, "frameMode",
sls::ToString(value));
}
Result<defs::detectorModeType> Detector::getDetectorMode(Positions pos) const {
auto res = pimpl->Parallel(&Module::getAdditionalJsonParameter, pos,
"detectorMode");
Result<defs::detectorModeType> intResult(res.size());
try {
for (unsigned int i = 0; i < res.size(); ++i) {
intResult[i] =
sls::StringTo<slsDetectorDefs::detectorModeType>(res[i]);
}
} catch (...) {
throw RuntimeError(
"Cannot find or convert detectorMode string to integer");
}
return intResult;
}
void Detector::setDetectorMode(defs::detectorModeType value, Positions pos) {
pimpl->Parallel(&Module::setAdditionalJsonParameter, pos, "detectorMode",
sls::ToString(value));
}
// Advanced
void Detector::programFPGA(const std::string &fname, Positions pos) {