Hi,
I have these custom classes I’m trying to store in a TTree. I have a event class that has a STL vector of pulse class which also holds a STL vector of a pmt class. No matter what setting on the TTree splitlevel I give, I can’t seem to get the pmt class info into the tree. I made a very simple example that demonstrates the problem.
CustomClassesTree.C (772 Bytes)
I processed the file like so …
root [0] .x CustomClassesTree.C++
Info in <TUnixSystem::ACLiC>: creating shared library /home/j0n0/Desktop/temp/./CustomClassesTree_C.so
In file included from /home/j0n0/Desktop/temp/CustomClassesTree_C_ACLiC_dict.h:34,
from /home/j0n0/Desktop/temp/CustomClassesTree_C_ACLiC_dict.cxx:17:
/home/j0n0/Desktop/temp/./CustomClassesTree.C: In member function ‘void C::StreamerNVirtual(TBuffer&)’:
/home/j0n0/Desktop/temp/./CustomClassesTree.C:30: warning: declaration of ‘b’ shadows a member of 'this'
root [1] TFile file("CustomClassTree.root")
root [2] tree->StartViewer()
File name : CustomClassTree.root
And got this
When I did the tree->MakeClass(“myclass”), I expected the ‘b_a’ variable in the example to be a double array but instead get the vector b_a which is commented out. How do I store and access the Class A properly?
Thanks,
Surge