DAQ: ALC failed message, if objects are detected send to server which objects were detected and how many times

This commit is contained in:
2025-10-29 13:54:41 +01:00
parent ecf6bf0dac
commit 7d4dd0ebf5
+14
View File
@@ -1129,6 +1129,20 @@ class AareDAQ:
return True
except Exception as e:
total_detections = sum(found_classes_count.values())
if total_detections == 0:
self.__aare.alc_failed(self.sample, alc_comment="No objects detected")
else:
self.__aare.alc_failed(
self.sample,
alc_comment=(
"Failed to centre but detected objects - "
f"Crystal: {found_classes_count.get(2,0)}, "
f"Loop_face: {found_classes_count.get(3,0)}, "
f"Loop_all: {found_classes_count.get(0,0)}, "
f"Pin: {found_classes_count.get(1,0)}"
),
)
logger.info(f"Error in loop centering: {e}")
return False