Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhysicsListWorkspace Class Reference

#include <G4PhysicsListWorkspace.hh>

Public Types

using pool_type = G4TWorkspacePool< G4PhysicsListWorkspace >
 

Public Member Functions

 G4PhysicsListWorkspace (G4bool verbose=false)
 
 ~G4PhysicsListWorkspace ()
 
void UseWorkspace ()
 
void ReleaseWorkspace ()
 
void DestroyWorkspace ()
 
void InitialiseWorkspace ()
 
void SetVerbose (G4bool v)
 
G4bool GetVerbose ()
 

Static Public Member Functions

static pool_typeGetPool ()
 

Protected Member Functions

void InitialisePhysicsList ()
 

Detailed Description

Definition at line 50 of file G4PhysicsListWorkspace.hh.

Member Typedef Documentation

◆ pool_type

Constructor & Destructor Documentation

◆ G4PhysicsListWorkspace()

G4PhysicsListWorkspace::G4PhysicsListWorkspace ( G4bool  verbose = false)

Definition at line 45 of file G4PhysicsListWorkspace.cc.

46 : fVerbose(verbose)
47{
48 fpVUPLSIM =
50 fpVPCSIM =
52 fpVMPLSIM =
54
55 // Copy information from master into PolyCone/Gon Sides in this thread.
57
58 // Capture its address of ParticleDefinition split-class in this thread
59 fpVUPLOffset = fpVUPLSIM->GetOffset();
60 fpVPCOffset = fpVPCSIM->GetOffset();
61 fpVMPLOffset = fpVMPLSIM->GetOffset();
62}
static const G4VMPLManager & GetSubInstanceManager()
static const G4VPCManager & GetSubInstanceManager()
static const G4VUPLManager & GetSubInstanceManager()

◆ ~G4PhysicsListWorkspace()

G4PhysicsListWorkspace::~G4PhysicsListWorkspace ( )

Definition at line 65 of file G4PhysicsListWorkspace.cc.

66{
67}

Member Function Documentation

◆ DestroyWorkspace()

void G4PhysicsListWorkspace::DestroyWorkspace ( )

Definition at line 120 of file G4PhysicsListWorkspace.cc.

121{
122 fpVUPLSIM->FreeWorker();
123 fpVPCSIM->FreeWorker();
124 fpVMPLSIM->FreeWorker();
125}

◆ GetPool()

G4PhysicsListWorkspace::pool_type * G4PhysicsListWorkspace::GetPool ( )
static

◆ GetVerbose()

G4bool G4PhysicsListWorkspace::GetVerbose ( )
inline

Definition at line 67 of file G4PhysicsListWorkspace.hh.

67{ return fVerbose; }

◆ InitialisePhysicsList()

void G4PhysicsListWorkspace::InitialisePhysicsList ( )
protected

Definition at line 92 of file G4PhysicsListWorkspace.cc.

93{
94}

Referenced by InitialiseWorkspace().

◆ InitialiseWorkspace()

void G4PhysicsListWorkspace::InitialiseWorkspace ( )

Definition at line 97 of file G4PhysicsListWorkspace.cc.

98{
99 if(fVerbose)
100 G4cout << "G4PhysicsListWorkspace::InitialiseWorkspace: "
101 << "Copying particles-definition Split-Class - Start " << G4endl;
102
103 // PhysicsList related, split classes mechanism:
104 // Do *NOT* instantiate sub-instance for this thread, just copy the contents!!
105 fpVUPLSIM->NewSubInstances();
106 fpVPCSIM->NewSubInstances();
107 // The following line is fundamental! If we call NewSubInstances it will not
108 // work See: https://jira-geant4.kek.jp/browse/DEV-284
109 fpVMPLSIM->WorkerCopySubInstanceArray();
110
111 // Additional initialisation if needed - beyond copying memory
113
114 if(fVerbose)
115 G4cout << "G4PhysicsListWorkspace::CreateAndUseWorkspace: "
116 << "Copying particles-definition Split-Class - Done!" << G4endl;
117}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void WorkerCopySubInstanceArray()
void NewSubInstances()

Referenced by G4PhysicsListWorkspace().

◆ ReleaseWorkspace()

void G4PhysicsListWorkspace::ReleaseWorkspace ( )

Definition at line 84 of file G4PhysicsListWorkspace.cc.

85{
86 fpVUPLSIM->UseWorkArea(nullptr);
87 fpVPCSIM->UseWorkArea(nullptr);
88 fpVMPLSIM->UseWorkArea(nullptr);
89}
void UseWorkArea(T *newOffset)

◆ SetVerbose()

void G4PhysicsListWorkspace::SetVerbose ( G4bool  v)
inline

Definition at line 66 of file G4PhysicsListWorkspace.hh.

66{ fVerbose = v; }

◆ UseWorkspace()

void G4PhysicsListWorkspace::UseWorkspace ( )

Definition at line 70 of file G4PhysicsListWorkspace.cc.

71{
72 if(fVerbose)
73 G4cout << "G4PhysicsListWorkspace::UseWorkspace: "
74 << "Copying particles-definition Split-Class - Start " << G4endl;
75
76 // Physics List related, split classes mechanism:
77 // instantiate sub-instance for this thread
78 fpVUPLSIM->UseWorkArea(fpVUPLOffset);
79 fpVPCSIM->UseWorkArea(fpVPCOffset);
80 fpVMPLSIM->UseWorkArea(fpVMPLOffset);
81}

The documentation for this class was generated from the following files: