Skip to content

Commit c5ac167

Browse files
authored
Update documentation based on various feedback (QC-313) (#370)
* Following feedback from HMPID * changing the name of task in 2 places * load readout environment * proper url to files * fix path QC-313 * addresses Piotr's comments
1 parent 0f9aaa9 commit c5ac167

2 files changed

Lines changed: 30 additions & 16 deletions

File tree

doc/ModulesDevelopment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The main data flow is represented in blue. Data samples are selected by the Data
4141

4242
[Data Processing Layer](https://github.com/AliceO2Group/AliceO2/blob/dev/Framework/Core/README.md) is a software framework developed as a part of O2 project. It structurizes the computing into units called _Data Processors_ - processes that communicate with each other via messages. DPL takes care of generating and running the processing topology out of user declaration code, serializing and deserializing messages, providing the data processors with all the anticipated messages for a given timestamp and much more. Each piece of data is characterized by its `DataHeader`, which consists (among others) of `dataOrigin`, `dataDescription` and `SubSpecification` - for example `{"MFT", "TRACKS", 0}`.
4343

44-
An example of a workflow definition which describes the processing steps (_Data Processors_), their inputs and their outputs can be seen in [runBasic.cxx](https://github.com/AliceO2Group/QualityControl/blob/master/Framework/runBasic.cxx). In the QC we define the workflows in files whose names are prefixed with `run`.
44+
An example of a workflow definition which describes the processing steps (_Data Processors_), their inputs and their outputs can be seen in [runBasic.cxx](https://github.com/AliceO2Group/QualityControl/blob/master/Framework/src/runBasic.cxx). In the QC we define the workflows in files whose names are prefixed with `run`.
4545

4646
### Data Sampling
4747

@@ -83,7 +83,7 @@ Data Sampling is used by Quality Control to feed the tasks with data. Below we p
8383
}
8484
```
8585

86-
An example of using the data sampling in a DPL workflow is visible in [runAdvanced.cxx](https://github.com/AliceO2Group/QualityControl/blob/master/Framework/runAdvanced.cxx).
86+
An example of using the data sampling in a DPL workflow is visible in [runAdvanced.cxx](https://github.com/AliceO2Group/QualityControl/blob/master/Framework/src/runAdvanced.cxx).
8787

8888
#### Custom Data Sampling Condition
8989

@@ -172,7 +172,7 @@ Now that there is a module, we can build it and test it. First let's build it :
172172
```
173173
# We are in ~/alice and alienv has been called.
174174
# Go to the build directory of QualityControl.
175-
cd sw/slc7_x86-64/BUILD/QualityControl-latest/QualityControl
175+
cd sw/BUILD/QualityControl-latest/QualityControl
176176
make -j8 install # replace 8 by the number of cores on your machine
177177
```
178178

doc/QuickStart.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,24 @@
1919

2020
[↑ Go to the Table of Content ↑](../README.md) | [Continue to Modules Development →](ModulesDevelopment.md)
2121

22+
## Read this first!
23+
24+
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.
25+
26+
We would be very grateful if you could report to us any error or inaccuracy you found.
27+
28+
Thanks!
29+
2230
## Requirements
2331

2432
A Linux machine (CC7 or Ubuntu) or a Mac. See the O2 instructions below for the exact supported versions.
2533

2634
## Setup
2735

28-
1. Setup O2 environment and tools <br>We use alibuild, see complete instructions [here](https://alice-doc.github.io/alice-analysis-tutorial/building/) (prefer the second option, not alidock). In particular make sure to follow these steps :
36+
1. Setup O2 environment and tools <br>We use alibuild, see complete instructions [here](https://alice-doc.github.io/alice-analysis-tutorial/building/) (prefer the second option, not alidock). In particular make sure to follow these steps:
2937
1. Install GLFW to have GUIs in the DPL (optional, **DPL GUIs do not work in containers nor over SSH**).
30-
* CC7 : `sudo yum install -y glfw-devel --enablerepo=epel`
31-
* Mac : `brew install glfw`
38+
* CC7: `sudo yum install -y glfw-devel --enablerepo=epel`
39+
* Mac: `brew install glfw`
3240
2. Prerequisites
3341
* [CC7](https://alice-doc.github.io/alice-analysis-tutorial/building/prereq-centos7.html)
3442
* [Mac](https://alice-doc.github.io/alice-analysis-tutorial/building/prereq-macos.html)
@@ -43,7 +51,7 @@ A Linux machine (CC7 or Ubuntu) or a Mac. See the O2 instructions below for the
4351
* `aliBuild build O2Suite --defaults o2`
4452
* At this point you might encounter a message about missing system requirements. Run `aliDoctor O2Suite` to get a full information about what is missing and how to install it.
4553

46-
Note : on non-CC7 systems, you can also use the alibuild "defaults" called `o2-dataflow` to avoid building simulation related packages.
54+
Note: on non-CC7 systems, you can also use the alibuild "defaults" called `o2-dataflow` to avoid building simulation related packages.
4755

4856
### Environment loading
4957

@@ -65,7 +73,9 @@ To run it simply do:
6573

6674
o2-qc-run-basic
6775

68-
Thanks to the Data Processing Layer (DPL, more details later) it is a single process that steers all the _devices_, i.e. processes making up the workflow. A window should appear that shows a graphical representation of the workflow. The output of any of the processes is available by double clicking a box. If a box is red it means that the process has stopped, probably abnormally.
76+
Thanks to the Data Processing Layer (DPL, more details later) it is a single process that steers all the _devices_, i.e. processes making up the workflow. A window should appear that shows a graphical representation of the workflow if you are running locally. If you are running remotely via ssh, the DPL Debug GUI will not open. In some cases, it then requires to run with `-b`. The output of any of the processes is available by double clicking a box. If a box is red it means that the process has stopped, probably abnormally.
77+
78+
This is not the GUI we will use to see the histograms.
6979

7080
![basic-dpl-gui](images/basic-dpl-gui.png)
7181

@@ -79,7 +89,7 @@ This command uses two executables. The first one contains only the _Producer (se
7989

8090
__Repository and GUI__
8191

82-
The data is stored in the [ccdb-test](ccdb-test.cern.ch:8080/browse) at CERN. If everything works fine you should see the objects being published in the QC web GUI (QCG) at this address : [https://qcg-test.cern.ch/?page=objectTree](https://qcg-test.cern.ch/?page=objectTree). The link brings you to the hierarchy of objects (see screenshot below). Open "/qc/TST/QcTask" (the task you are running) and click on "example" which is the name of your histogram.
92+
The data is stored in the [ccdb-test](ccdb-test.cern.ch:8080/browse) at CERN. If everything works fine you should see the objects being published in the QC web GUI (QCG) at this address: [https://qcg-test.cern.ch/?page=objectTree](https://qcg-test.cern.ch/?page=objectTree). The link brings you to the hierarchy of objects (see screenshot below). Open "/qc/TST/QcTask" (the task you are running) and click on "example" which is the name of your histogram.
8393

8494
<!---
8595
The plot should be displayed on the right. If you wait a bit and hit "REFRESH NOW" in the far left menu you should see it changing from time to time (see second screenshot below).
@@ -88,7 +98,7 @@ Please note that anyone running o2-qc-run-basic publishes the object under the s
8898
![alt text](images/basic-qcg1.png)
8999
<!---![alt text](images/basic-qcg2.png)-->
90100

91-
TODO add a link to the user documentation of the QCG when it is written.
101+
<!--- TODO add a link to the user documentation of the QCG when it is written. -->
92102

93103
__Configuration file__
94104

@@ -105,17 +115,19 @@ The configuration for the QC is made of many parameters described in an [advance
105115
"cycleDurationSeconds": "10",
106116
(...)
107117
```
108-
Try and change the name of the task by replace `QcTask` by a name of your choice. Relaunch the workflows. You should now see the object published under a different directory in the QCG.
118+
Try and change the name of the task by replacing `QcTask` by a name of your choice (there are 2 places to update in the config file!). Relaunch the workflows. You should now see the object published under a different directory in the QCG.
109119

110120
### Readout chain
111121

112122
In this second example, we are going to use the Readout as our data source.
113123

114124
![alt text](images/readout-schema.png)
115125

116-
This workflow is a bit different from the basic one. The _Readout_ is not a DPL, nor a FairMQ, device and thus we have to have a _proxy_ to get data from it. This is the extra box going to the _Data Sampling_, which then injects data to the task. This is handled in the _Readout_ as long as you enable the corresponding configuration flag.
126+
This workflow is a bit different from the basic one. The _Readout_ is not a DPL, nor a FairMQ, device and thus we have to have a _proxy_ to get data from it. This is the extra box going to the _Data Sampling_, which then injects data to the task. This is handled in the _Readout_ as long as you enable the corresponding configuration flag.
127+
128+
The first thing is to load the environment for the readout in a new terminal: `alienv enter Readout/latest`.
117129

118-
To do so, open the readout config file located at `$READOUT_ROOT/etc/readout.cfg` and make sure that the following properties are correct :
130+
Then enable the data sampling channel in readout by opening the readout config file located at `$READOUT_ROOT/etc/readout.cfg` and make sure that the following properties are correct:
119131

120132
```
121133
# First make sure we never exit
@@ -130,12 +142,12 @@ enabled=1
130142
(...)
131143
```
132144

133-
Start Readout :
145+
Start Readout in a terminal:
134146
```
135147
readout.exe file://$READOUT_ROOT/etc/readout.cfg
136148
```
137149

138-
Start the proxy, DataSampling and QC workflows :
150+
Start in another terminal the proxy, DataSampling and QC workflows:
139151
```
140152
o2-qc-run-readout | o2-qc --config json://${QUALITYCONTROL_ROOT}/etc/readout.json
141153
```
@@ -146,7 +158,7 @@ The data sampling is configured to sample 1% of the data as the readout should r
146158

147159
The first option is to configure readout.exe to connect to a cru. Please refer to the [Readout documentation](https://github.com/AliceO2Group/Readout/blob/master/doc/README.md).
148160

149-
A more practical approach is to record a data file with Readout and then replay it on your development setup to develop and test your QC. The configuration options are described [here](https://github.com/AliceO2Group/Readout/blob/master/doc/configurationParameters.md), in particular :
161+
A more practical approach is to record a data file with Readout and then replay it on your development setup to develop and test your QC. The configuration options are described [here](https://github.com/AliceO2Group/Readout/blob/master/doc/configurationParameters.md), in particular:
150162

151163
```
152164
equipment-player-* filePath string
@@ -155,6 +167,8 @@ equipment-player-* preLoad int 1 If 1, data pages preloaded with file conten
155167
equipment-player-* fillPage int 1 If 1, content of data file is copied multiple time in each data page until page is full (or almost full: on the last iteration, there is no partial copy if remaining space is smaller than full file size). If 0, data file is copied exactly once in each data page.
156168
```
157169

170+
Another option is to use the program `o2-raw-file-reader-workflow` in O2 and described [here](https://github.com/AliceO2Group/AliceO2/tree/dev/Detectors/Raw#raw-data-file-reader-workflow). One can for example produce raw data with some Simulation workflow, or record it with `readout.exe`.
171+
158172
#### Readout data format as received by the Task
159173

160174
The header is an O2 header populated with data from the header built by the Readout.

0 commit comments

Comments
 (0)