Custom MIDAS + WaveCatcher integration for Bedretto Muons DAQ, including:
- Native C/C++ MIDAS frontend (
midas_frontend/) linked to WaveCatcher Linux library. - Guided mhttpd custom page (
custom/wc_control.html) for run control and live monitoring. - Python DAQ/bridge tooling (
python_daq/) for compatibility workflows and transfer utilities. - Operator scripts (
scripts/) for stack startup and CLI-driven runs.
midas_frontend/: native frontend, test harness, build rules.custom/: custom mhttpd control page.scripts/: practical run/start scripts used on the DAQ host.python_daq/: Python DAQ service/client/bridge components.docs/: compatibility report and technical notes.
- Build frontend:
cd midas_frontend && make
- Ensure MIDAS and WaveCatcher libs are visible in environment (
MIDASSYS,LD_LIBRARY_PATH, etc.). - Start MIDAS services and frontend (or use
scripts/wc_start_midas_stack.sh). - Open mhttpd and use
WaveCatcher Controlcustom page to configure/start/stop runs.
- Trigger mode selection (normal/software/coincidence).
- Per-run channel selection (CSV + primary channel fallback).
- Single-threshold apply workflow for iterative channel tuning.
- Auto-stop mode selection (duration XOR target decoded event count).
- Live status panel, last-run summary, transfer command helper, and live waveform preview with multi-channel overlay legend.
- Load ROOT environment:
source scripts/wc_setup_root_env.sh
- Convert a MIDAS run file:
scripts/wc_convert_mid_to_root.sh --input /home/morenoma/online_wc/run02429.mid.lz4- Optional post-run hook from CLI runner:
WC_CONVERT_ROOT_ON_COMPLETE=1 scripts/wc_run_midas_cli.sh ...
- Output:
- ROOT file with
TTreewc_eventscontaining:- MIDAS metadata (
midas_serial,midas_timestamp,midas_event_id) - WaveCatcher header (
wc_event_id,wc_tdc,wc_header_nchannels) - Per-channel features from
WCFE(channel_id,trig_count,time_count,baseline,peak,charge) - Waveform payload from
WCWF(wf_channel,wf_offset,wf_n_samples,wf_samples)
- MIDAS metadata (
- Histograms:
h_peak_mV,h_charge_arb
- ROOT file with
This keeps acquisition reliable in .mid.lz4 while producing ROOT-native analysis files deterministically.
A dedicated branch python-daq is used to emphasize Python-based DAQ/bridge workflow.
Core files are under python_daq/ and can be used independently of native frontend development.
- Runtime data/log artifacts are intentionally excluded via
.gitignore. - This repository is structured for outsiders to reproduce setup and understand system components without local legacy clutter.