Skip to content

Commit 527ea48

Browse files
committed
Post-processing
1 parent ef19006 commit 527ea48

File tree

7 files changed

+27
-5
lines changed

7 files changed

+27
-5
lines changed

Framework/include/QualityControl/PostProcessingConfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct PostProcessingConfig {
4545
std::string consulUrl;
4646
core::Activity activity;
4747
bool matchAnyRunNumber = false;
48+
bool critical;
4849
};
4950

5051
} // namespace o2::quality_control::postprocessing

Framework/include/QualityControl/PostProcessingTaskSpec.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct PostProcessingTaskSpec {
4141
std::string id = "Invalid";
4242
std::string taskName = "Invalid";
4343
bool active = true;
44+
bool critical = true;
4445
std::string detectorName = "Invalid";
4546
boost::property_tree::ptree tree = {};
4647
};

Framework/postprocessing.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"postprocessing": {
4343
"ExamplePostprocessing": {
4444
"active": "true",
45+
"critical": "false", "": "if false the task is allowed to die without stopping the workflow, default: true",
4546
"className": "o2::quality_control_modules::skeleton::SkeletonPostProcessing",
4647
"moduleName": "QcSkeleton",
4748
"detectorName": "TST",

Framework/src/InfrastructureGenerator.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,10 @@ void InfrastructureGenerator::generatePostProcessing(WorkflowSpec& workflow, con
681681
ppTask.getOptions()
682682
};
683683
dataProcessorSpec.labels.emplace_back(PostProcessingDevice::getLabel());
684+
if (!ppTaskSpec.critical) {
685+
framework::DataProcessorLabel expendableLabel = { "expendable" };
686+
dataProcessorSpec.labels.emplace_back(expendableLabel);
687+
}
684688
dataProcessorSpec.algorithm = adaptFromTask<PostProcessingDevice>(std::move(ppTask));
685689

686690
workflow.emplace_back(std::move(dataProcessorSpec));

Framework/src/InfrastructureSpecReader.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ TaskSpec InfrastructureSpecReader::readSpecEntry<TaskSpec>(const std::string& ta
104104
}
105105
ts.dataSource = readSpecEntry<DataSourceSpec>(taskID, taskTree.get_child("dataSource"), wholeTree);
106106
ts.active = taskTree.get<bool>("active", ts.active);
107-
ts.critical = taskTree.get<bool>("critical", ts.active);
107+
ts.critical = taskTree.get<bool>("critical", ts.critical);
108108
ts.maxNumberCycles = taskTree.get<int>("maxNumberCycles", ts.maxNumberCycles);
109109
ts.resetAfterCycles = taskTree.get<size_t>("resetAfterCycles", ts.resetAfterCycles);
110110
ts.saveObjectsToFile = taskTree.get<std::string>("saveObjectsToFile", ts.saveObjectsToFile);
@@ -324,6 +324,7 @@ PostProcessingTaskSpec
324324
ppts.id = ppTaskId;
325325
ppts.taskName = ppTaskTree.get<std::string>("taskName", ppts.id);
326326
ppts.active = ppTaskTree.get<bool>("active", ppts.active);
327+
ppts.critical = ppTaskTree.get<bool>("critical", ppts.critical);
327328
ppts.detectorName = ppTaskTree.get<std::string>("detectorName", ppts.detectorName);
328329
ppts.tree = wholeTree;
329330

Framework/src/PostProcessingConfig.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ PostProcessingConfig::PostProcessingConfig(const std::string& id, const boost::p
3636
config.get<std::string>("qc.config.Activity.provenance", "qc"),
3737
{ config.get<uint64_t>("qc.config.Activity.start", 0),
3838
config.get<uint64_t>("qc.config.Activity.end", -1) }),
39-
matchAnyRunNumber(config.get<bool>("qc.config.postprocessing.matchAnyRunNumber", false))
39+
matchAnyRunNumber(config.get<bool>("qc.config.postprocessing.matchAnyRunNumber", false)),
40+
critical(true)
4041
{
4142
for (const auto& initTrigger : config.get_child("qc.postprocessing." + id + ".initTrigger")) {
4243
initTriggers.push_back(initTrigger.second.get_value<std::string>());

doc/Advanced.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,22 +466,35 @@ Once a custom class is implemented, one should let QCG know how to display it co
466466
Some DPL devices can be marked as non-critical. It means that if they die the system will continue running. There is
467467
obviously an impact as all the downstream devices won't get data.
468468

469-
In QC, one can mark a task as critical or non-critical:
469+
### QC tasks
470470

471+
In QC, one can mark a task as critical or non-critical:
471472
```json
472473
"tasks": {
473474
"QcTask": {
474475
"active": "true",
475476
"critical": "false", "": "if false the task is allowed to die without stopping the workflow, default: true",
476477
```
477-
478478
By default, they are critical.
479479

480+
### QC mergers
481+
480482
Mergers are critical or not based on the criticality of the task they are merging data for.
481483

484+
### QC checkers
485+
482486
Checkers are non-critical.
483487

484-
Post-processing ???
488+
### QC post-processing tasks
489+
490+
Post-processing tasks can be marked as critical or non-critical:
491+
```json
492+
"postprocessing": {
493+
"ExamplePostprocessing": {
494+
"active": "true",
495+
"critical": "false", "": "if false the task is allowed to die without stopping the workflow, default: true",
496+
```
497+
By default, they are critical.
485498

486499
## QC with DPL Analysis
487500

0 commit comments

Comments
 (0)