Dear ROOTer's using 3.05/03 sorry for bringing up STL issues up again. I'm trying to figure out whether Objects containing STL vectors, split tree and tree->Draw() now work as one would expect. I started out with the little example given by Rene on Nov 24 1999 on ROOTtalk, see http://root.cern.ch/cgi-bin/print_hit_bold.pl/root/roottalk/roottalk99/2746.html To have a STL and a non-STL member variable I added an Int_t member variable 'nh' in EventSTL. See attached sources for details. After a rootcint -f STLcint.cxx -c EventSTL.h EventSTL.LinkDef.h g++ -g -fPIC -I$ROOTSYS/include -c STLcint.cxx EventSTL.cxx g++ -g -Wl,-soname,EventSTL.so -shared STLcint.o EventSTL.o \ -o EventSTL.so I get with root -q -l STLw.C root -q -l STLr.C exactly what onw would expect, proving that object branches with STL vectors work fine. Now lets turn to split trees with STL vectors and use in STLw.C mytree->Branch("abc","EventSTL",&CC,16000,2); Again STLw.C and STLr.C work and produce what one expects. Finaly lets try to process the split tree with the TTree::Draw(): file = new TFile("STL.root"); T->Draw("nh"); gives the correct distribution for 'nh'. However a T->Draw("A"); produces for each processed event two messages Error in <TBuffer::CheckByteCount>: object of class TStreamerInfo read too few bytes: 2 instead of 6 Warning in <TBuffer::CheckByteCount>: TStreamerInfo::Streamer() not in sync with data on file, fix Streamer() and one gets a histogram with 40 entries at 0. If one loads the EventSTL code with gSystem->Load("EventSTL"); before the TFile is opened no Warnings and Errors appear, but the 'A' histogram is still wrong (40 entries @ 0). So storing an object with a STL vector a split tree seems to work, but the TTree::Draw() seems to have problems in processing it. It this expected behaviour, or am I'm missing something ? Cheers and happy Easter, Walter
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET