Skip to content

Commit bff913c

Browse files
committed
[QC-1286] up to flp suite
1 parent c8d37c7 commit bff913c

9 files changed

Lines changed: 88 additions & 89 deletions

File tree

doc/Configuration.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ should not be present in real configuration files.
8888
"host": "ccdb-test.cern.ch:8080", "": "URL of a DB.",
8989
"maxObjectSize": "2097152", "": "[Bytes, default=2MB] Maximum size allowed, larger objects are rejected."
9090
},
91-
"Activity": { "": ["Configuration of a QC Activity (Run). This structure is subject to",
92-
"change or the values might come from other source (e.g. ECS+Bookkeeping)." ],
93-
"number": "42", "": "Activity number.",
91+
"Activity": { "": ["Configuration of a QC Activity (Run). DO NOT USE IN PRODUCTION! " ],
92+
"number": "42", "": "Activity number. ",
9493
"type": "PHYSICS", "": "Activity type.",
9594
"periodName": "", "": "Period name - e.g. LHC22c, LHC22c1b_test",
9695
"passName": "", "": "Pass type - e.g. spass, cpass1",
@@ -721,4 +720,4 @@ TODO we miss the definition of the datasampling policies
721720

722721
---
723722

724-
[← Go back to Framework](Framework.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to FLP Suite →](FLPsuite.md)
723+
[← Go back to Post-Processing](PostProcessing.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to QCDB →](QCDB.md)

doc/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ in the config:
120120
"maxObjectSize": "2097152", "": "[Bytes, default=2MB] Maximum size allowed, larger objects are rejected."
121121
```
122122

123-
[← Go back to Advanced Topics](Advanced.md) | [↑ Go to the Table of Content ↑](../README.md)
123+
[← Go back to Miscellaneous](Miscellaneous.md) | [↑ Go to the Table of Content ↑](../README.md)

doc/FLPsuite.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,4 @@ See the details [here](https://github.com/AliceO2Group/QualityControl/blob/maste
205205

206206
---
207207

208-
[← Go back to Configuration](Configuration.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Miscellaneous →](Miscellaneous.md)
208+
[← Go back to QCDB](QCDB.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Miscellaneous →](Miscellaneous.md)

doc/Framework.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Framework
1818
* [Propagating Check results to RCT in Bookkeeping](#propagating-check-results-to-rct-in-bookkeeping)
1919
* [Solving performance issues](#solving-performance-issues)
2020
* [Understanding and reducing memory footprint](#understanding-and-reducing-memory-footprint)
21+
* [Monitoring](#monitoring)
2122
<!--te-->
2223

2324
## Plugging the QC to an existing DPL workflow
@@ -736,4 +737,17 @@ ms_print massif.out.976329 > massif_abc_task.log
736737

737738
6) Consider reducing the size and number of the biggest histogram. Consider disabling histograms which will not be useful for async QC (no allocations, no startPublishing).
738739

740+
## Monitoring
741+
742+
The QC uses the [O2 Monitoring](https://github.com/AliceO2Group/Monitoring/) library to monitor metrics.
743+
The user code has access to an instance of the Monitoring via the variable `mMonitoring`.
744+
It can be used this way:
745+
```
746+
mMonitoring->send({ 42, "my/metric" }); // send the value 42 keyed with "my/metric"
747+
```
748+
By default the Monitoring will be printed in the terminal. If a proper Monitoring system
749+
is setup, one can update the monitoring url in the config file to point to it.
750+
751+
---
752+
739753
[← Go back to Post-Processing](PostProcessing.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Configuration →](Configuration.md)

doc/Miscellaneous.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ Miscellaneous
2121
* [Readout data format as received by the Task](#readout-data-format-as-received-by-the-task)
2222
<!--te-->
2323

24-
[← Go back to Post-processing](PostProcessing.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Frequently Asked Questions →](FAQ.md)
25-
26-
2724

2825
# Asynchronous Data and Monte Carlo QC operations
2926

doc/ModulesDevelopment.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111
* [Developing with aliBuild/alienv](#developing-with-alibuildalienv)
1212
* [User-defined modules](#user-defined-modules)
1313
* [Repository](#repository)
14-
* [Paths](#paths)
1514
* [Module creation](#module-creation)
1615
* [Test run](#test-run)
17-
* [Saving the QC objects in a local file](#saving-the-qc-objects-in-a-local-file)
1816
* [Modification of the Task](#modification-of-the-task)
1917
* [Check](#check)
2018
* [Configuration](#configuration)
@@ -31,7 +29,6 @@
3129
* [DPL workflow](#dpl-workflow)
3230
* [Run number and other run attributes (period, pass type, provenance)](#run-number-and-other-run-attributes-period-pass-type-provenance)
3331
* [A more advanced example](#a-more-advanced-example)
34-
* [Monitoring](#monitoring)
3532
<!--te-->
3633

3734
[← Go back to Quickstart](QuickStart.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Post-processing →](PostProcessing.md)
@@ -590,17 +587,6 @@ or
590587
o2-qc-run-advanced --no-qc | o2-qc --config json://${QUALITYCONTROL_ROOT}/etc/advanced.json
591588
```
592589

593-
## Monitoring
594-
595-
The QC uses the [O2 Monitoring](https://github.com/AliceO2Group/Monitoring/) library to monitor metrics.
596-
The user code has access to an instance of the Monitoring via the variable `mMonitoring`.
597-
It can be used this way:
598-
```
599-
mMonitoring->send({ 42, "my/metric" }); // send the value 42 keyed with "my/metric"
600-
```
601-
By default the Monitoring will be printed in the terminal. If a proper Monitoring system
602-
is setup, one can update the monitoring url in the config file to point to it.
603-
604590
---
605591

606592
[← Go back to Quickstart](QuickStart.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Post-processing →](PostProcessing.md)

doc/PostProcessing.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* [More examples](#more-examples)
1818
<!--te-->
1919

20-
[← Go back to Modules Development](ModulesDevelopment.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Advanced Topics →](Advanced.md)
21-
2220
## The post-processing framework
2321

2422
This framework is intended for planned post-processing of objects generated by QC Tasks, Checks and correlating them with other data. The most common use-cases include correlation and trending of different properties of the detectors.
@@ -1153,4 +1151,4 @@ Use the Activity which leaves the run number empty, but indicate the pass and pe
11531151
}
11541152
```
11551153

1156-
[← Go back to Modules Development](ModulesDevelopment.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Framework →](Framework.md)
1154+
[← Go back to Framework](Framework.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Configuration →](Configuration.md)

doc/QCDB.md

Lines changed: 68 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,73 @@ QCDB
55
<!--TOC generated with https://github.com/ekalinin/github-markdown-toc-->
66
<!--./gh-md-toc --insert --no-backup --hide-footer --indent 3 QualityControl/doc/Advanced.md -->
77
<!--ts-->
8+
* [QCDB vs CCDB](#qcdb-vs-ccdb)
9+
* [Details on the data storage format in the QCDB](#details-on-the-data-storage-format-in-the-qcdb)
10+
* [Custom metadata for QC objects in the QCDB](#custom-metadata-for-qc-objects-in-the-qcdb)
11+
* [Instructions to move an object in the QCDB](#instructions-to-move-an-object-in-the-qcdb)
12+
* [Accessing objects in CCDB](#accessing-objects-in-ccdb)
13+
* [Access GRP objects with GRP Geom Helper](#access-grp-objects-with-grp-geom-helper)
14+
* [Global Tracking Data Request helper](#global-tracking-data-request-helper)
15+
* [Local CCDB setup](#local-ccdb-setup)
816
<!--te-->
917

10-
## Accessing objects in CCDB
18+
## QCDB vs CCDB
19+
20+
The MonitorObjects generated by Quality Control are stored in a dedicated repository called **QCDB**.
21+
The run conditions, on the other hand, are located in another, separate database, called **CCDB**.
22+
23+
Both are based on a technology called _CCDB_ which does not help with the confusion...
24+
25+
## Details on the data storage format in the QCDB
26+
27+
Each MonitorObject is stored as a TFile in the QCDB.
28+
It is therefore possible to easily open it with ROOT when loaded with alienv. It also seamlessly supports class schema evolution.
29+
30+
The MonitorObjects are stored at a path which is enforced by the qc framework : `/qc/<detector code>/MO/<task name>/object/name`
31+
Note that the name of the object can contain slashes (`/`) in order to build a sub-tree visible in the GUI.
32+
The detector name and the taskname are set in the config file :
33+
34+
```json
35+
"tasks": {
36+
"QcTask": { <---------- task name
37+
"active": "true",
38+
"className": "o2::quality_control_modules::skeleton::SkeletonTask",
39+
"moduleName": "QcSkeleton",
40+
"detectorName": "TST", <---------- detector name
41+
```
42+
43+
The quality is stored as a CCDB metadata of the object.
44+
45+
## Custom metadata for QC objects in the QCDB
46+
47+
One can add custom metadata on the QC objects produced in a QC task.
48+
Simply call `ObjectsManager::addMetadata(...)`, like in
49+
50+
```
51+
// add a metadata on histogram mHistogram, key is "custom" and value "34"
52+
getObjectsManager()->addMetadata(mHistogram->GetName(), "custom", "34");
53+
```
54+
55+
This metadata will end up in the _QCDB_.
56+
57+
It is also possible to add or update metadata of a MonitorObject directly:
58+
59+
```
60+
MonitorObject* mo = getMonitorObject(objectName);
61+
mo->addOrUpdateMetadata(key, value);
62+
```
63+
64+
## Instructions to move an object in the QCDB
65+
66+
The script `o2-qc-repo-move-objects` lets the user move an object, and thus all the versions attached to it. E.g.:
67+
68+
```
69+
python3 o2-qc-repo-move-objects --url http://ccdb-test.cern.ch:8080 --path qc/TST/MO/Bob --new-path qc/TST/MO/Bob2 --log-level 10
70+
```
1171

12-
The MonitorObjects generated by Quality Control are stored in a dedicated repository (QCDB), which is based on CCDB.
13-
The run conditions, on the other hand, are located in another, separate database.
72+
## Accessing objects in CCDB
1473

15-
The recommended way (excluding postprocessing) to access these conditions is to use a `Lifetime::Condition` DPL input, which can be requested as in the query below:
74+
The recommended way (excluding postprocessing) to access the run conditions in the _CCDB_ is to use a `Lifetime::Condition` DPL input, which can be requested as in the query below:
1675

1776
```json
1877
"tasks": {
@@ -26,9 +85,9 @@ The recommended way (excluding postprocessing) to access these conditions is to
2685
},
2786
```
2887

29-
The timestamp of the CCDB object will be aligned with the data timestamp.
88+
The timestamp of the _CCDB_ object will be aligned with the data timestamp.
3089

31-
If a task needs both sampled input and a CCDB object, it is advised to use two data sources as such:
90+
If a task needs both sampled input and a _CCDB_ object, it is advised to use two data sources as such:
3291

3392
```json
3493
"tasks": {
@@ -45,7 +104,7 @@ If a task needs both sampled input and a CCDB object, it is advised to use two d
45104
},
46105
```
47106

48-
The requested CCDB object can be accessed like any other DPL input in `monitorData`:
107+
The requested _CCDB_ object can be accessed like any other DPL input in `monitorData`:
49108

50109
```
51110
void QcMFTClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
@@ -56,7 +115,7 @@ void QcMFTClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
56115

57116
Geometry and General Run Parameters (GRP) can be also accessed with the [GRP Geom Helper](#access-grp-objects-with-grp-geom-helper).
58117

59-
If your task accesses CCDB objects using `UserCodeInterface::retrieveConditionAny`, please migrate to using one of the methods mentioned above.
118+
If your task accesses _CCDB_ objects using `UserCodeInterface::retrieveConditionAny`, please migrate to using one of the methods mentioned above.
60119

61120
### Accessing from a Postprocessing task
62121

@@ -115,51 +174,6 @@ void MyTask::monitorData(o2::framework::ProcessingContext& ctx)
115174
}
116175
```
117176

118-
## Custom metadata
119-
120-
One can add custom metadata on the QC objects produced in a QC task.
121-
Simply call `ObjectsManager::addMetadata(...)`, like in
122-
123-
```
124-
// add a metadata on histogram mHistogram, key is "custom" and value "34"
125-
getObjectsManager()->addMetadata(mHistogram->GetName(), "custom", "34");
126-
```
127-
128-
This metadata will end up in the QCDB.
129-
130-
It is also possible to add or update metadata of a MonitorObject directly:
131-
132-
```
133-
MonitorObject* mo = getMonitorObject(objectName);
134-
mo->addOrUpdateMetadata(key, value);
135-
```
136-
137-
## Details on the data storage format in the CCDB
138-
139-
Each MonitorObject is stored as a TFile in the CCDB.
140-
It is therefore possible to easily open it with ROOT when loaded with alienv. It also seamlessly supports class schema evolution.
141-
142-
The MonitorObjects are stored at a path which is enforced by the qc framework : `/qc/<detector code>/MO/<task name>/object/name`
143-
Note that the name of the object can contain slashes (`/`) in order to build a sub-tree visible in the GUI.
144-
The detector name and the taskname are set in the config file :
145-
146-
```json
147-
"tasks": {
148-
"QcTask": { <---------- task name
149-
"active": "true",
150-
"className": "o2::quality_control_modules::skeleton::SkeletonTask",
151-
"moduleName": "QcSkeleton",
152-
"detectorName": "TST", <---------- detector name
153-
```
154-
155-
The quality is stored as a CCDB metadata of the object.
156-
157-
### Data storage format before v0.14 and ROOT 6.18
158-
159-
Before September 2019, objects were serialized with TMessage and stored as _blobs_ in the CCDB. The main drawback was the loss of the corresponding streamer infos leading to problems when the class evolved or when accessing the data outside the QC framework.
160-
161-
The QC framework is nevertheless backward compatible and can handle the old and the new storage system.
162-
163177
## Local CCDB setup
164178

165179
Having a central ccdb for test (ccdb-test) is handy but also means that everyone can access, modify or delete the data. If you prefer to have a local instance of the CCDB, for example in your lab or on your development machine, follow these instructions.
@@ -177,15 +191,8 @@ The address of the CCDB will have to be updated in the Tasks config file.
177191

178192
At the moment, the description of the REST api can be found in this document : <https://docs.google.com/presentation/d/1PJ0CVW7QHgnFzi0LELc06V82LFGPgmG3vsmmuurPnUg>
179193

180-
## Instructions to move an object in the QCDB
181-
182-
The script `o2-qc-repo-move-objects` lets the user move an object, and thus all the versions attached to it. E.g.:
183-
184-
```
185-
python3 o2-qc-repo-move-objects --url http://ccdb-test.cern.ch:8080 --path qc/TST/MO/Bob --new-path qc/TST/MO/Bob2 --log-level 10
186-
```
187194

188195
---
189196

190-
[← Go back to Post-processing](PostProcessing.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to Configuration ](Configuration.md)
197+
[← Go back to Configuration](Configuration.md) | [↑ Go to the Table of Content ↑](../README.md) | [Continue to FLP Suite →](FLPsuite.md)
191198

doc/QuickStart.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
* [Post-processing example](#post-processing-example)
1313
<!--te-->
1414

15-
[↑ Go to the Table of Content ↑](../README.md) | [Continue to Modules Development →](ModulesDevelopment.md)
16-
1715
## Read this first!
1816

1917
This page will give you a basic idea of the QC and how to run it. Please read it *in its entirety* and run the commands along the way. Do not start developing your module before you have reached the next section called "Modules Development". Also, make sure you have pulled the latest QC version.

0 commit comments

Comments
 (0)