-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[QC-885] Modify reference check to also accept a TH1 … (#2358)
* [QC-885] Modify ReferenceComparatorCheck to also accept a TH1 instead of a Canvas - also pass the database object from CheckRunner to CheckInterface and use it to implement a new method `retrieveReference`. * format * add beautify and doc * Format * Format * cout * Update ReferenceComparatorCheck.cxx * Update Advanced.md * Update Advanced.md * Update DevelopersTips.md * Update Framework/include/QualityControl/ReferenceUtils.h Co-authored-by: Piotr Konopka <piotr.jan.konopka@cern.ch> * Update Modules/Common/src/ReferenceComparatorCheck.cxx Co-authored-by: Piotr Konopka <piotr.jan.konopka@cern.ch> * Update doc/Advanced.md Co-authored-by: Piotr Konopka <piotr.jan.konopka@cern.ch> * Update doc/Advanced.md Co-authored-by: Piotr Konopka <piotr.jan.konopka@cern.ch> * Update ReferenceComparatorCheck.cxx * Update ReferenceComparatorCheck.cxx * - use int for the run - update the namespaces * format * return a tuple * format * return null quality if no reference run number is provided. * extraction * - Keep the activity parameter but document it - use size_t for the run number - use Timestamp::Latest * Use extended parameters. * pass only 1 activity for reference and not the reference run + the current activity --------- Co-authored-by: Piotr Konopka <piotr.jan.konopka@cern.ch>
- Loading branch information
1 parent
37b7d68
commit 90c35b1
Showing
11 changed files
with
277 additions
and
102 deletions.
There are no files selected for viewing
This file contains 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 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 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,47 @@ | ||
// 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 ReferenceComparatorUtils.h | ||
/// \author Andrea Ferrero and Barthelemy von Haller | ||
/// | ||
|
||
#ifndef QUALITYCONTROL_ReferenceUtils_H | ||
#define QUALITYCONTROL_ReferenceUtils_H | ||
|
||
#include <memory> | ||
#include "QualityControl/MonitorObject.h" | ||
#include "QualityControl/DatabaseInterface.h" | ||
#include "QualityControl/Activity.h" | ||
#include "QualityControl/ActivityHelpers.h" | ||
#include "QualityControl/QcInfoLogger.h" | ||
#include "QualityControl/RepoPathUtils.h" | ||
|
||
namespace o2::quality_control::checker | ||
{ | ||
|
||
//_________________________________________________________________________________________ | ||
// | ||
// Get the reference plot for a given MonitorObject path | ||
|
||
static std::shared_ptr<quality_control::core::MonitorObject> getReferencePlot(quality_control::repository::DatabaseInterface* qcdb, std::string& fullPath, | ||
core::Activity referenceActivity) | ||
{ | ||
auto [success, path, name] = o2::quality_control::core::RepoPathUtils::splitObjectPath(fullPath); | ||
if (!success) { | ||
return nullptr; | ||
} | ||
return qcdb->retrieveMO(path, name, repository::DatabaseInterface::Timestamp::Latest, referenceActivity); | ||
} | ||
|
||
} // namespace o2::quality_control::checker | ||
|
||
#endif // QUALITYCONTROL_ReferenceUtils_H |
This file contains 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 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 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 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 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.