How slac-lcls/lcls2 works
Major components
• Data Acquisition and Hardware Interface – Represented by the “psdaq” directory and its submodules (such as drp, epicsArch, and others). This layer interacts directly with the detector hardware, digitizers, and external interfaces (EPICS, ZeroMQ, libfabric).
• Event Building and Data Formatting – This includes the “evtbuild” and “xtcdata” packages. They are responsible for converting raw detector signals into structured event data (xtc format) and supporting conversion utilities.
• Data Analysis and Processing – The “psana” package is the central framework for assembling, processing, and analyzing acquired data. It includes client applications, event builders, and test utilities.
• Signal Processing/Algorithmic Modules – “psalg” provides underlying algorithms, calibration, and geometry support necessary for data interpretation.
• Calibration, Configuration, and Utilities – Directories like “pscalib,” “configdb,” “pyalgos,” and others that manage experiment-specific calibrations and configurations.
• Control and Monitoring – Components like the “psdaq/control” and “psdaq/control_gui” directories that provide interfaces for monitoring the system, running timed experiments, and interfacing with high-level control layers.
• Build and Environment Management – Scripts such as build_all.sh, setup_env.sh, and related conda/Spack recipes that coordinate building and deployment across different modules.
Relationships and interactions
• The event building/formatting components (evtbuild, xtcdata) then convert raw data into structured event formats used by analysis software.
• The analysis framework (psana) receives events, interfaces with processing algorithms (psalg), performs calibrations (pscalib), and delivers data for visualization and further processing.
• Control and configuration modules (configdb, control_gui, EPICS tools in psdaq/epicsArch and psdaq/cas) send commands upstream (control signals) and share status information downstream (monitoring and logging).
• Test suites and utilities (e.g., those in psana/tests) help verify components in each layer but are depicted as peripheral verification tools.
Architectural patterns and design principles
• Modularity: Each “package” (psdaq, psana, psalg, xtcdata, etc.) is a self-contained module that is built independently and then integrated via the build system.
• Layered Architecture: A clear separation between low-level hardware/control (psdaq and EPICS integrations), mid-level event construction (xtcdata, evtbuild), and high-level analysis (psana, psalg).