TTree::GetBranch("")->Fill() runtime error

Hi there,

I have a tree with two branches that can not both be filled at the same time (one branch will contain, say, 2 entries for every entry in the other one). Trying to use TTree::GetBranch(“name”)->Fill() for each branch (Rather than TTree::Fill()) works fine when run, and TTree::Print() then shows the entries are as expected. However, calling the Draw method for a certain leaf does not return anything, and if I try to create a histogram from the tree viewer, the following code is displayed in CINT then nothing else happens:

firstentry=-1, nentries=1
tv__tree->Draw(“effdata.bdecaylength”,"","", 1, -1);

Sometimes even this doesn’t happen but a segmentation violation occurs, this however is not systematically repeatable.

Any suggestions? All data types are double, with each branch being filled by a structure of only doubles.

All branches of one Tree must have the same number of entries.
In your case, create a second tree.

Rene

Thanks for the info. I’ve done that as a work around already, so all is not lost.