ITk DAQ-API
Overview
ITk DAQ-API is a modular software suite for the control, monitoring, and orchestration of data acquisition (DAQ) processes for the ATLAS ITk Pixel Detector. It provides a robust backend API and an intuitive user interface, enabling seamless integration with detector hardware, configuration databases, and distributed control systems.
This repository contains two primary components: - daq_api: Backend API service for DAQ operations, scan management, and system synchronization. - daq_ui: Frontend web interface for user interaction, visualization, and control.
Project Structure
itk-daqapi/
├── daq_api/ # FastAPI backend for DAQ control and monitoring
├── daq_ui/ # Web-based frontend for DAQ operations
├── configs/ # Configuration files for scans and controllers
├── scripts/ # Utility scripts for setting up the Runkey
└── README.md # Project documentation
Mechanism & Workflow
Backend API (daq_api)
- Built with FastAPI for high-performance, asynchronous RESTful endpoints.
- Orchestrates pixel detector scans using local configuration files or database-sourced parameters.
- Implements distributed event ordering and timestamping for reliable scan coordination.
- Manages key-value pairs for scan events and system states, supporting both HTTP and registry-based operations.
- Provides endpoints for system health checks and status reporting.
User Interface (daq_ui)
- Modern web application for ease of use and accessibility.
- Allows users to initiate scans, monitor progress, visualize results, and interact with DAQ system components.
- Communicates with the backend API for real-time updates and control.
Configuration & Extensibility
- Config files (JSON/Python) define scan parameters, controller settings, and hardware mappings.
- Modular architecture enables integration with new hardware, scan types, and external services.
Runkey Management
Runkey creation is a crucial part of the DAQ workflow. Each Runkey serves as a unique identifier for every data acquisition run, ensuring traceability, synchronization, and proper association of scan metadata within the ATLAS ITk Pixel Detector system. Runkeys are essential for organizing scan results, linking configuration parameters, and facilitating downstream analysis and registry operations.
A dedicated documentation for Runkey creation and management will be provided soon. [Reference link to be added]
Installation
Prerequisites
- Python 3.12+
- pip
- Docker
Setup
git clone https://gitlab.cern.ch/atlas-itk-pixel-systemtest/itk-demo-sw/itk-daqapi.git
cd itk-daqapi
python3 -m venv venv
source venv/bin/activate
pip install uv
uv sync
Usage
Running the Backend API
./config
docker compose build
docker compose up -d
Running the User Interface
cd daq_ui
./config
uv run reflex run
Example Workflow
- Configure scan parameters in
configs/. - Start the backend API service.
- Open the web UI to initiate and monitor scans.
- Use the UI to view scan progress, system health, and results.
- Backend ensures distributed event ordering, Runkey management, and state tracking.
Testing
Run backend tests using pytest:
pytest daq_api/tests/
Contributing
Contributions are welcome! Please fork the repository and submit a merge request.
Support
For help and inquiries, contact: - Dr. Gerhard Immanuel Brandt (gerhard.immanuel.brandt@cern.ch) - Jonas Schmeing (schmeing@uni-wuppertal.de) - Dhruv Patel (dhruv.patel@uni-wuppertal.de)
License
See LICENSE for details.
Project Status
Actively maintained and under development for the ATLAS ITk Pixel Detector DAQ system.