formattin
All checks were successful
Build on RHEL9 / build (push) Successful in 2m53s
Build on RHEL8 / build (push) Successful in 4m57s

This commit is contained in:
2025-07-02 19:44:44 +02:00
parent 313fc75950
commit 94a9476550
5 changed files with 24 additions and 15 deletions

View File

@@ -208,8 +208,11 @@ defs::xy Detector::getPortPerModuleGeometry() const {
Result<defs::xy> Detector::getPortSize(Positions pos) const {
Result<defs::xy> res = pimpl->Parallel(&Module::getNumberOfChannels, pos);
defs::xy portGeometry = getPortPerModuleGeometry();
if ((portGeometry.x != 1 && portGeometry.x != 2) || (portGeometry.y != 1 && portGeometry.y != 2)) {
throw RuntimeError("Port size is not 1 or 2 in either dimension. Port geometry:" + ToString(portGeometry));
if ((portGeometry.x != 1 && portGeometry.x != 2) ||
(portGeometry.y != 1 && portGeometry.y != 2)) {
throw RuntimeError(
"Port size is not 1 or 2 in either dimension. Port geometry:" +
ToString(portGeometry));
}
for (auto &it : res) {
it.x /= portGeometry.x;

View File

@@ -1783,9 +1783,10 @@ void DetectorImpl::convertGlobalRoiToPortLevel(
throw RuntimeError("Only up to 2 ports per module supported.");
}
if (numPortsPerModule != (int)portRois.size()) {
throw RuntimeError("Number of port ROIs does not match number of ports in module. Expected: " +
std::to_string(numPortsPerModule) + ", got: " +
std::to_string(portRois.size()));
throw RuntimeError("Number of port ROIs does not match number of ports "
"in module. Expected: " +
std::to_string(numPortsPerModule) +
", got: " + std::to_string(portRois.size()));
}
for (int port = 0; port != numPortsPerModule; ++port) {
@@ -1818,7 +1819,8 @@ void DetectorImpl::convertGlobalRoiToPortLevel(
std::min(userRoi.ymax, portRoi.ymax) - portRoi.ymin;
}
// Check if port ROI already exists for this port (from another user roi)
// Check if port ROI already exists for this port (from another user
// roi)
if (!portRois[port].completeRoi() && !portRois[port].noRoi()) {
throw RuntimeError(
"Multiple ROIs specified for the same port " +