sebbg
August 24, 2007, 5:51pm
1
Hi,
I need to add the following branch to a tree:
tree->Branch(“channel0”,&packet[0].energy,“energy/I:pulse[NSAMPLES]/S”)
tree->Branch(“channel1”,&packet[1].energy,“energy/I:pulse[NSAMPLES]/S”)
When I execute my program I get the following error:
Error in TBranch::TBranch : Illegal leaf: 'channel0/energy/I:pulse[NSAMPLES]/S’
Error in TBranch::TBranch : Illegal leaf: ‘channel1/energy/I:pulse[NSAMPLES]/S’
Do anybody knows what is wrong with this?
Cheers,
Seb
pcanal
August 24, 2007, 5:55pm
2
Either NSAMPLES must be the name of a branch or you need to replace it with the numerical value within the string (Aka Form(“energy/I:pulse[%s]/S”,NSAMPLES); )
Philippe
libov
August 24, 2011, 12:50pm
3
Dear ROOT experts,
I get the same error, but the array dimension IS a branch:
fCurrentTree->Branch("Trk_ntracks",&Trk_ntracks, "Trk_ntracks/I");
fCurrentTree->Branch("Trk_helpar",Trk_helpar, "Trk_helpar[Trk_ntracks][5]/F");
What could I do wrong? Thank you so much for any tip.
Cheers,
Slava
EDIT: sorry for this post, the problem has nothing to do with ROOT.
Cheers,
Slava
pcanal
August 24, 2011, 3:58pm
4
Hi Slava,
I can not reproduce this problem. Could you send a complete running example showing the issues as well as the exact output/result?
Thanks,
Philippe