Problem 1624 - G4WrapperProcess class does not work in MT
Summary: G4WrapperProcess class does not work in MT
Status: RESOLVED DUPLICATE of problem 1623
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes (show other problems)
Version: 10.0
Hardware: All All
: P5 minor
Assignee: John Apostolakis
URL:
Depends on:
Blocks:
 
Reported: 2014-05-05 19:55 CEST by Andrea Dotti
Modified: 2014-05-05 20:24 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Andrea Dotti 2014-05-05 19:55:02 CEST
The class G4WrapperProcess does not work correctly in MT mode, because the SetMasterProcess method does not propagate the call to the "wrapped" process. Thus the wrapped process has, as pointer of the master process, the wrapper process itself. The problem can be easily fixed via:
virtual void G4WrapperProcess::SetMasterProcess(G4VProcess* masterP) {
	pRegProcess->SetMasterProcess(static_cast<G4WrapperProcess*>(masterP)->GetRegisteredProcess() );
};

I will make a patch.

Andrea
Comment 1 Andrea Dotti 2014-05-05 20:23:06 CEST

*** This problem has been marked as a duplicate of problem 1623 ***
Comment 2 Andrea Dotti 2014-05-05 20:24:15 CEST
Note this is not related to problems number #1594