Macro Crashes after GetEntry in For Loop


As I’ve done many times before, I’m creating a simple macro to make some plots from a file. Like before, I assign a chain, get the number of entries, assign an array to the correct variable, and SetBranchAddress correctly. I then run my for loop to fill the plots. The for loop is able to do one loop, but then it crashes due to a segmentation fault. For some reason, the main problem comes when I type in ‘chain->GetEntry(i)’ in the for loop. If I don’t type that in, then the for loop runs over all the entries, but when I do type that in, the for loop crashes after its first run. Does anybody know how to fix this? Any and all help is greatly appreciated.


ROOT Version: 6-12-06
Platform: Linux
Compiler: Not Provided

Hi @myles!

Can you please, post here a bit more details: your macro and segmentation error, that you got running it?

Thank you,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.