Line | |
---|
1 | $Id: BUG.userStackingAction,v 1.1 2002/03/05 15:22:07 gcosmo Exp $ |
---|
2 | ------------------------------------------------------------------- |
---|
3 | When Geant4 4.0 sees empty event, it still calls userStackingAction. |
---|
4 | |
---|
5 | In the function: |
---|
6 | G4StackManager::PopNextTrack(G4VTrajectory**newTrajectory) |
---|
7 | |
---|
8 | in Geant4 4.0, one has: |
---|
9 | |
---|
10 | 145 if(userStackingAction) userStackingAction->NewStage(); |
---|
11 | 146 #ifdef G4VERBOSE |
---|
12 | 147 if( verboseLevel > 0 ) G4cout << " " << GetNUrgentTrack() |
---|
13 | 148 << " urgent tracks and " << GetNWaitingTrack() |
---|
14 | 149 << " waiting tracks." << G4endl; |
---|
15 | 150 #endif |
---|
16 | 151 if( ( GetNUrgentTrack()==0 ) && ( GetNWaitingTrack()==0 ) ) return 0; |
---|
17 | |
---|
18 | It seems to me that the call, `return 0' (line 151), should occur before |
---|
19 | the call to `NewStage()' (line 145). If there are no tracks to |
---|
20 | be stacked (neither GetNUrgentTrack() nor GetNWaitingTrack()), |
---|
21 | then there is no new stage. So, it's a mistake to call |
---|
22 | userStackingAction->NewStage(). |
---|
23 | |
---|
24 | This affects my parallelization of Geant4, in which I need to purposely |
---|
25 | create a trivial event on the master, and call |
---|
26 | G4EventManager()::ProcessOneEvent() on it to initialize the event on the |
---|
27 | master. I am doing this in order to copy the hits from the slave into |
---|
28 | an event on the master. |
---|
Note: See
TracBrowser
for help on using the repository browser.