Skip to content

Commit 9fa2b72

Browse files
authored
Improve timePipeline documentation
1 parent 004629f commit 9fa2b72

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Framework/Core/COOKBOOK.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,16 @@ timePipeline(DataProcessorSpec{
358358
```
359359
360360
which will result in two devices, one for even time periods, the other one for
361-
odd timeperiods.
361+
odd timeperiods. This can also be achieved on the command line via the `--pipeline <processor name>:<N>` option, e.g. `--pipeline processor:2` in this case.
362362
363+
You can get programmatically the number of time pipelined devices you belong and the rank by looking it up in the `DeviceSpec`, e.g.:
364+
365+
```cpp
366+
ctx.services().get<const o2::framework::DeviceSpec>().inputTimesliceId;
367+
ctx.services().get<const o2::framework::DeviceSpec>().maxInputTimeslices;
368+
```
369+
370+
Where ctx is either the ProcessingContext or the InitContext.
363371

364372
### Disabling monitoring
365373

0 commit comments

Comments
 (0)