v1.0.0-rc.68
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include "DetectorSetup.h"
|
||||
#include "JFJochException.h"
|
||||
#include "NetworkAddressConvert.h"
|
||||
#define check_max(param, val, max) if ((val) > (max)) throw JFJochException(JFJochExceptionCategory::InputParameterAboveMax, param)
|
||||
#define check_min(param, val, min) if ((val) < (min)) throw JFJochException(JFJochExceptionCategory::InputParameterBelowMin, param)
|
||||
|
||||
DetectorSetup::DetectorSetup(const DetectorGeometryFixed &geom, DetectorType detector_type,
|
||||
const std::string &description, const std::vector<std::string> &det_modules_hostname)
|
||||
@@ -390,6 +392,15 @@ std::string DetectorSetup::GetDECTRISROI() const {
|
||||
return dectris_roi;
|
||||
}
|
||||
|
||||
std::optional<DetectorSettings> DetectorSetup::GetDefaultSettings() const {
|
||||
return settings;
|
||||
}
|
||||
|
||||
DetectorSetup &DetectorSetup::DefaultSettings(const std::optional<DetectorSettings> &input) {
|
||||
settings = input;
|
||||
return *this;
|
||||
}
|
||||
|
||||
DetectorSetup DetJF4M(const std::string &description, const std::vector<std::string> &det_modules_hostname) {
|
||||
return DetJF(8, 2, 8, 36, true, description, det_modules_hostname);
|
||||
}
|
||||
@@ -425,4 +436,15 @@ DetectorSetup DetDECTRIS(int64_t width, int64_t height, const std::string &descr
|
||||
return {DetectorGeometryFixed(width, height), DetectorType::DECTRIS, description, {}};
|
||||
else
|
||||
return {DetectorGeometryFixed(width, height), DetectorType::DECTRIS, description, {addr}};
|
||||
}
|
||||
}
|
||||
|
||||
int32_t DetectorSetup::GetTempThreshold_degC() const {
|
||||
return temperature_thresold_degC;
|
||||
}
|
||||
|
||||
DetectorSetup &DetectorSetup::TempThreshold_degC(int64_t input) {
|
||||
check_min("Temperature threshold (degC)", input, 40);
|
||||
check_max("Temperature threshold (degC)", input, 70);
|
||||
temperature_thresold_degC = static_cast<int32_t>(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user