This is a command-line DAQ-style simulation system built with C++ and ZeroMQ, designed for real-time control and visualization using tmux. It mimics a particle physics detector pipeline, featuring:
- 🛰️ Multiple Detectors generating random events
- ⚙️ A Broker that load-balances data
- 🧠 Multiple Workers processing the data
- 📥 A Collector tallying total hits
- 📡 A Monitor Bus relaying system logs
- 🧾 A Monitor CLI dashboard
- 🕹️ A CCM (Command & Control Module) to gracefully shut everything down
+-----------+ +---------+ +-----------+
| Detectors | PUSH --> | Broker | PUSH -->| Workers |
+-----------+ +---------+ +-----------+
| |
Control via PUSH
zmq::proxy() |
v +--------+
+--------+ <-------- | Collector |
| CCM | +--------+
| PUB --> all (tallies PARTICLEs)
Log Flow:
All components PUSH logs to monitor_bus (PULL → PUB), which are displayed in a monitor (SUB) pane in tmux.
Launches into a live tmux session with all components in a tiled layout.
Use the top-left CCM pane to type shutdown and gracefully exit all components.
sudo dnf install -y gcc-c++ cmake make tmux zeromq zeromq-devel
git clone <this repo>
cd ZeroMQ-C-plus-plus-DAQ
chmod +x run_all_tmux.sh
./run_all_tmux.sh
The script will:
- Build all components
- Start a tmux grid view
- Stream logs
- Wait for you to type shutdown
| Component | Description |
|---|---|
ccm |
Command interface (sends shutdown) |
broker |
Load balances data between detector/worker |
collector |
Tallies up processed hits |
detector |
Sends random PARTICLE / MISS events |
worker |
Processes and forwards only PARTICLEs |
monitor_bus |
Relays logs to monitor |
monitor |
Displays logs in a clean CLI view |
tmux kill-session -t daq_grid
