Skip to content

Conversation

@hahnjo
Copy link
Member

@hahnjo hahnjo commented Oct 23, 2025

To fill a regular one-dimensional histogram without specifying an axis interval during construction.

I missed this example in commit 943ee82 ("Accept regular axis
interval as std::pair").
@hahnjo hahnjo requested review from hageboeck and jblomer October 23, 2025 12:26
@hahnjo hahnjo self-assigned this Oct 23, 2025
@hahnjo hahnjo requested a review from bellenot as a code owner October 23, 2025 12:26
@hahnjo hahnjo added the in:Hist label Oct 23, 2025
@hahnjo hahnjo changed the title [hist] Implement initial RHistAutoAxisFiller [hist] Implement initial RHistAutoAxisFiller Oct 23, 2025
@github-actions
Copy link

github-actions bot commented Oct 23, 2025

Test Results

    22 files      22 suites   3d 19h 18m 39s ⏱️
 3 703 tests  3 703 ✅ 0 💤 0 ❌
79 515 runs  79 515 ✅ 0 💤 0 ❌

Results for commit 8bb1c23.

♻️ This comment has been updated with latest results.

/// \see Flush()
RHist<BinContentType> &GetHist()
{
Flush();
Copy link
Contributor

Choose a reason for hiding this comment

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

That means that we can't get an empty histogram from the auto filler. Is this the desired behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes correct. It's a good question what we want to happen in this case. If we want to allow an empty histogram, what would be the axis interval and what would we want to happen in case of further fills? Would we modify the constructed histogram (potentially) behind the users' back? If there are many fills, how would the user tell is that now is the time to flush the buffer, while they are already looking at the histogram?

I think my proposal for the moment would be to disallow and see if it poses problems that we find a good compromise how to address.

///
/// Throws an exception if the buffer is empty, the axis interval cannot be determined, or if it would be empty
/// because the minimum equals the maximum.
void Flush()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want/need to expose this publicly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Another good question. A potential use case would be where the user designates a limited set of "sample" entries that are potentially not aligned with fMaxBufferSize, or multiple RHistAutoAxisFiller with different fill frequencies that the user wants to "synchronize".

To fill a regular one-dimensional histogram without specifying an
axis interval during construction.
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