-
Notifications
You must be signed in to change notification settings - Fork 169
[QC-1088] Late Tasks as post-processing within the message passing framework #2665
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
Open
knopers8
wants to merge
1
commit into
AliceO2Group:master
Choose a base branch
from
knopers8:late-tasks-nice
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| *.json | ||
| Framework/*.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| { | ||
| "qc": { | ||
| "config": { | ||
| "database": { | ||
| "implementation": "CCDB", | ||
| "host": "ccdb-test.cern.ch:8080", | ||
| "maxObjectSize": "2097152", "": "[Bytes, default=2MB] Maximum size allowed, larger objects are rejected." | ||
| }, | ||
| "Activity": { | ||
| "number": "42", | ||
| "type": "NONE", | ||
| "periodName": "", "": "Period name - e.g. LHC22c, LHC22c1b_test", | ||
| "passName": "", "": "Pass type - e.g. spass, cpass1", | ||
| "provenance": "qc", "": "Provenance - qc or qc_mc depending whether it is normal data or monte carlo data" | ||
| }, | ||
| "monitoring": { | ||
| "url": "infologger:///debug?qc" | ||
| }, | ||
| "consul": { | ||
| "url": "" | ||
| }, | ||
| "conditionDB": { | ||
| "url": "ccdb-test.cern.ch:8080" | ||
| }, | ||
| "infologger": { "": "Configuration of the Infologger (optional).", | ||
| "filterDiscardDebug": "false", "": "Set to true to discard debug and trace messages (default: false)", | ||
| "filterDiscardLevel": "12", "": "Message at this level or above are discarded (default: 21 - Trace)", | ||
| "filterDiscardFile": "/tmp/_ID_.txt", "": ["If set, the messages discarded because of filterDiscardLevel", | ||
| "will go to this file (default: <none>); The keyword _ID_ is replaced by the device id. Discarded Debug ", | ||
| "messages won't go there."] | ||
| }, | ||
| "bookkeeping": { | ||
| "url": "" | ||
| } | ||
| }, | ||
| "tasks": { | ||
| "QcTask": { | ||
| "active": "true", | ||
| "className": "o2::quality_control_modules::skeleton::SkeletonTask", | ||
| "moduleName": "QcSkeleton", | ||
| "detectorName": "TST", | ||
| "cycleDurationSeconds": "10", | ||
| "resetAfterCycles": "1", | ||
| "dataSource": { | ||
| "type": "dataSamplingPolicy", | ||
| "name": "tst-raw" | ||
| }, | ||
| "movingWindows": ["example"], | ||
| "location": "local" | ||
| } | ||
| }, | ||
| "checks": { | ||
| "QcCheck": { | ||
| "active": "true", | ||
| "className": "o2::quality_control_modules::skeleton::SkeletonCheck", | ||
| "moduleName": "QcSkeleton", | ||
| "policy": "OnAny", | ||
| "detectorName": "TST", | ||
| "dataSource": [{ | ||
| "type": "Task", | ||
| "name": "QcTask", | ||
| "MOs": ["example"] | ||
| }], | ||
| "extendedCheckParameters": { | ||
| "physics": { | ||
| "pp": { | ||
| "myOwnKey1": "myOwnValue1c" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "lateTasks": { | ||
| "late": { | ||
| "active": "true", | ||
| "className": "o2::quality_control_modules::skeleton::SkeletonLateTask", | ||
| "moduleName": "QcSkeleton", | ||
| "detectorName": "TST", | ||
| "dataSources": [{ | ||
| "type": "Task", | ||
| "name": "QcTask", | ||
| "MOs": ["example", "example2"] | ||
| }], | ||
| "outputActivityStrategy": "integrated" | ||
| } | ||
| } | ||
| }, | ||
| "dataSamplingPolicies": [ | ||
| { | ||
| "id": "tst-raw", | ||
| "active": "true", | ||
| "machines": [], | ||
| "query": "data:TST/RAWDATA/0", | ||
| "samplingConditions": [ | ||
| { | ||
| "condition": "random", | ||
| "fraction": "0.1", | ||
| "seed": "1234" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| // Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| // All rights not expressly granted are reserved. | ||
| // | ||
| // This software is distributed under the terms of the GNU General Public | ||
| // License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| #ifndef QC_CORE_LATETASKRUNNERCONFIG_H | ||
| #define QC_CORE_LATETASKRUNNERCONFIG_H | ||
|
|
||
| /// | ||
| /// \file LateTaskRunnerConfig.h | ||
| /// \author Piotr Konopka | ||
| /// | ||
|
|
||
| #include <Framework/DataProcessorSpec.h> | ||
|
|
||
| #include "QualityControl/UserCodeConfig.h" | ||
| #include "QualityControl/DataSourceSpec.h" | ||
| #include "QualityControl/OutputActivityStrategy.h" | ||
|
|
||
| namespace o2::quality_control::core | ||
| { | ||
|
|
||
| struct LateTaskConfig : public UserCodeConfig { | ||
| bool critical = true; | ||
| OutputActivityStrategy outputActivityStrategy = OutputActivityStrategy::Integrated; | ||
| }; | ||
|
|
||
| } // namespace o2::quality_control::core | ||
|
|
||
| #endif // QC_CORE_LATETASKRUNNERCONFIG_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| // Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| // All rights not expressly granted are reserved. | ||
| // | ||
| // This software is distributed under the terms of the GNU General Public | ||
| // License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| #ifndef LATETASKFACTORY_H | ||
| #define LATETASKFACTORY_H | ||
|
|
||
| /// | ||
| /// \file LateTaskFactory.h | ||
| /// \author Piotr Konopka | ||
| /// | ||
|
|
||
| #include <memory> | ||
|
|
||
| #include "QualityControl/LateTaskConfig.h" | ||
| #include "QualityControl/LateTaskInterface.h" | ||
| #include "QualityControl/RootClassFactory.h" | ||
|
|
||
| namespace o2::quality_control::core | ||
| { | ||
|
|
||
| class LateTaskInterface; | ||
| class ObjectsManager; | ||
|
|
||
| /// \brief Factory in charge of creating late tasks | ||
| /// | ||
| /// The factory needs a library name and a class name provided as an object of type LateTaskConfig. | ||
| /// The class loaded in the library must inherit from LateTaskInterface. | ||
| class LateTaskFactory | ||
| { | ||
| public: | ||
| LateTaskFactory() = default; | ||
| virtual ~LateTaskFactory() = default; | ||
|
|
||
| /// \brief Create a new instance of a LateTaskInterface. | ||
| /// The LateTaskInterface actual class is decided based on the parameters passed. | ||
| static LateTaskInterface* create(const LateTaskConfig& taskConfig, std::shared_ptr<ObjectsManager> objectsManager) | ||
| { | ||
| auto* result = root_class_factory::create<LateTaskInterface>(taskConfig.moduleName, taskConfig.className); | ||
| result->setName(taskConfig.name); | ||
| result->setObjectsManager(objectsManager); | ||
| result->setCustomParameters(taskConfig.customParameters); | ||
| result->setCcdbUrl(taskConfig.ccdbUrl); | ||
|
|
||
| return result; | ||
| } | ||
| }; | ||
|
|
||
| } // namespace o2::quality_control::core | ||
|
|
||
| #endif // LATETASKFACTORY_H |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was there a bug here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the arguments were mistakenly swapped. i can make a separate PR maybe.