diff --git a/Framework/include/QualityControl/CheckInterface.h b/Framework/include/QualityControl/CheckInterface.h index 45d2884336..b1bb206167 100644 --- a/Framework/include/QualityControl/CheckInterface.h +++ b/Framework/include/QualityControl/CheckInterface.h @@ -96,10 +96,9 @@ class CheckInterface : public core::UserCodeInterface /// the activity is the current one, while the run number is the reference run. /// /// \param path path to the object (no provenance) - /// \param referenceRun Run number of the reference data - /// \param activity Current activity (necessary for the provenance and the pass) + /// \param referenceActivity Reference activity (usually a copy of the current activity with a different run number) /// \return - std::shared_ptr retrieveReference(std::string path, size_t referenceRun, Activity activity); + std::shared_ptr retrieveReference(std::string path, Activity referenceActivity); private: std::shared_ptr mDatabase; diff --git a/Framework/include/QualityControl/ReferenceUtils.h b/Framework/include/QualityControl/ReferenceUtils.h index 155b077841..5b8f6d7b6f 100644 --- a/Framework/include/QualityControl/ReferenceUtils.h +++ b/Framework/include/QualityControl/ReferenceUtils.h @@ -33,13 +33,13 @@ namespace o2::quality_control::checker // Get the reference plot for a given MonitorObject path static std::shared_ptr getReferencePlot(quality_control::repository::DatabaseInterface* qcdb, std::string& fullPath, - size_t referenceRun, core::Activity activity) + 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, activity); + return qcdb->retrieveMO(path, name, repository::DatabaseInterface::Timestamp::Latest, referenceActivity); } } // namespace o2::quality_control::checker diff --git a/Framework/src/CheckInterface.cxx b/Framework/src/CheckInterface.cxx index a3b5d62e98..445d51e609 100644 --- a/Framework/src/CheckInterface.cxx +++ b/Framework/src/CheckInterface.cxx @@ -60,9 +60,9 @@ void CheckInterface::endOfActivity(const Activity& activity) // noop, override it if you want. } -shared_ptr CheckInterface::retrieveReference(std::string path, size_t referenceRun, Activity activity) +shared_ptr CheckInterface::retrieveReference(std::string path, Activity referenceActivity) { - return o2::quality_control::checker::getReferencePlot(mDatabase.get(), path, referenceRun, activity); + return o2::quality_control::checker::getReferencePlot(mDatabase.get(), path, referenceActivity); } } // namespace o2::quality_control::checker diff --git a/Modules/Common/include/Common/ReferenceComparatorCheck.h b/Modules/Common/include/Common/ReferenceComparatorCheck.h index 78c6f953b6..9e163f9bd2 100644 --- a/Modules/Common/include/Common/ReferenceComparatorCheck.h +++ b/Modules/Common/include/Common/ReferenceComparatorCheck.h @@ -54,7 +54,7 @@ class ReferenceComparatorCheck : public o2::quality_control::checker::CheckInter std::unique_ptr mComparator; std::map mQualityFlags; std::map> mQualityLabels; - quality_control::core::Activity mActivity; + quality_control::core::Activity mActivity /*current*/, mReferenceActivity; size_t mReferenceRun; }; diff --git a/Modules/Common/src/ReferenceComparatorCheck.cxx b/Modules/Common/src/ReferenceComparatorCheck.cxx index c239855ef4..3800570252 100644 --- a/Modules/Common/src/ReferenceComparatorCheck.cxx +++ b/Modules/Common/src/ReferenceComparatorCheck.cxx @@ -61,6 +61,8 @@ void ReferenceComparatorCheck::startOfActivity(const Activity& activity) } mActivity = activity; + mReferenceActivity = activity; + mReferenceActivity.mId = mReferenceRun; } void ReferenceComparatorCheck::endOfActivity(const Activity& activity) @@ -147,8 +149,8 @@ Quality ReferenceComparatorCheck::getSinglePlotQuality(std::shared_ptr CheckInterface::retrieveReference(std::string path, int referenceRun, Activity activity); + std::shared_ptr CheckInterface::retrieveReference(std::string path, Activity referenceActivity); ``` - `path` : the path of the object _without the provenance (e.g. `qc`)_ -- `referenceRun` : the run of reference -- `activity` : the current activity +- `referenceActivity` : the activity of reference (usually the current activity with a different run number) If the reference is not found it will return a `nullptr` and the quality is `Null`.