Merging TTrees

I have two TTrees each with the same structure. TTree* t1 has n1 entries, TTree* t2 has n2 entries. I would like to merge these two trees into a third TTree* t3 such that when I read back t3, I get entries which are randomly sampled from t1 and t2.

Is there a TTree method which accomplishes this?

Thanks in advance for your help,

William Lockman , page 231


Doing random access may be resource consuming.
My recommendation (if possible) is to:
-merge your 2 trees into one single tree.
-Open the merged Tree *mtree and do mtree->LoadBaskets()
see: … oadBaskets
-Now you can access randomly any entry in mtree