Hi,
I want to be able to switch on and off branches in my tree output which was created with.
TTree::Branch(TList*). The list contains single objects as well as TClonesArrays(). In order to attach a “.” to the top level branchname that is needed to switch off selectively the branches I use a split level of 100. Like in this dummy-code:
TList *fl1 = new TList();
TClonesArray *fTcab2 = new TClonesArray(“b2”,100);
fTcab2->SetName(“tcab2”);
b2 *fb2 = new b2(“sb2”);
fl1->Add(fb2);
fl1->Add(fTcab2);
TFile* file = TFile::Open(“branch.root”, “RECREATE”);
TTree *fTree = new TTree(“fTree”,“test Tree”);
fTree->Branch(fl1,32000,100);
The single Object looks like wanted but the TClonesArray contains two dots
*Br 8 :tcab2. : tcab2._ *
*Br 9 :tcab2…fUniqueID : fUniqueID[tcab2._] *
–
*Br 10 :tcab2…fBits : fBits[tcab2._] *
This looks strange and I’m not sure if this is how it is wanted, or not.
Best
Christian
…