Message: Lifetime of touchables Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Lifetime of touchables 

Forum: Geometry
Date: 01 Aug, 2014
From: Nicola Mori <Nicola Mori>

Hi, to identify volumes where hits happen I'm using the address of the corresponding touchable:

  const G4VTouchable *touchable = aStep->GetPreStepPoint()->GetTouchable();

In my hit object I record this address during G4VSensitiveDetector::ProcessHits, but in my EndOfEventAction() it seems that the memory location pointed by this pointer contains invalid data. I guess that it might be possible that the touchable is deleted before EndOfEventAction(), and that its former memory location is overwritten. Is this possible? I'd like to clarify this point before starting to search an eventual bug in my code. Thanks.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Warning: Re: Lifetime of touchables   (Michael H. Kelsey - 01 Aug, 2014)
1 Question: Re: Lifetime of touchables   (Nicola Mori - 02 Aug, 2014)
1 None: Re: Lifetime of touchables   (John Allison - 02 Aug, 2014)
... 1 Message(s)
2 None: Re: Lifetime of touchables   (Mike Kelsey - 02 Aug, 2014)
2 None: Re: Lifetime of touchables   (John Apostolakis - 04 Aug, 2014)
1 None: Re: Lifetime of touchables   (Nicola Mori - 04 Aug, 2014)
 Add Message Add Message
to: "Lifetime of touchables"

 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 ]