You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Advanced.md
+43-1Lines changed: 43 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@
12
12
*[Example 2: advanced](#example-2-advanced)
13
13
*[Limitations](#limitations)
14
14
*[Multi-node setups](#multi-node-setups)
15
+
*[Moving window](#moving-window)
15
16
*[Writing a DPL data producer](#writing-a-dpl-data-producer)
16
17
*[Access run conditions and calibrations from the CCDB](#access-run-conditions-and-calibrations-from-the-ccdb)
17
18
*[Definition and access of task-specific configuration](#definition-and-access-of-task-specific-configuration)
@@ -257,6 +258,44 @@ and `qc/TST/MO/MultiNodeRemote`, and corresponding Checks under the path `qc/TST
257
258
When using AliECS, one has to generate workflow templates and upload them to the corresponding repository. Please
258
259
contact the QC or AliECS developers to receive assistance or instruction on how to do that.
259
260
261
+
## Moving window
262
+
263
+
By default QC Tasks are never reset, thus the MOs they produce contain data from the full run.
264
+
However, if objects should have a shorter validity range, one may add the following options to QC Task configuration:
265
+
```json
266
+
"MovingWindowTaskA": {
267
+
...
268
+
"resetAfterCycles": "10",
269
+
}
270
+
```
271
+
In the case above the QC Task will have the `TaskInterface::reset()` method invoked each 10 cycles.
272
+
273
+
If the QC Task runs in parallel on many nodes and its results are merged, the effects will be different
274
+
depending on the chosen merging mode:
275
+
- If `"delta"` mode is used, the Merger in the last layer will implement the moving window, while the QC Tasks will
276
+
still reset after each cycle. Please note, that QC Tasks will fall out of sync during data acquisition, so the moving
277
+
window might contain slightly misaligned data time ranges coming from different sources. Also, due to fluctuations of
278
+
the data transfer, objects coming from different sources might appear more frequently than others. Thus, one might
279
+
notice higher occupancy on stave A one time, but the next object might contain less than average data for the same stave.
280
+
- In the `"entire"` mode, QC Tasks will reset MOs, while Mergers will use the latest available object version from each
281
+
Task. Please note that if one of the Tasks dies, an old version of MO will be still used over and over. Thus, `"delta"`
282
+
mode is advised in most use cases.
283
+
284
+
In setups with Mergers one may also extend the Mergers cycle duration, which can help to even out any data fluctuations:
285
+
```json
286
+
"MovingWindowTaskB": {
287
+
...
288
+
"cycleDurationSeconds" : "60",
289
+
"mergingMode" : "delta",
290
+
"mergerCycleMultiplier": "10", "": "multiplies cycleDurationSeconds in Mergers",
291
+
"resetAfterCycles": "1", "": "it could be still larger than 1"
292
+
}
293
+
```
294
+
In the presented case, the Merger will publish one set of complete MOs per 10 minutes, which should contain all deltas
295
+
received during this last period. Since the QC Tasks cycle is 10 times shorter, the occupancy fluctuations should be
296
+
less apparent. Please also note, that using this parameter in the `"entire"` merging mode does not make much sense,
297
+
since Mergers would use every 10th incomplete MO version when merging.
298
+
260
299
## Writing a DPL data producer
261
300
262
301
For your convenience, and although it does not lie within the QC scope, we would like to document how to write a simple data producer in the DPL. The DPL documentation can be found [here](https://github.com/AliceO2Group/AliceO2/blob/dev/Framework/Core/README.md) and for questions please head to the [forum](https://alice-talk.web.cern.ch/).
@@ -665,6 +704,8 @@ the "tasks" path.
665
704
"taskParameters": { "": "User Task parameters which are then accessible as a key-value map.",
666
705
"myOwnKey": "myOwnValue", "": "An example of a key and a value. Nested structures are not supported"
667
706
},
707
+
"resetAfterCycles" : "0", "": "Makes the Task or Merger reset MOs each n cycles.",
708
+
"": "0 (default) means that MOs should cover the full run.",
668
709
"location": "local", "": ["Location of the QC Task, it can be local or remote. Needed only for",
669
710
"multi-node setups, not respected in standalone development setups."],
670
711
"localMachines": [ "", "List of local machines where the QC task should run. Required only",
@@ -674,7 +715,8 @@ the "tasks" path.
674
715
],
675
716
"remoteMachine": "o2qc1", "": "Remote QC machine hostname. Required ony for multi-node setups.",
676
717
"remotePort": "30432", "": "Remote QC machine TCP port. Required ony for multi-node setups.",
677
-
"mergingMode": "delta", "": "Merging mode, \"delta\" (default) or \"entire\" objects are expected"
718
+
"mergingMode": "delta", "": "Merging mode, \"delta\" (default) or \"entire\" objects are expected",
719
+
"mergerCycleMultiplier": "1", "": "Multiplies the Merger cycle duration with respect to the QC Task cycle"
0 commit comments