From eeaec1b964d79ba5f4b8c12fbd2377ced46206e4 Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Tue, 12 Dec 2023 14:46:26 +0100 Subject: [PATCH] CLDReco: only allow a single XML file and fail otherwise --- CLDConfig/CLDReconstruction.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CLDConfig/CLDReconstruction.py b/CLDConfig/CLDReconstruction.py index 06583e5..ca2edae 100644 --- a/CLDConfig/CLDReconstruction.py +++ b/CLDConfig/CLDReconstruction.py @@ -307,9 +307,12 @@ "UseTruthInPrefit": ["false"] } -if any(small_vtx in detPath for detPath in geoservice.detectors for small_vtx in ["_o2_", "_o3_", "_o4_"]): +if len(geoservice.detectors) > 1: + raise RuntimeError("Too many XML files for the detector path, please only specify the main file!") + +if any(small_vtx in geoservice.detectors[0] for small_vtx in ["_o2_", "_o3_", "_o4_"]): CT_MAX_DIST = "0.05;" # semi-colon is important! -elif any("_o1_" in detPath for detPath in geoservice.detectors): +elif "_o1_" in geoservice.detectors[0]: CT_MAX_DIST = "0.03;" # semi-colon is important! else: raise RuntimeError("Unknown detector model to chose CT_MAX_DISTANCE")