Dear Axel and Phillip,
I wrote a simple script which reproduces the error I am encountering with the functions returning vector used directly in the Draw command.
You just have to unzip it, build it with cmake and then do a “make install”.
Run the executable with the arguments “-nevents 100000”.
You will get a file called return_vector_issue.root
This file contains a tree with 2 branches.
“MyClass” is a custom class containing
a float member
a vector member
a function returning the float member: GetSimpleMember()
a function returning the vector member: GetVectorMember()
a function dumping the vector in a TArrayF and returning the TArrayF: DumpVectorToArray()
“MyClassVect” is a vector of the same custom class
Open the return_vector_issue.root
gSystem->Load("./libMyClass.so")
Then try
tree->Draw(“MyClass.GetSinpleMember()”,"","") produce the expected result
tree->Draw(“MyClass.GetVectorMember()”,"","") produce the following message
Warning in TSelectorDraw::ProcessFillObject: Not implemented for vector
tree->Draw(“MyClass.DumpVectorToArray()”,"","") produce the following message
Warning in TSelectorDraw::ProcessFillObject: Not implemented for TArrayF
tree->Draw(“MyClassVect.GetSinpleMember()”,"","") produce the expected result
tree->Draw(“MyClassVect.GetVectorMember()”,"","") or
tree->Draw(“MyClassVect[0].GetVectorMember()”,“MyClassVect@.size() > 0”,"") or anything similar
crash with the following error
Fatal: parent && element violated at line 2669 of `/home/alex/Softwares/root-6.04.14/tree/treeplayer/src/TFormLeafInfo.cxx’
aborting
tree->Draw(“MyClassVect.DumpVectorToArray()”,"","") produce the following message
Warning in TSelectorDraw::ProcessFillObject: Not implemented for TArrayF
For the other matter I was mentionning, I tried to reproduce it as well but it seems fine in this small example, so disregard the 2 other files generated. I will see if there is a mistake in the other program which is much more complex or if there is a condition to reproduce the issue that I did not include here.
Thanks,
Alex
returnVector.tar.gz (2.36 KB)