# aliceo2group/qualitycontrol architecture

> Architecture diagram of the GitHub repository aliceo2group/qualitycontrol, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aliceo2group/qualitycontrol
- Repository: https://github.com/aliceo2group/qualitycontrol

## Overview

ALICE O² Quality Control is a framework and set of detector-specific modules for producing, checking, aggregating, storing, and post-processing data-quality results. A typical workflow starts with detector data entering a QC task, which publishes monitor objects; checks and aggregators assess those objects, and post-processing can derive trends or compare against references. The README also documents late tasks and propagation of check results to Bookkeeping. The graph combines these documented capabilities with sampled framework interfaces; several runtime connections are documented only at a high level, so those edges are marked unverified.

Main entry points: [`Framework/include/QualityControl/PostProcessingInterface.h`](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/PostProcessingInterface.h) (Post-processing interface), [`Framework/include/QualityControl/DatabaseInterface.h`](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/DatabaseInterface.h) (Repository interface), [`Framework/include/QualityControl/TaskInterface.h`](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/TaskInterface.h) (Task interface), [`Framework/include/QualityControl/ObjectsManager.h`](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/ObjectsManager.h) (Monitor objects)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_modules["Detector QC"]
  node_tasks["QC tasks"]
end

subgraph group_framework["QC Runtime"]
  node_task_api["Task interface<br/>[TaskInterface.h]"]
  node_objects["Monitor objects<br/>[ObjectsManager.h]"]
  node_mo["Monitor object model<br/>[MonitorObject.h]"]
  node_activity["Activity context<br/>[Activity.h]"]
  node_database_api["Repository interface"]
  node_ccdb[("CCDB repository<br/>[CcdbDatabase.h]")]
  node_qcdb[("QCDB storage")]
end

subgraph group_quality["Assessment"]
  node_checks["QC checks<br/>[CheckInterface.h]"]
  node_quality_objects["Quality results<br/>[QualityObject.h]"]
  node_aggregators["Quality aggregators"]
  node_bookkeeping["Bookkeeping"]
  node_late_tasks["Late tasks"]
end

subgraph group_postproc["Post-processing"]
  node_postproc_api["Post-processing interface"]
  node_trend["Trending tasks<br/>[TrendingTask.h]"]
  node_reference["Reference comparison"]
  node_inspector["CCDB inspector"]
end

node_data(("Detector data"))
node_user(("QC operator"))

node_data -.->|"feeds"| node_tasks
node_tasks -.->|"implements"| node_task_api
node_task_api -->|"publishes through"| node_objects
node_objects -->|"encapsulates"| node_mo
node_task_api -->|"receives context"| node_activity
node_objects -.->|"stores objects"| node_database_api
node_database_api -->|"implemented by"| node_ccdb
node_database_api -.->|"stores QC data"| node_qcdb
node_mo -.->|"checked by"| node_checks
node_checks -.->|"produces"| node_quality_objects
node_quality_objects -.->|"aggregated by"| node_aggregators
node_checks -.->|"propagates results"| node_bookkeeping
node_user -.->|"configures"| node_late_tasks
node_user -.->|"configures"| node_postproc_api
node_postproc_api -.->|"runs trending"| node_trend
node_postproc_api -.->|"compares references"| node_reference
node_postproc_api -.->|"inspects CCDB"| node_inspector
node_postproc_api -->|"retrieves and stores"| node_database_api

click node_tasks "https://github.com/aliceo2group/qualitycontrol/tree/master/Modules"
click node_task_api "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/TaskInterface.h"
click node_objects "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/ObjectsManager.h"
click node_mo "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/MonitorObject.h"
click node_activity "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/Activity.h"
click node_database_api "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/DatabaseInterface.h"
click node_ccdb "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/CcdbDatabase.h"
click node_qcdb "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/DatabaseInterface.h"
click node_checks "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/CheckInterface.h"
click node_quality_objects "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/QualityObject.h"
click node_aggregators "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/AggregatorInterface.h"
click node_bookkeeping "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/BookkeepingQualitySink.h"
click node_late_tasks "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/LateTaskInterface.h"
click node_postproc_api "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/PostProcessingInterface.h"
click node_trend "https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/TrendingTask.h"
click node_reference "https://github.com/aliceo2group/qualitycontrol/blob/master/Modules/Common/include/Common/ReferenceComparatorTask.h"
click node_inspector "https://github.com/aliceo2group/qualitycontrol/blob/master/Modules/Common/include/Common/CcdbInspectorTask.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_tasks toneBlue
class node_task_api,node_objects,node_mo,node_activity,node_database_api,node_ccdb,node_qcdb toneAmber
class node_checks,node_quality_objects,node_aggregators,node_bookkeeping,node_late_tasks toneMint
class node_postproc_api,node_trend,node_reference,node_inspector toneRose
class node_data,node_user toneIndigo
```

## Components

### Detector QC

- [QC tasks](https://github.com/aliceo2group/qualitycontrol/tree/master/Modules): `Modules`

### QC Runtime

- [Task interface](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/TaskInterface.h): `Framework/include/QualityControl/TaskInterface.h`
- [Monitor objects](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/ObjectsManager.h): `Framework/include/QualityControl/ObjectsManager.h`
- [Monitor object model](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/MonitorObject.h): `Framework/include/QualityControl/MonitorObject.h`
- [Activity context](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/Activity.h): `Framework/include/QualityControl/Activity.h`
- [Repository interface](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/DatabaseInterface.h): `Framework/include/QualityControl/DatabaseInterface.h`
- [CCDB repository](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/CcdbDatabase.h): `Framework/include/QualityControl/CcdbDatabase.h`
- [QCDB storage](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/DatabaseInterface.h): `Framework/include/QualityControl/DatabaseInterface.h`

### Assessment

- [QC checks](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/CheckInterface.h): `Framework/include/QualityControl/CheckInterface.h`
- [Quality results](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/QualityObject.h): `Framework/include/QualityControl/QualityObject.h`
- [Quality aggregators](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/AggregatorInterface.h): `Framework/include/QualityControl/AggregatorInterface.h`
- [Bookkeeping](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/BookkeepingQualitySink.h): `Framework/include/QualityControl/BookkeepingQualitySink.h`
- [Late tasks](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/LateTaskInterface.h): `Framework/include/QualityControl/LateTaskInterface.h`

### Post-processing

- [Post-processing interface](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/PostProcessingInterface.h): `Framework/include/QualityControl/PostProcessingInterface.h`
- [Trending tasks](https://github.com/aliceo2group/qualitycontrol/blob/master/Framework/include/QualityControl/TrendingTask.h): `Framework/include/QualityControl/TrendingTask.h`
- [Reference comparison](https://github.com/aliceo2group/qualitycontrol/blob/master/Modules/Common/include/Common/ReferenceComparatorTask.h): `Modules/Common/include/Common/ReferenceComparatorTask.h`
- [CCDB inspector](https://github.com/aliceo2group/qualitycontrol/blob/master/Modules/Common/include/Common/CcdbInspectorTask.h): `Modules/Common/include/Common/CcdbInspectorTask.h`

### Other components

- **Detector data**
- **QC operator**

## Connections

- Detector data → QC tasks: feeds
- QC tasks → Task interface: implements (evidence: `Modules/EMCAL/include/EMCAL/ClusterTask.h`)
- Task interface → Monitor objects: publishes through (evidence: `Framework/include/QualityControl/TaskInterface.h`)
- Monitor objects → Monitor object model: encapsulates (evidence: `Framework/include/QualityControl/ObjectsManager.h`)
- Task interface → Activity context: receives context (evidence: `Framework/include/QualityControl/TaskInterface.h`)
- Monitor objects → Repository interface: stores objects
- Repository interface → CCDB repository: implemented by (evidence: `Framework/include/QualityControl/CcdbDatabase.h`)
- Repository interface → QCDB storage: stores QC data (evidence: `Framework/include/QualityControl/DatabaseInterface.h`)
- Monitor object model → QC checks: checked by
- QC checks → Quality results: produces
- Quality results → Quality aggregators: aggregated by
- QC checks → Bookkeeping: propagates results (evidence: `README.md`)
- QC operator → Late tasks: configures (evidence: `README.md`)
- QC operator → Post-processing interface: configures (evidence: `README.md`)
- Post-processing interface → Trending tasks: runs trending (evidence: `README.md`)
- Post-processing interface → Reference comparison: compares references (evidence: `README.md`)
- Post-processing interface → CCDB inspector: inspects CCDB (evidence: `README.md`)
- Post-processing interface → Repository interface: retrieves and stores (evidence: `Framework/include/QualityControl/PostProcessingInterface.h`)
