MCPcopy Create free account
hub / github.com/Geant4/geant4 / SetupShadowProcess

Method SetupShadowProcess

source/run/src/G4RunManagerKernel.cc:948–969  ·  view source on GitHub ↗

--------------------------------------------------------------------

Source from the content-addressed store, hash-verified

946
947// --------------------------------------------------------------------
948void G4RunManagerKernel::SetupShadowProcess() const
949{
950 G4ParticleTable* theParticleTable = G4ParticleTable::GetParticleTable();
951 auto theParticleIterator = theParticleTable->GetIterator();
952 theParticleIterator->reset();
953 // loop on particles and get process manager from there list of processes
954 while ((*theParticleIterator)()) {
955 G4ParticleDefinition* pd = theParticleIterator->value();
956 G4ProcessManager* pm = pd->GetProcessManager();
957 if (pm != nullptr) {
958 G4ProcessVector& procs = *(pm->GetProcessList());
959 for (G4int idx = 0; idx < (G4int)procs.size(); ++idx) {
960 const G4VProcess* masterP = procs[idx]->GetMasterProcess();
961 if (masterP == nullptr) {
962 // Process does not have an associated shadow master process
963 // We are in master mode or sequential
964 procs[idx]->SetMasterProcess(const_cast<G4VProcess*>(procs[idx]));
965 }
966 }
967 }
968 }
969}

Callers

nothing calls this directly

Calls 7

GetIteratorMethod · 0.80
resetMethod · 0.45
valueMethod · 0.45
GetProcessManagerMethod · 0.45
sizeMethod · 0.45
GetMasterProcessMethod · 0.45
SetMasterProcessMethod · 0.45

Tested by

no test coverage detected