Message: Problem with GetProcessName() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Problem with GetProcessName() 

Forum: Event and Track Management
Date: 25 May, 2008
From: Aram <ateymura@yahoo.com>

Hi All,

If I call aTrack->GetCreatorProcess()->GetProcessName() in a ProcessHits function of a sensitive detector or in the SteppingAction my program crashes.

///  
  G4Track* aTrack = aStep->GetTrack();
  if(aTrack->GetTrackID()==1)
    G4cout<<aTrack->GetCreatorProcess()->GetProcessName()<<G4endl;
///

if I modify the above shown lines to look like:

///  
  G4Track* aTrack = aStep->GetTrack();
  if(aTrack->GetTrackID()==1)
    aTrack->GetCreatorProcess()->GetProcessName();
///

the problem goes away. I noticed that the program is crashing only for tackID=1.
 I am puzzled.. is this the intended behavior for GetProcessName?

thanks you,

-Aram

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

1 None: Re: Problem with GetProcessName()   (Marc Verderi - 26 May, 2008)
(_ None: Re: Problem with GetProcessName()   (Aram - 26 May, 2008)
 Add Message Add Message
to: "Problem with GetProcessName()"

 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 ]