SetBranchStatus - third flag?

Dear Developers,

I would like to suggest adding a third status option to the SetBranchStatus method. Currently, there are only two possibilities:

  • process branch

  • do not process branch

In my opinion, it would be very useful to introduce an additional option: “never process branch”.

Here is the motivation:
In my analysis I sometimes need to process rare events, where the relevant information is stored in the lets call it Trigger branch. Once a valid trigger is found, I have to call TTree::GetEntry(n, 1), which forces loading of all branches — including those that I do not need (for example, hits, when I am only analyzing tracks).

With a “never process branch” option, it would be possible to permanently disable branches that are never needed e.g. those “hits”.

This could significantly improve performance of some analyses.

Hi @dwielane,

thank you for sharing your use case and idea with us. I will let our TTree Expert - @pcanal comment on this.

However, the best and easiest way to improve the performance of your analysis, is to move to RDataFrame: ROOT: ROOT::RDataFrame Class Reference where you can take advantage of many optimisations starting from implicit Multi Threading. It will also allow you to move to RNTuple seamlessly. In fact, regarding the new features for analysis, all the effort from our side as the ROOT team is put into RDataFrame.

We have a number of tutorials from which you can learn about different RDataFrame features: ROOT: RDataFrame analysis tutorials . I would be happy to help you with the transition of your analysis to RDF in case you have any further questions.

Cheers,

Marta