Skip to content

Commit 7e3800c

Browse files
authored
Extend documentation on getting CCDB objects (#2504)
1 parent 84a1386 commit 7e3800c

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

doc/Advanced.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,13 +753,37 @@ The recommended way (excluding postprocessing) to access these conditions is to
753753
```
754754
The timestamp of the CCDB object will be aligned with the data timestamp.
755755

756+
If a task needs both sampled input and a CCDB object, it is advised to use two data sources as such:
757+
```json
758+
"tasks": {
759+
"MyTask": {
760+
...
761+
"dataSources": [{
762+
"type": "dataSamplingPolicy",
763+
"name": "mftclusters"
764+
}, {
765+
"type": "direct",
766+
"query": "cldict:MFT/CLUSDICT/0?lifetime=condition&ccdb-path=MFT/Calib/ClusterDictionary"
767+
}],
768+
}
769+
},
770+
```
771+
772+
The requested CCDB object can be accessed like any other DPL input in `monitorData`:
773+
```
774+
void QcMFTClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
775+
{
776+
...
777+
auto mDictPtr = ctx.inputs().get<o2::itsmft::TopologyDictionary*>("cldict");
778+
```
779+
756780
Geometry and General Run Parameters (GRP) can be also accessed with the [GRP Geom Helper](#access-grp-objects-with-grp-geom-helper).
757781

758-
If your task accesses CCDB objects using `TaskInterface::retrieveCondition`, please migrate to using one of the methods mentioned above.
782+
If your task accesses CCDB objects using `UserCodeInterface::retrieveConditionAny`, please migrate to using one of the methods mentioned above.
759783

760784
### Accessing from a Postprocessing task
761785

762-
PostProcessingTasks do not take DPL inputs, so in this case `TaskInterface::retrieveCondition` should be used.
786+
PostProcessingTasks do not take DPL inputs, so in this case `ConditionAccess::retrieveConditionAny` should be used (it's inherited by `PostProcessingInterface` and any children).
763787

764788
## Access GRP objects with GRP Geom Helper
765789

0 commit comments

Comments
 (0)