-
Notifications
You must be signed in to change notification settings - Fork 164
[QC-443] Represent Checks configuration as C++ structures #823
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
Merged
Merged
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
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
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,39 @@ | ||
| // 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. | ||
|
|
||
| /// | ||
| /// \file CheckRunnerConfig.h | ||
| /// \author Piotr Konopka | ||
| /// | ||
| #ifndef QUALITYCONTROL_CHECKRUNNERCONFIG_H | ||
| #define QUALITYCONTROL_CHECKRUNNERCONFIG_H | ||
|
|
||
| #include <string> | ||
| #include <unordered_map> | ||
|
|
||
| namespace o2::quality_control::checker | ||
| { | ||
|
|
||
| struct CheckRunnerConfig { | ||
| std::unordered_map<std::string, std::string> database; | ||
| std::string consulUrl{}; | ||
| std::string monitoringUrl{}; | ||
| bool infologgerFilterDiscardDebug = false; | ||
| int infologgerDiscardLevel = 21; | ||
| int fallbackRunNumber = 0; | ||
| std::string fallbackPeriodName{}; | ||
| std::string fallbackPassName{}; | ||
| std::string fallbackProvenance{}; | ||
| }; | ||
|
|
||
| } // namespace o2::quality_control::checker | ||
|
|
||
| #endif //QUALITYCONTROL_CHECKRUNNERCONFIG_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
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,59 @@ | ||
| // 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 QUALITYCONTROL_CHECKSPEC_H | ||
| #define QUALITYCONTROL_CHECKSPEC_H | ||
|
|
||
| /// | ||
| /// \file CheckSpec.h | ||
| /// \author Piotr Konopka | ||
| /// | ||
|
|
||
| #include <string> | ||
|
|
||
| #include "QualityControl/DataSourceSpec.h" | ||
| #include "QualityControl/UpdatePolicyType.h" | ||
|
|
||
| namespace o2::quality_control::checker | ||
| { | ||
|
|
||
| /// \brief Specification of a Check, which should map the JSON configuration structure. | ||
| struct CheckSpec { | ||
| // default, invalid spec | ||
| CheckSpec() = default; | ||
|
|
||
| // minimal valid spec | ||
| CheckSpec(std::string checkName, std::string className, std::string moduleName, std::string detectorName, | ||
| std::vector<core::DataSourceSpec> dataSources, UpdatePolicyType updatePolicySpec) | ||
| : checkName(std::move(checkName)), | ||
| className(std::move(className)), | ||
| moduleName(std::move(moduleName)), | ||
| detectorName(std::move(detectorName)), | ||
| dataSources(std::move(dataSources)), | ||
| updatePolicy(updatePolicySpec) | ||
| { | ||
| } | ||
|
|
||
| // basic | ||
| std::string checkName = "Invalid"; | ||
| std::string className = "Invalid"; | ||
| std::string moduleName = "Invalid"; | ||
| std::string detectorName = "DET"; | ||
| std::vector<core::DataSourceSpec> dataSources; | ||
| UpdatePolicyType updatePolicy = UpdatePolicyType::OnAny; | ||
| // advanced | ||
| bool active = true; | ||
| std::unordered_map<std::string, std::string> customParameters = {}; | ||
| }; | ||
|
|
||
| } // namespace o2::quality_control::checker | ||
|
|
||
| #endif //QUALITYCONTROL_CHECKSPEC_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
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.
Uh oh!
There was an error while loading. Please reload this page.