removed hard coded dac names in python NamedDacs and NamedPowers
Build on RHEL9 docker image / build (push) Successful in 3m34s
Build on RHEL8 docker image / build (push) Successful in 5m6s
Run Simulator Tests on local RHEL9 / build (push) Successful in 14m40s
Run Simulator Tests on local RHEL8 / build (push) Successful in 17m5s

This commit is contained in:
2026-03-25 16:30:29 +01:00
parent 99a1c96e66
commit cb645b9a1c
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -53,10 +53,7 @@ class NamedDacs:
def _dacnames(self):
if self._detector.size() == 0:
raise RuntimeError("No modules added")
if hasattr(self._detector, 'daclist'):
return [n.replace(" ", "") for n in self._detector.daclist]
else:
return [f"DAC{i}" for i in range(18)]
return [n.replace(" ", "") for n in self._detector.daclist]
def __getattr__(self, name):
if name in self._dacnames:
+1 -1
View File
@@ -81,7 +81,7 @@ class NamedPowers:
if hasattr(self._detector, 'powerlist'):
return [n.replace(" ", "") for n in self._detector.powerlist]
else:
return ["VA", "VB", "VC", "VD", "VIO"]
raise RuntimeError("Detector does not have powerlist attribute")
def __getattr__(self, name):
if name in self._powernames: