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

Method SetParallelWorld

source/processes/scoring/src/G4ParallelWorldProcessStore.cc:59–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void G4ParallelWorldProcessStore::SetParallelWorld(G4ParallelWorldProcess* proc,
60 const G4String& parallelWorldName)
61{
62 for (const auto& [process, name] : *fInstance)
63 {
64 if(process == proc)
65 {
66 if(name == parallelWorldName)
67 {
68 return; // already registered
69 }
70
71 // inconsistent !
72 G4ExceptionDescription ED;
73 ED << "G4ParallelWorldProcess (" << proc << ") has the world volume (" << name
74 << "). It is inconsistent with (" << parallelWorldName << ").";
75 G4Exception("G4ParallelWorldProcessStore::SetParallelWorld", "ProcScore0101", FatalException,
76 ED);
77 }
78 }
79 (*fInstance)[proc] = parallelWorldName;
80}
81
82void G4ParallelWorldProcessStore::UpdateWorlds()
83{

Callers 1

UpdateWorldsMethod · 0.45

Calls 1

G4ExceptionFunction · 0.85

Tested by

no test coverage detected