From dd7773dd11ae6dee5c783e36fd9512817a4a0bb2 Mon Sep 17 00:00:00 2001 From: Daniel Wenz <43881800+WenzDaniel@users.noreply.github.com> Date: Thu, 21 Dec 2023 13:50:31 +0100 Subject: [PATCH] Move ref mon to online and add to bootstrax (#1308) --- bin/bootstrax | 8 +++++++- straxen/contexts.py | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bin/bootstrax b/bin/bootstrax index 0757a6588..5a3f29ad2 100755 --- a/bin/bootstrax +++ b/bin/bootstrax @@ -593,12 +593,14 @@ def infer_target(rd: dict) -> dict: diagnostic_modes = [ "exttrig", "noise", - "nVeto_LASER_calibration", "mv_diffuserballs", "mv_fibres", "mv_darkrate", ] ap_modes = ["pmtap"] + nv_ref_mon = [ + "nVeto_LASER_calibration", + ] mode = str(rd.get("mode")) detectors = list(rd.get("detectors")) # type: ignore @@ -611,6 +613,10 @@ def infer_target(rd: dict) -> dict: log.debug("afterpulse mode") targets = "afterpulses" post_process = "raw_records" + elif np.any([m in mode for m in nv_ref_mon]): + log.debug("NV reflecitvity and diffuser ball mode") + targets = "ref_mon_nv" + post_process = "raw_records" elif np.any([m in mode for m in diagnostic_modes]): log.debug("diagnostic-mode") targets = "raw_records" diff --git a/straxen/contexts.py b/straxen/contexts.py index 9633935dc..5c0df9e62 100644 --- a/straxen/contexts.py +++ b/straxen/contexts.py @@ -229,7 +229,12 @@ def xenonnt_online( context_options = {**straxen.contexts.xnt_common_opts, **kwargs} st = strax.Context(config=straxen.contexts.xnt_common_config, **context_options) - st.register([straxen.DAQReader, straxen.LEDCalibration, straxen.LEDAfterpulseProcessing]) + st.register([ + straxen.DAQReader, + straxen.LEDCalibration, + straxen.LEDAfterpulseProcessing, + straxen.nVeto_reflectivity, + ]) if _auto_append_rucio_local: include_rucio_local, _rucio_local_path = find_rucio_local_path( @@ -333,7 +338,6 @@ def xenonnt_led(**kwargs): straxen.nVETOPulseProcessing, straxen.nVETOHitlets, straxen.nVetoExtTimings, - straxen.nVeto_reflectivity, ]) st.set_config({"coincidence_level_recorder_nv": 1}) return st