fix for eiger, added python test for testig roi in different module and detector type configurations

This commit is contained in:
2025-06-25 13:41:47 +02:00
parent 8f0c946393
commit 23f8981346
6 changed files with 146 additions and 8 deletions

View File

@@ -155,9 +155,18 @@ void Implementation::setDetectorType(const detectorType d) {
break;
}
if (d == EIGER) {
// resets ROIs and sets size to 2
std::vector<ROI> rois(2);
std::vector<ROI> multiRoi(1);
setPortROIs(rois);
setMultiROIMetadata(multiRoi);
}
SetLocalNetworkParameters();
SetupFifoStructure();
// create threads
for (int i = 0; i < generalData->numUDPInterfaces; ++i) {
@@ -1013,6 +1022,8 @@ int Implementation::getNumberofUDPInterfaces() const {
// not Eiger
void Implementation::setNumberofUDPInterfaces(const int n) {
LOG(logDEBUG) << "Setting Number of UDP Interfaces: " << n;
if (generalData->detType == EIGER) {
throw RuntimeError("Cannot set number of UDP interfaces for Eiger");
}
@@ -1031,10 +1042,9 @@ void Implementation::setNumberofUDPInterfaces(const int n) {
// fifo
SetupFifoStructure();
// roi cleared - complete detector
// roi cleared - complete detector and sets roi vector size
std::vector<ROI> rois(n);
std::vector<ROI> multiRoi(1);
// recalculate port rois booleans for listener, processor and streamer
setPortROIs(rois);
setMultiROIMetadata(multiRoi);