Hi again.
Your solution allows to create the TTree and read it, nevertheless, it
crashes when trying to draw a leaf.
For example, in a TBrowser, when double-clicking on a leaf, I get the
following crash:
*#0 0x00007fbee238446c in waitpid () from /usr/lib64/libc.so.6
#1 0x00007fbee2301f62 in do_system () from /usr/lib64/libc.so.6
#2 0x00007fbee338a699 in TUnixSystem::StackTrace (this=0xaa08e0) at
/usr/local/src/root-6.08.06/core/unix/src/TUnixSystem.cxx:2405
#3 0x00007fbee338cf6c in TUnixSystem::DispatchSignals (this=0xaa08e0,
sig=kSigSegmentationViolation) at
/usr/local/src/root-6.08.06/core/unix/src/TUnixSystem.cxx:3625
#4 <signal handler called>
#5 TBranchElement::FindBranch (this=0x56af350, name=0x7fff51df1430
"Sub1.") at
/usr/local/src/root-6.08.06/tree/tree/src/TBranchElement.cxx:1754
#6 0x00007fbecd5b55a2 in TTree::FindBranch (this=0x5686de0,
branchname=0x7fff51df1430 "Sub1.") at
/usr/local/src/root-6.08.06/tree/tree/src/TTree.cxx:4580
#7 0x00007fbecd8be03a in TTreeFormula::FindLeafForExpression (this=this
entry=0x57101c0, expression=expression
entry=0x7fff51df3190 "Sub1.VarA1", leaf=
0x7fff51df30e8: 0x0, leftover=..., final=
0x7fff51df30d9: false, paran_level=
0x7fff51df30dc: 0, castqueue=..., aliasUsed=std::vector of length 0,
capacity 0, useLeafCollectionObject=
0x7fff51df30da: false, fullExpression=0x7fff51df4069 "Sub1.VarA1") at
/usr/local/src/root-6.08.06/tree/treeplayer/src/TTreeFormula.cxx:2387
#8 0x00007fbecd8bfe37 in TTreeFormula::DefinedVariable (this=0x57101c0,
name=..., action=<optimized out>) at
/usr/local/src/root-6.08.06/tree/treeplayer/src/TTreeFormula.cxx:2825
#9 0x00007fbecc61c8b3 in ROOT::v5::TFormula::Analyze (this=0x57101c0,
schain=0x7fff51df4489 "Sub1.VarA1", err=
0x7fff51df442c: 0, offset=0) at
/usr/local/src/root-6.08.06/hist/hist/src/TFormula_v5.cxx:1380
#10 0x00007fbecc6260a4 in ROOT::v5::TFormula::Compile (this=0x57101c0,
expression=<optimized out>) at
/usr/local/src/root-6.08.06/hist/hist/src/TFormula_v5.cxx:2367
#11 0x00007fbecd8b705b in TTreeFormula::Init (this=0x57101c0,
name=0x56e0ee0 "Var1", expression=0x56c3b59 "Sub1.VarA1") at
/usr/local/src/root-6.08.06/tree/treeplayer/src/TTreeFormula.cxx:209
#12 0x00007fbecd8b75cd in TTreeFormula::TTreeFormula (this=0x57101c0,
name=0x56e0ee0 "Var1", expression=0x56c3b59 "Sub1.VarA1",
tree=<optimized out>) at
/usr/local/src/root-6.08.06/tree/treeplayer/src/TTreeFormula.cxx:162
#13 0x00007fbecd89ee7d in TSelectorDraw::CompileVariables
(this=0x56f34f0, varexp=<optimized out>, selection=<optimized out>) at
/usr/local/src/root-6.08.06/tree/treeplayer/src/TSelectorDraw.cxx:1008
#14 0x00007fbecd8a1ce3 in TSelectorDraw::Begin (this=0x56f34f0,
tree=<optimized out>) at
/usr/local/src/root-6.08.06/tree/treeplayer/src/TSelectorDraw.cxx:477
#15 0x00007fbecd8c9e94 in TTreePlayer::Process (this=0x56ba000,
selector=0x56f34f0, option=0x4a1bb99 "", nentries=2, firstentry=0) at
/usr/local/src/root-6.08.06/tree/treeplayer/src/TTreePlayer.cxx:2231
#16 0x00007fbecd8ca7cf in TTreePlayer::DrawSelect (this=0x56ba000,
varexp0=<optimized out>, selection=0x7fbecd5cf555 "", option=0x4a1bb99
"", nentries=1000000000000, firstentry=0) at
/usr/local/src/root-6.08.06/tree/treeplayer/src/TTreePlayer.cxx:414
#17 0x00007fbecd5a3eef in TLeaf::Browse (this=<optimized out>,
b=0x7fbee39270e0) at /usr/local/src/root-6.08.06/tree/tree/src/TLeaf.cxx:135
#18 0x00007fbecdd6193d in TGFileBrowser::DoubleClicked (this=0x4ae2310,
item=<optimized out>) at
/usr/local/src/root-6.08.06/gui/gui/src/TGFileBrowser.cxx:1332
#19 0x00007fbecefc0046 in ?? ()
#20 0x0000000000000000 in ?? ()*
If you have any idea…
thanks.
Jérôme