w
This commit is contained in:
@@ -30,6 +30,8 @@ if TYPE_CHECKING:
|
||||
|
||||
gui: BECGuiClient # type: ignore[no-redef]
|
||||
|
||||
dev: bec.device_manager
|
||||
|
||||
|
||||
class Detector(BaseModel):
|
||||
"""Model representing a detector configuration."""
|
||||
@@ -108,14 +110,14 @@ class DebugTools:
|
||||
|
||||
def _check_if_mcs_card_is_loaded(self):
|
||||
"""Check if the MCS card device is loaded in the current BEC session."""
|
||||
if "mcs" not in bec.devices:
|
||||
if "mcs" not in dev:
|
||||
raise RuntimeError("MCS device is not loaded in the current active BEC session.")
|
||||
|
||||
def _check_if_ddg_is_loaded(self):
|
||||
"""Check if the DDG1 device is loaded in the current BEC session."""
|
||||
if "ddg1" not in bec.devices:
|
||||
if "ddg1" not in dev:
|
||||
raise RuntimeError("DDG1 device is not loaded in the current active BEC session.")
|
||||
if "ddg2" not in bec.devices:
|
||||
if "ddg2" not in dev:
|
||||
raise RuntimeError("DDG2 device is not loaded in the current active BEC session.")
|
||||
|
||||
def mcs_test_acquire(
|
||||
@@ -183,7 +185,7 @@ class DebugTools:
|
||||
with open(config_path, "r", encoding="utf-8") as fh:
|
||||
cfg = json.load(fh)
|
||||
|
||||
for entry in cfg["detectors"]:
|
||||
for entry in cfg["detector"]:
|
||||
det = Detector(
|
||||
name=to_identifier(entry["description"]), hostnames=entry["hostnames"], cfg=cfg
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user