TFile *f = new TFile("SomeFile.root"); // contains a Tree named "T"
TTree *T = (TTree*)f->Get("T");
TTree *T2 = new TTree("T2","Limit estimation test");
T2 = T->CloneTree();
**** Break **** Segmentation fault ******
Is this correct in principle?
I tried with and without loading my shared lib.
Well, anyway, how do I best copy only selected Branches of a Tree?
I thought
1) Connecting a file and retrieving the Tree
2) control the active brances with TTree::SetBranchStatus()
3) clone the Tree to another one
Does TTree::Clone() respect the list of active branches?
I could provide you with the full Tree, but the size is 34MB.
But if I made no error in the above commands, it looks like that's the
only way. Then you could also have a look why the Tree doesn't want to be
cloned.
Thank you in advance,
Axel
********************************
Axel Schwank
DESY H1-F22
Notkestrasse 85
D-22607 Hamburg
Rm. 1b/269
Tel (+49 40) 8998-3560
Fax (+49 40) 8998-4385
e-mail schwank@mail.desy.de
Quix 0165-6-2705109
********************************