Illegal leaf: X_amp/X_amp[XYSTRIPS]/F

Dear all,
I am trying to write a TTree whose branches contain arrays and gave a look at
root.cern.ch/root/html/tutorials … ee3.C.html

  But I obtain:

Error in TBranch::TBranch: Illegal leaf: X_amp/X_amp[XYSTRIPS]/F
Error in TTree::SetBranchAddress: unknown branch -> X_amp

Could anyone tell me what’s wrong, please?

Thanks,
bye,
Fra
Test.h (463 Bytes)
Test.C (542 Bytes)

It works if I replace

t->Branch(“X_amp”,data_tree.X_amp,“X_amp[XYSTRIPS]/F”);

with

t->Branch(“X_amp”,data_tree.X_amp,“X_amp[96]/F”);

Isn’t there a way to make it work with the first “syntax”,please?

Cheers,
bye,
Fra

Replace:
"X_amp[XYSTRIPS]/F"
with:
TString::Format(“X_amp[%i]/F”, XYSTRIPS)

See also “Adding a Branch with a Fixed Length Array” in http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch12s15.html
See also “Adding a Branch with a Variable Length Array” in http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch12s15.html
Search also for “array” in http://root.cern.ch/root/html/TTree.html#TTree:Branch@3
See also http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch11s03.html#d5e12547

Thanks a lot!

Regards,
Francesca