Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Framework/include/QualityControl/PostProcessingConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct PostProcessingConfig : public o2::quality_control::core::UserCodeConfig {
core::Activity activity;
bool matchAnyRunNumber = false;
bool critical;
bool validityFromLastTriggerOnly = false;
};

} // namespace o2::quality_control::postprocessing
Expand Down
1 change: 1 addition & 0 deletions Framework/src/PostProcessingConfig.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ PostProcessingConfig::PostProcessingConfig(const std::string& id, const boost::p
customParameters.set(key, value.get_value<std::string>());
}
}
validityFromLastTriggerOnly = ppTree.get<bool>("validityFromLastTriggerOnly", false);
}

} // namespace o2::quality_control::postprocessing
4 changes: 4 additions & 0 deletions Framework/src/PostProcessingRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ void PostProcessingRunner::reset()

void PostProcessingRunner::updateValidity(const Trigger& trigger)
{
if (mTaskConfig.validityFromLastTriggerOnly) {
mActivity.mValidity = gInvalidValidityInterval;
}

if (trigger == TriggerType::UserOrControl) {
// we ignore it, because it would not make sense to use current time in tracking objects from the past,
// especially in asynchronous postprocessing
Expand Down
12 changes: 9 additions & 3 deletions doc/Advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -1879,14 +1879,20 @@ declared inside in the "postprocessing" path. Please also refer to [the Post-pro
"moduleName": "QcSkeleton", "": "Library name. It can be found in CMakeLists of the detector module.",
"detectorName": "TST", "": "3-letter code of the detector.",
"initTrigger": [ "", "List of initialization triggers",
"startofrun", "", "An example of an init trigger"
"userorcontrol", "", "An example of an init trigger"
],
"updateTrigger": [ "", "List of update triggers",
"10min", "", "An example of an update trigger"
],
"stopTrigger": [ "", "List of stop triggers",
"endofrun", "", "An example of a stop trigger"
]
"userorcontrol", "", "An example of a stop trigger"
],
"validityFromLastTriggerOnly": "false", "": "If true, the output objects will use validity of the last trigger,",
"": "otherwise a union of all triggers' validity is used by default.",
"sourceRepo": { "": "It allows to specify a different repository for the input objects.",
"implementation": "CCDB",
"host": "another-test.cern.ch:8080"
}
}
}
}
Expand Down
18 changes: 18 additions & 0 deletions doc/PostProcessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ Each of the three methods can be invoked by one or more triggers. Below are list
pass and run.
* `"once"` - Once - triggers only first time it is checked
* `"always"` - Always - triggers each time it is checked
* `"userorcontrol"` - triggers when upon corresponding START and STOP state transitions. This is the recommended trigger for `initTrigger` and `stopTrigger`.

#### Using different databases

Expand All @@ -189,6 +190,23 @@ The destination repository is always the global one defined in the global config
}
```

#### Output object validity

By default, the objects published by post-processing tasks use narrowest validity which contains all past triggers (except of `userorcontrol`).
In other words, a trend's validity covers all of the input objects' validity.

If a post-processing task is not used for trending, but e.g. to decorate or correlate some moving window objects while preserving their validity, one can set the `validityFromLastTriggerOnly` parameter:

```
"postprocessing": {
"MyPostProcessingTaskID": {
...
"validityFromLastTriggerOnly": "true", "": "false by default"
...
}
...
```

### Running it

The post-processing tasks can be run in three ways. First uses the usual `o2-qc` executable which relies on DPL and
Expand Down