-
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 3 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; | ||
|
|
@@ -57,14 +55,7 @@ Quality MeanIsAbove::check(std::map<std::string, std::shared_ptr<MonitorObject>> | |
| void MeanIsAbove::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult) | ||
| { | ||
| // 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 |
||
| ILOG(Error, Support) << "object not checkable" << ENDM; | ||
| return; | ||
| } | ||
|
|
||
| auto* th1 = dynamic_cast<TH1*>(mo->getObject()); | ||
| // Its colour depends on the quality.auto* th1 = dynamic_cast<TH1*>(mo->getObject()); | ||
|
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. scripting mistake?
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. Fixed the scripting mistake - separated the broken comment line into proper lines. Fixed in 8997573. |
||
|
|
||
| Double_t xMin = th1->GetXaxis()->GetXmin(); | ||
| Double_t xMax = th1->GetXaxis()->GetXmax(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,10 +47,7 @@ class NumPhysTriggCheck : public o2::quality_control::checker::CheckInterface | |
| void beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult = Quality::Null) override; | ||
|
|
||
| /// \brief Accept only TH1 histograms as input | ||
| /// \return Name of the accepted object: TH1 | ||
| std::string getAcceptedType() override; | ||
|
|
||
| ClassDefOverride(NumPhysTriggCheck, 1); | ||
| /// \return Name of the accepted object: TH1 ClassDefOverride(NumPhysTriggCheck, 1); | ||
|
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. Leftover comment. Bring ClassDerOverride back.
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. Removed leftover comment and restored ClassDefOverride. Fixed in 8997573. |
||
|
|
||
| private: | ||
| double mFracToMaxGood = 0.5; ///< Thresholds for minimum fraction of physics triggers compared to maximum | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,10 +57,7 @@ class RawErrorCheck : public o2::quality_control::checker::CheckInterface | |
| void beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult = Quality::Null) override; | ||
|
|
||
| /// \brief Accept only TH2 histograms as input | ||
| /// \return Name of the accepted object: TH2 | ||
| std::string getAcceptedType() override; | ||
|
|
||
| ClassDefOverride(RawErrorCheck, 2); | ||
| /// \return Name of the accepted object: TH2 ClassDefOverride(RawErrorCheck, 2); | ||
|
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. leftover documentation comment. Bring ClassDerOverride back.
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. Removed leftover documentation comment and restored ClassDefOverride. Fixed in 8997573. |
||
|
|
||
| private: | ||
| /// \brief Decode key of a configurable parameter as boolean | ||
|
|
||
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.
this comment is not needed, remove
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.
Removed the unnecessary comment. Fixed in 8997573.