source: trunk/examples/extended/parallel/ParN04/docs/BUG.userStackingAction @ 927

Last change on this file since 927 was 807, checked in by garnier, 16 years ago

update

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