I have this tree that has std::vector values and std::vector values. I did make class on the tree and although variables seems OK, values are not working. For eg.
for (int i=0; i<Truth_N; ++i) {
cout<<"testing eta "<< (*Truth_eta)[i]<<endl;
cout<<"testing pdgId "<< (*Truth_pdgId)[i]<<endl;
}
(values are available as pointer of vector, that why need to dereference)
results in
root [0] .L test.C
root [1] test a
Warning in <TClass>: no dictionary for class AttributeListLayout is available
Warning in <TClass>: no dictionary for class pair<string> is available
root [2] a.Loop()
testing eta -0.694072
Error: Can't call vector<int,allocator<int> >::operator[](i) in current scope test.C:44:
Possible candidates are...
(in vector<int,allocator<int> >)
testing pdgId (class G__CINT_ENDL)77027296
*** Interpreter error recovered ***
version: Version 5.11/02 19 April 2006
MacOSX 10.4.7 (Intel)
I didn’t compile myself, I picked up from somewhere but I can’t remember where.
I didn’t run make cintdlls and I don’t know what that does.
check(&vi, &vd);
}[/code] I tried with ROOT’s current CVS version on linux. Does that work for you, too? If not, could you provide us with a working example of your code showing the problem?