Hi All,
I’d like to store a TTree of objects that themselves contain a TTree. The TTree is cloned in the constructor of the object:
MyEvent::MyEvent(TTree *injets, int inrun, int inevtno){
theJets = injets->CloneTree();
theMet = 0; //Empty TTree
theLeptons = 0; //Empty TTree
irun = inrun;
ievent = inevtno;
}
I then want to store these MyEvent objects in a TTree:
TTree * myEvtTree = new TTree("myEvtTree","Events Tree");
MyEvent *evt = new MyEvent();
myEvtTree->Branch("Events","MyEvent",&evt,32000,10);
evt = new MyEvent(myJetTree, 1, 0);
myEvtTree->Fill();
This however SEGV’s (I’m trying to work out why now) but is this sensible? Is there a better way to store collections of objects? I chose a TTree as it seemed to have functunality that TCollection etc didn’t.
Cheers
Simon