Geant4 11.2.2
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 ()=default
 
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.

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

◆ ~G4PhysicsListWorkspace()

G4PhysicsListWorkspace::~G4PhysicsListWorkspace ( )
default

Member Function Documentation

◆ DestroyWorkspace()

void G4PhysicsListWorkspace::DestroyWorkspace ( )

Definition at line 111 of file G4PhysicsListWorkspace.cc.

112{
113 fpVUPLSIM->FreeWorker();
114 fpVPCSIM->FreeWorker();
115 fpVMPLSIM->FreeWorker();
116}

◆ GetPool()

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

◆ GetVerbose()

G4bool G4PhysicsListWorkspace::GetVerbose ( )
inline

Definition at line 72 of file G4PhysicsListWorkspace.hh.

72{ return fVerbose; }

◆ InitialisePhysicsList()

void G4PhysicsListWorkspace::InitialisePhysicsList ( )
protected

Definition at line 85 of file G4PhysicsListWorkspace.cc.

85{}

Referenced by InitialiseWorkspace().

◆ InitialiseWorkspace()

void G4PhysicsListWorkspace::InitialiseWorkspace ( )

Definition at line 88 of file G4PhysicsListWorkspace.cc.

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

Referenced by G4PhysicsListWorkspace().

◆ ReleaseWorkspace()

void G4PhysicsListWorkspace::ReleaseWorkspace ( )

Definition at line 77 of file G4PhysicsListWorkspace.cc.

78{
79 fpVUPLSIM->UseWorkArea(nullptr);
80 fpVPCSIM->UseWorkArea(nullptr);
81 fpVMPLSIM->UseWorkArea(nullptr);
82}
void UseWorkArea(T *newOffset)

◆ SetVerbose()

void G4PhysicsListWorkspace::SetVerbose ( G4bool v)
inline

Definition at line 71 of file G4PhysicsListWorkspace.hh.

71{ fVerbose = v; }

◆ UseWorkspace()

void G4PhysicsListWorkspace::UseWorkspace ( )

Definition at line 63 of file G4PhysicsListWorkspace.cc.

64{
65 if (fVerbose)
66 G4cout << "G4PhysicsListWorkspace::UseWorkspace: "
67 << "Copying particles-definition Split-Class - Start " << G4endl;
68
69 // Physics List related, split classes mechanism:
70 // instantiate sub-instance for this thread
71 fpVUPLSIM->UseWorkArea(fpVUPLOffset);
72 fpVPCSIM->UseWorkArea(fpVPCOffset);
73 fpVMPLSIM->UseWorkArea(fpVMPLOffset);
74}

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