Leak when reading std::vector

I think if one wanted to read individual branches, the code would contain something like:

Both the technique I shown and the technique using BranchStatus will work. Using BranchStatus is slightly slower (especially for TTree with large number of branches) as each GetEntry needs to always ask which branches are enabled (and the selection using a sorta regex is a bit more cumbersome).

So the answer to

[quote]“Do I really need the TBranch?”.[/quote]Yes if you want to read only that branch (and want more performance).

Cheers,
Philippe.