Skip to content
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

Add histo for TrendingTask #2167

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Conversation

ValerieRamillien
Copy link
Contributor

No description provided.

Copy link
Collaborator

@Barthelemy Barthelemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I have put a couple of comment that I will let you address.

@@ -159,6 +165,22 @@ Quality DigitsQcCheck::check(std::map<std::string, std::shared_ptr<MonitorObject
mQualityMap[item.second->getName()] = qual;
} // if mNTFInSeconds > 0.
}
if (item.second->getName() == "NbLBEmpty") {
auto histo = static_cast<TH1F*>(item.second->getObject());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use a dynamic cast and make sure that the result is not a nullptr ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, all histo are like this in the checks. Can you tell me what I have to change exactly. And is it for all history in checks part or only for this one?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, you could try to use

      auto histo = dynamic_cast<TH1F*>(item.second->getObject());
      if (histo) {
             // do something with the plot
      } else { 
             // something went wrong
      }

I let you investigate this safer option and perhaps submit another PR as to not block this one. This could apply to all the static casts.

@Barthelemy Barthelemy merged commit 07bdae6 into AliceO2Group:master Mar 12, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants