File tree Expand file tree Collapse file tree 4 files changed +13
-15
lines changed
Expand file tree Collapse file tree 4 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ std::optional<std::reference_wrapper<const StoredType>> getMonitorObject(const Q
8080// / \brief Iterate over all QualityObject entries in QCInputs.
8181inline auto iterateQualityObjects (const QCInputs& data);
8282
83+ // / \brief Iterate over QualityObject entries filtered by check name.
84+ // / \param data QCInputs containing QualityObjects.
85+ // / \param checkName Check name to filter entries.
86+ inline auto iterateQualityObjects (const QCInputs& data, std::string_view checkName);
87+
8388// / \brief Retrieve the first QualityObject matching a given check name.
8489// / \param data QCInputs to search.
8590// / \param checkName Name of the quality check.
Original file line number Diff line number Diff line change @@ -88,6 +88,14 @@ inline auto iterateQualityObjects(const QCInputs& data)
8888 return data.iterateByType <o2::quality_control::core::QualityObject>();
8989}
9090
91+ inline auto iterateQualityObjects (const QCInputs& data, std::string_view checkName)
92+ {
93+ const auto filterQOByName = [checkName](const auto & pair) {
94+ return std::string_view (pair.second ->getName ()) == checkName;
95+ };
96+ return data.iterateByTypeAndFilter <QualityObject>(filterQOByName);
97+ }
98+
9199} // namespace o2::quality_control::core
92100
93101#endif
Original file line number Diff line number Diff line change @@ -37,20 +37,6 @@ core::Quality CheckInterface::check(const core::QCInputs& data)
3737 return core::Quality{};
3838};
3939
40- std::string CheckInterface::getAcceptedType () { return " TObject" ; }
41-
42- bool CheckInterface::isObjectCheckable (const std::shared_ptr<MonitorObject> mo)
43- {
44- return isObjectCheckable (mo.get ());
45- }
46-
47- bool CheckInterface::isObjectCheckable (const MonitorObject* mo)
48- {
49- TObject* encapsulated = mo->getObject ();
50-
51- return encapsulated->IsA ()->InheritsFrom (getAcceptedType ().c_str ());
52- }
53-
5440void CheckInterface::configure ()
5541{
5642 // noop, override it if you want.
Original file line number Diff line number Diff line change 1919namespace o2 ::quality_control::core
2020{
2121
22-
2322std::optional<std::reference_wrapper<const QualityObject>> getQualityObject (const QCInputs& data, std::string_view objectName)
2423{
2524 const auto filterQOByName = [objectName](const auto & pair) {
You can’t perform that action at this time.
0 commit comments