1 Nov 2004 09:50
ROOT and STL (was Re: [ROOT] PyROOT and STL containers.)
Maxim Nikulin <nikulin <at> gorodok.net>
2004-11-01 08:50:30 GMT
2004-11-01 08:50:30 GMT
Hi,
Brett Viren wrote:
> I'm trying to use PyROOT with classes that return STL containers. Eg
> I have a class that reutrns an "std::vector<std::string>". Some of
> the std::vector methods work but some don't, particularly operator[].
>
> print vs
> <__main__.vector<string> object at 0x41d1124c>
> print vs.size()
> 37
> print vs[0]
> *** Break *** illegal instruction
I'm afraid the problem is more general. I see STL related trouble in
ROOT without the Python wrapping.
My full script gives "illegal instruction". The shortest shows different
behavior:
<session>
[nikulin <at> lx13cmd:root]$ cat vector_fail.C
{
vector<Double_t> v;
Int_t i;
for (i = 0; i < 10000; ++i) {
v.push_back(100);
}
}
[nikulin <at> lx13cmd:root]$ root
(Continue reading)
RSS Feed