Skip to content

Conversation

@hahnjo
Copy link
Member

@hahnjo hahnjo commented Nov 27, 2025

In order to support efficient concurrent filling of RHist with global histogram statistics, we keep one local RHistStats object per RHistFillContext.

@hahnjo hahnjo self-assigned this Nov 27, 2025
@hahnjo hahnjo added the in:Hist label Nov 27, 2025
@hahnjo hahnjo requested a review from bellenot as a code owner November 27, 2025 17:10
@github-actions
Copy link

github-actions bot commented Nov 27, 2025

Test Results

    22 files      22 suites   3d 20h 21m 50s ⏱️
 3 786 tests  3 786 ✅ 0 💤 0 ❌
81 274 runs  81 274 ✅ 0 💤 0 ❌

Results for commit 4eff656.

♻️ This comment has been updated with latest results.

/// Create a new context for concurrent filling.
std::shared_ptr<RHistFillContext<BinContentType>> CreateFillContext()
{
std::lock_guard g(fMutex);
Copy link
Member

Choose a reason for hiding this comment

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

One could maybe use the c++17 alternative:

Suggested change
std::lock_guard g(fMutex);
std::scoped_lock g(fMutex);

Copy link
Member Author

Choose a reason for hiding this comment

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

As far as I understand, std::lock_guard is preferable for exactly one mutex.

Copy link
Contributor

@jblomer jblomer left a comment

Choose a reason for hiding this comment

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

Nice!

In order to support efficient concurrent filling of RHist with
global histogram statistics, we keep one local RHistStats object
per RHistFillContext.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants