[TTree] Avoid getting the number of branches twice
[TTree] Avoid getting the number of branches twice

The operation is relatively costly as TObjArray::GetEntries also
creates a TReadLockGuard.

root-mirror/root,olifre/root,root-mirror/root,karies/root,olifre/root,olifre/root,root-mirror/root,olifre/root,olifre/root,root-mirror/root,root-mirror/root,root-mirror/root,karies/root,root-mirror/root,karies/root,olifre/root,olifre/root,olifre/root,olifre/root,karies/root,root-mirror/root,root-mirror/root,karies/root,karies/root,root-mirror/root,karies/root,karies/root,karies/root,olifre/root,olifre/root,root-mirror/root,karies/root,karies/root