Best way to keep branch descriptions in TTree

Hi. I used to store data with TTree among several collaborations.
I’ve sometimes missed descriptions for each branch.
The descriptions are managed with text file, e-log, or comment in the code. It is a hard to seek elsewhere. If I couldn’t find them, I need to guess them with the branch name or see the implementation again.

Do you have the best way to store branch description in ROOT file itself? Can we add some comments in TTree naturally?

Does the output of mytree->Print(); provide enough information?

The CMS NanoAOD format stores documentation in the TBranch’s Title (Get/SetTitle()), which is/can be just a string.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.