Hi!
Maybe the problem I see is simply related to the fact that I did not understand correctly the meaning of split-level when defining a tree, but hopefully you experts can help me/explain it to me (I use ROOT Version 5.13/04e):
In my analysis code I am saving particles in an event as a vector of TLorentzVectors. I use:
++++++++++++++++++++++++++++++
std::vector MuonRec;
std::vector *fMuonRec;
fMuonRec = &MuonRec;
fTree->Branch(“MuonRec”, “std::vector”, &fMuonRec, 32000, 0); //set split-level for 3D-vector to zero!
TLorentzVector Muon(muon->px(), muon->py(), muon->pz(), muon->energy());
fMuonRec->push_back(Muon);
++++++++++++++++++++++++++++++
This works perfectly fine, in the root-file I can browse the tree and look at the muon-vectors.
Still then I have a C++/ROOT-programm running over the root-file and analyzing the tree again. I use:
++++++++++++++++++++++++++++++
std::vector *fMuonRec;
TBranch *b_fMuonRec;
fChain->SetBranchAddress(“MuonRec”, &fMuonRec, &b_fMuonRec);
++++++++++++++++++++++++++++++
So here is the question/problem:
All works fine if I specify split-level=0, but using the default value 99 the code fails and I get some segmentation-violation. Saving a vector of numbers also split level 99 works, so the problem seems to be related to the TLorentzVector.
Is it only possible to save vectors of vectors using split-level=1? Is this somehow because of the different coordinates of the TLorentzVector?
Thanks for any comments!
Philipp Biallass