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

feat: Silence DD4HEP if requested #3263

Merged
merged 2 commits into from
Jun 7, 2024
Merged

Conversation

ntadej
Copy link
Contributor

@ntadej ntadej commented Jun 6, 2024

For testing purposes it is useful to disable DD4HEP logging if requested. While most of it can be disabled already some internal ROOT/DD4HEP code uses either ROOT logging or pure std::cout. This PR tries to silence also that.

Note that std::cout part is a bit hacky so I'm fine if this is not merged, but maybe somebody else would be interested in this.

@github-actions github-actions bot added the Component - Examples Affects the Examples module label Jun 6, 2024
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.65%. Comparing base (d85aa7f) to head (ba2283f).
Report is 280 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3263   +/-   ##
=======================================
  Coverage   47.65%   47.65%           
=======================================
  Files         507      507           
  Lines       29205    29205           
  Branches    14010    14010           
=======================================
  Hits        13917    13917           
  Misses       5264     5264           
  Partials    10024    10024           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

benjaminhuth
benjaminhuth previously approved these changes Jun 6, 2024
Copy link
Member

@benjaminhuth benjaminhuth left a comment

Choose a reason for hiding this comment

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

Good idea indeed with the std::cout.setstate, I never thought of this option! Indeed its a bit hacky, but I would not be concerned about that within the examples framework.

The only thing I could think of is mult-threading issues with that, but this should run in the initialization phase and thus should not be affected.

@benjaminhuth benjaminhuth added this to the next milestone Jun 6, 2024
@ntadej
Copy link
Contributor Author

ntadej commented Jun 6, 2024

Oops, I didn't know that rebasing invalidates review. Should I have merged or just waited?

@andiwand
Copy link
Contributor

andiwand commented Jun 6, 2024

@ntadej I think the GitHub button Update branch does not invalidate the review but it is not a big deal anyways. I noticed that @benjaminhuth had a comment - if you can clarify this should be ready I think but will leave it up to him

@benjaminhuth
Copy link
Member

@andiwand No I was fine with this, just wanted to raise the thought that in principle multithreading could be an issue for such a solution, but I don't think it is in this case.

@ntadej
Copy link
Contributor Author

ntadej commented Jun 6, 2024

Indeed I looked through code and I do not see any usage outside of initialisation.

@kodiakhq kodiakhq bot merged commit c2f4410 into acts-project:main Jun 7, 2024
51 checks passed
@github-actions github-actions bot removed the automerge label Jun 7, 2024
@andiwand andiwand modified the milestones: next, v35.2.0 Jun 16, 2024
Matthewharri pushed a commit to Matthewharri/acts that referenced this pull request Jun 18, 2024
For testing purposes it is useful to disable DD4HEP logging if requested. While most of it can be disabled already some internal ROOT/DD4HEP code uses either ROOT logging or pure `std::cout`. This PR tries to silence also that.

Note that `std::cout` part is a bit hacky so I'm fine if this is not merged, but maybe somebody else would be interested in this.
@ntadej ntadej deleted the dd4hep-silence branch August 23, 2024 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Examples Affects the Examples module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants