Segmentation Fault vectors


I’m fairly new to Root and c++ but I’m trying to write a macro that produces a root file containing histograms.
However currently I’m getting a segmentation fault and I don’t really know why.
If anyone could help that would be great.
I have one idea: I’m appending data to vectors, but think that they may be getting too large. But I’m really new to this so I’m not exactly certain.
Many thanks,
Geoff Herbert.


Code and input file are attached.
wbbj1.txt needs to be renamed as
final1.txt needs to be renamed as final1.C
wbbj1.txt (5.15 KB)
final1.txt (4.51 KB)

All sorted now.
Thank you for your help.

Geoff Herbert

PS. Many errors in the code. Dont bother trying to fix it. I’ve managed to get it working.


generally it’s worth getting .x final1.C+ to work (note the trailing “+” which invokes your compiler).

Cheers, Axel.