Problem with Event example

Hello Rooters,

I have taken the Event example in $(ROOTSYS)/test (where it compiles and runs as expected) and moved it to my home directory (I am trying to use it as an example to build my own class) . It compiles just fine, but when I try to run it without any arguments, I get a segmentation violation. The segmentation violation seems to occur in MainEvent.cxx at line 215, on this call:

TBranch *branch = tree->Branch(“event”, &event, bufsize,split);

Why does it work perfectly in $(ROOTSYS)/test but not when I move the code? What can I do to get the code to run in my home directory?

Thanks,
Eric

Sorry, should have mentioned that I was using version 5.27.04 when I discovered this problem, but I just tried it in v5.20.00 and it works just fine, so I guess its just a problem with 5.27.04.

Sorry to bother you all…

Hi,

Did you move both the Event executable and the shared library? Did you make sure that it matched the currently setup version of ROOT?

Philippe.

Oh, I actually copied all of the source code and then compiled it in the new location (so that it remade libEvent.so). Like I said, I think it is just a problem with 5.27.04 (which no one uses any more anyway; I was only using it because I updated to the development version some time ago but didn’t update to the current development version)