-
Notifications
You must be signed in to change notification settings - Fork 164
QC-373 Replace largely unused and not respected CheckInterface::getAcceptedType and isObjectCheckable with an optional helper #2597
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
Changes from 5 commits
26fccb6
9067738
fddcbd3
8997573
4131c92
6d590d8
d8d6b11
2599878
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,8 +38,6 @@ void MeanIsAbove::configure() | |
| mThreshold = stof(mCustomParameters.at("meanThreshold")); | ||
| } | ||
|
|
||
| std::string MeanIsAbove::getAcceptedType() { return "TH1"; } | ||
|
|
||
| Quality MeanIsAbove::check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap) | ||
| { | ||
| auto mo = moMap->begin()->second; | ||
|
|
@@ -59,7 +57,7 @@ void MeanIsAbove::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul | |
| // A line is drawn at the level of the threshold. | ||
| // Its colour depends on the quality. | ||
|
|
||
| if (!this->isObjectCheckable(mo)) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a change in behaviour. There are similar uses removed in TOF code. I think we should not break the existing behaviour that users might rely on. Extract a helper which performs a similar check, but is called
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
| if (!mo->encapsulatedInheritFrom("TH1")) { | ||
| ILOG(Error, Support) << "object not checkable" << ENDM; | ||
| return; | ||
| } | ||
|
|
||
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.
@copilot last small change. Rename the helper to
encapsulatedInheritsFrom(notice the plural). I wrongly thought that the original ROOT method has no "s", my bad.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.
Renamed the method from
encapsulatedInheritFromtoencapsulatedInheritsFrom(added "s") in both the header declaration and implementation, and updated all usages across the codebase. Fixed in 6d590d8.