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
2 changes: 1 addition & 1 deletion Framework/basic.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"className": "o2::quality_control_modules::skeleton::SkeletonTask",
"moduleName": "QcSkeleton",
"detectorName": "TST",
"cycleDurationSeconds": "10",
"cycleDurationSeconds": "10", "": "10 seconds minimum",
"maxNumberCycles": "-1",
"": "The other type of dataSource is \"direct\", see basic-no-sampling.json.",
"dataSource": {
Expand Down
1 change: 0 additions & 1 deletion Framework/src/InfrastructureSpecReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ TaskSpec InfrastructureSpecReader::readSpecEntry<TaskSpec>(std::string taskName,
ts.detectorName = taskTree.get<std::string>("detectorName");
ts.cycleDurationSeconds = taskTree.get<int>("cycleDurationSeconds");
ts.dataSource = readSpecEntry<DataSourceSpec>("", taskTree.get_child("dataSource"), wholeTree);

ts.active = taskTree.get<bool>("active", ts.active);
ts.maxNumberCycles = taskTree.get<int>("maxNumberCycles", ts.maxNumberCycles);
ts.resetAfterCycles = taskTree.get<size_t>("resetAfterCycles", ts.resetAfterCycles);
Expand Down
7 changes: 6 additions & 1 deletion Framework/src/TaskRunnerFactory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ TaskRunnerConfig TaskRunnerFactory::extractConfig(const CommonSpec& globalConfig
if (!taskSpec.dataSource.isOneOf(DataSourceType::DataSamplingPolicy, DataSourceType::Direct)) {
throw std::runtime_error("This data source of the task '" + taskSpec.taskName + "' is not supported.");
}
auto cycleDurationSeconds = taskSpec.cycleDurationSeconds;
if (cycleDurationSeconds < 10) {
ILOG(Error, Support) << "Cycle duration is too short (" << cycleDurationSeconds << "), replaced by a duration of 10 seconds." << ENDM;
cycleDurationSeconds = 10;
}
auto inputs = taskSpec.dataSource.inputs;
inputs.emplace_back("timer-cycle",
TaskRunner::createTaskDataOrigin(),
Expand All @@ -76,7 +81,7 @@ TaskRunnerConfig TaskRunnerFactory::extractConfig(const CommonSpec& globalConfig
taskSpec.taskName,
taskSpec.moduleName,
taskSpec.className,
taskSpec.cycleDurationSeconds,
cycleDurationSeconds,
taskSpec.maxNumberCycles,
globalConfig.consulUrl,
globalConfig.conditionDBUrl,
Expand Down
2 changes: 1 addition & 1 deletion doc/Advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ the "tasks" path.
"className": "namespace::of::Task", "": "Class name of the QC Task with full namespace.",
"moduleName": "QcSkeleton", "": "Library name. It can be found in CMakeLists of the detector module.",
"detectorName": "TST", "": "3-letter code of the detector.",
"cycleDurationSeconds": "10", "": "Duration of one cycle (how often MonitorObjects are published).",
"cycleDurationSeconds": "10", "": "Cycle duration (how often objects are published), 10 seconds minimum.",
"maxNumberCycles": "-1", "": "Number of cycles to perform. Use -1 for infinite.",
"dataSource": { "": "Data source of the QC Task.",
"type": "dataSamplingPolicy", "": "Type of the data source, \"dataSamplingPolicy\" or \"direct\".",
Expand Down
2 changes: 1 addition & 1 deletion doc/QuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ The configuration for the QC is made of many parameters described in an [advance
"active": "true",
"className": "o2::quality_control_modules::skeleton::SkeletonTask",
"moduleName": "QcSkeleton",
"cycleDurationSeconds": "10",
"cycleDurationSeconds": "10", "": "10 seconds minimum",
(...)
```
Try and change the name of the task by replacing `QcTask` by a name of your choice (there are 2 places to update in the config file!). Relaunch the workflows. You should now see the object published under a different directory in the QCG.
Expand Down