diff --git a/detector_control/DetectorWrapper.cpp b/detector_control/DetectorWrapper.cpp index 98b80da5..6aaa4865 100644 --- a/detector_control/DetectorWrapper.cpp +++ b/detector_control/DetectorWrapper.cpp @@ -9,25 +9,21 @@ void DetectorWrapper::Configure(const JFJochProtoBuf::DetectorConfig &request) { logger.Info("Configure"); - if (det.size() != request.modules_size()) { - logger.Error("Discrepancy in module number between DAQ and detector"); - throw JFJochException(JFJochExceptionCategory::Detector, - "Discrepancy in module number between DAQ and detector"); - } try { - InternalStop(); + if (det.size() > 0) + InternalStop(); if (request.module_hostname_size() > 0) { - if (det.size() != request.module_hostname_size()) { - logger.Error("Discrepancy in module number between DAQ and detector"); - throw JFJochException(JFJochExceptionCategory::Detector, - "Discrepancy in module number between DAQ and detector"); - } std::vector module_hostname; for (const auto &iter: request.module_hostname()) module_hostname.push_back(iter); logger.Info("Resetting detector module host names"); det.setHostname(module_hostname); } + if (det.size() != request.modules_size()) { + logger.Error("Discrepancy in module number between DAQ and detector"); + throw JFJochException(JFJochExceptionCategory::Detector, + "Discrepancy in module number between DAQ and detector"); + } det.setNumberofUDPInterfaces(2); @@ -57,10 +53,13 @@ void DetectorWrapper::Configure(const JFJochProtoBuf::DetectorConfig &request) { det.setTemperatureControl(true); det.setThresholdTemperature(55); + det.setSynchronization(false); + + det.setTimingMode(slsDetectorDefs::timingMode::TRIGGER_EXPOSURE); + det.setMaster(true, 0); det.setSynchronization(true); - det.setTimingMode(slsDetectorDefs::timingMode::TRIGGER_EXPOSURE); det.setAutoComparatorDisable(true); if (!det.getPowerChip().squash(false)) { det.setPowerChip(true); diff --git a/etc/broker.json b/etc/broker.json index 05642061..33d1d898 100644 --- a/etc/broker.json +++ b/etc/broker.json @@ -34,7 +34,7 @@ "count_time_us": "980 us", "spot_finding_period_us": "5 ms", "preview_period_us": "1 s", - "ipv4_subnet": "10.10.85.0" + "detector_ipv4": "10.10.85.0" }, "detectors": [ { diff --git a/receiver/jfjoch_action_test.cpp b/receiver/jfjoch_action_test.cpp index b1cd236a..af6b27bd 100644 --- a/receiver/jfjoch_action_test.cpp +++ b/receiver/jfjoch_action_test.cpp @@ -108,7 +108,7 @@ int main(int argc, char **argv) { logger.Info(""); for (int i = 0; i < nstreams; i++) { auto stalls_hbm = output.device_statistics(i).fpga_status().stalls_hbm(); - auto stalls_host = output.device_statistics(i).fpga_status().stalls_hbm(); + auto stalls_host = output.device_statistics(i).fpga_status().stalls_host(); uint64_t throughput_MBs = nimages * nmodules * RAW_MODULE_SIZE*sizeof(uint16_t) * clock_MHz / (nimages * nmodules * 128 * 128 + stalls_hbm); double performance = static_cast(throughput_MBs) / 1000;