DetectorSetup: Configure UDP interface count

This commit is contained in:
2023-09-20 14:00:10 +02:00
parent aa3d9e5edb
commit 6cbd577824
9 changed files with 137 additions and 103 deletions
+9 -1
View File
@@ -47,6 +47,14 @@ void DetectorSetup::LoadGain(const std::vector<std::string> &filenames) {
gain_calibration.emplace_back(i);
}
DetectorSetup &DetectorSetup::UDPInterfaceCount(int64_t input) {
if ((input != 1) && (input != 2))
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Only 1 and 2 are supported as UDP interface count");
udp_interface_count = input;
return *this;
}
const std::vector<JFModuleGainCalibration> &DetectorSetup::GetGainCalibration() const {
return gain_calibration;
}
@@ -56,7 +64,7 @@ DetectorSetup::operator JFJochProtoBuf::Detector() const {
ret.set_nmodules(GetModulesNum());
ret.set_description(GetDescription());
ret.set_pixel_size_mm(GetPixelSize_mm());
ret.set_udp_interface_count(udp_interface_count);
for (const auto& iter: det_modules_hostname)
ret.add_module_hostname(iter);