Message: Re: KeepTheCurrentEvent() causes Seg Fault Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: KeepTheCurrentEvent() causes Seg Fault 

Forum: Event and Track Management
Re: Question KeepTheCurrentEvent() causes Seg Fault
Date: 29 Nov, 2011
From: L.G. Sarmiento <L.G. Sarmiento>

Hello Jan,
first of all, I have absolutely not a clue about your specific segmentation
fault problem. However, you claim your code include the lines

> Added G4EventManager as protected member and in the EndofEventAction() I did
> if (aSteppingAction->GetGoodEvent() == true)
>     EventManager->KeepTheCurrentEvent();

So, I created my own version of it using geant4.9.4.p02 and it works nicely. So
my best guess is that you are not initializing correctly the pointer to the
Eventmanager and/or the aSteppingAction.

This is what I did and worked, in the BeginOfEventAction():
[to reset the variable every event]

and in the EndOfEventAction():
[in the SteppingManager there is a place where I set the keeper_flag only for those events I want to store.]

To visualize the events with DAWN I use this:

/vis/open DAWNFILE
/run/beamOn 20

I hope this is not necrobumping and that by now you have already solved your
problem. Anyway since I saw no reply to your question I thought it will be nice
if someone find the answer right next to the question.

Best regards,


 Add Message Add Message
to: "Re: KeepTheCurrentEvent() causes Seg Fault"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]