Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QC-686 Allow apply Reductors to CCDB data in TrendingTasks and alike #2110

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

knopers8
Copy link
Collaborator

@knopers8 knopers8 commented Jan 26, 2024

Ugly, but working... I am still looking into ways of better separation between ObjectGetter and UserCodeInterface and avoid renaming all the currently inherited Reductors.

Some cleanups still needed as well

@knopers8 knopers8 changed the title [WIP] [QC-686] Allow apply Reductors to CCDB data in TrendingTasks and alike QC-686 Allow apply Reductors to CCDB data in TrendingTasks and alike Jan 29, 2024
This commit brings the possibility to apply Reductors to CCDB objects.
To achieve that, the former Reductor (which assumes the expected type as TObject*) has become ReductorTObject, while ReductorConditionAny lets us retrieve any type which has a dictionary with retrieveConditionAny method.
For better separation and easier testability, I extracted that method into a separate ConditionAccess class.
assuming the presence of the expected object in the database for given timestamps, the LHC phase can be trended with the following config:
```
      "LHCClockPhaseTrend": {
        "active": "true",
        "className": "o2::quality_control::postprocessing::TrendingTask",
        "moduleName": "QualityControl",
        "detectorName": "TST",
        "dataSources": [
          {
            "type": "condition",
            "path": "TOF/Calib",
            "names": [ "LHCphase" ],
            "reductorName": "o2::quality_control_modules::common::LHCClockPhaseReductor",
            "moduleName": "QcCommon"
          }
        ],
        "plots": [
          {
            "name": "lhc_phase",
            "title": "LHC Phase trend",
            "varexp": "LHCphase.phase:time",
            "selection": "",
            "option": "*L",
            "graphAxisLabel": "Mean X:time"
          }
        ],
        "initTrigger": [
          "userorcontrol"
        ],
        "updateTrigger": [
          "10 seconds"
        ],
        "stopTrigger": [
          "userorcontrol"
        ]
      }
```
@knopers8
Copy link
Collaborator Author

@ercolessi FYI, I could get a seemingly valid trend with the attached postprocessing-lhc-clock.json and the following execution command:

o2-qc-run-postprocessing --config json://postprocessing-lhc-clock.json --id LHCClockPhaseTrend --timestamps 1706280958934 1706280958934 1706280969342 1706280979772 1706280990188 1706280990188

Also tagging @mlesch , who would be probably interested in seeing a real-world example of a ccdb object reductor (see LHCClockPhaseReductor).

@knopers8
Copy link
Collaborator Author

@Barthelemy ready for review

Copy link
Collaborator

@Barthelemy Barthelemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, good, not sure I would have named them ReductorTObject and ReductorConditionAny but that's a detail !
Thanks,

@Barthelemy Barthelemy merged commit 57314e0 into AliceO2Group:master Jan 31, 2024
2 checks passed
@knopers8 knopers8 deleted the ccdb-trending branch January 31, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants