Skip to content

[tree] Resolve name truncation issues in TTree::Scan#21383

Draft
al-025 wants to merge 3 commits intoroot-project:masterfrom
al-025:ttree-scan
Draft

[tree] Resolve name truncation issues in TTree::Scan#21383
al-025 wants to merge 3 commits intoroot-project:masterfrom
al-025:ttree-scan

Conversation

@al-025
Copy link

@al-025 al-025 commented Feb 26, 2026

This PR fixes #6473

As described in the linked issue, the small default column width for TTree::Scan can lead to common truncations of column names. Since there was no indication that truncation had been performed, this could lead to some confusing output.

This PR makes two changes:

  • If a column name is longer than the default size (9) then the column will be resized to fit that name up to a maximum of 20 characters. If colsize is explicitly set then no resizing will be performed.
  • If a column name is longer than the (possibly resized) column width then it will be truncated to fit, and the last 3 characters will be replaced with ... to indicate truncation had been performed. If for some reason the column size is 3 or less, the first character of the column name will be retained and the remaining characters will be replaced with .s.

Marking as draft for now - these changes will obviously cause lots of differences in tests that use TTree::Scan as part of their output, should I be going through and updating all the reference files myself?

@github-actions
Copy link

Test Results

    22 files      22 suites   3d 6h 23m 41s ⏱️
 3 800 tests  3 741 ✅   4 💤    55 ❌
75 511 runs  74 107 ✅ 297 💤 1 107 ❌

For more details on these failures, see this check.

Results for commit 02410bc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TTree::Scan truncates leaf names in output

3 participants