Could anyone tell me what the purpose of the TBranch method AddBasket is?
I see that it takes a TBasket object as an argument, so does this permit a way to attach floating baskets to a branch? Or perhaps attach baskets already attached to a branch, to a different branch?
(Hoping it is a different way to add baskets to a branch without the FlushBaskets method)
Technically this is exactly what that function does (i.e. attach floating baskets to a branch) and it is using in the TTreeCloner to copy/move basket from one TTree to the other.
However this is unlikely to be what you are looking for (i.e. you would need to have a fully formed and complete basket coming from a different branch/tree).
More likely, you ought to investigate using TTree::SetAutoFlush with a positive value as parameter (which set the rate of calls to Flush in number of entries) or call Flush explicitly when you need it.
Possibly related is TTree::kOnlyFlushAtCluster