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

#include <G4PhysicsListWorkspace.hh>

Public Types

typedef G4TWorkspacePool< G4PhysicsListWorkspacepool_type
 

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 55 of file G4PhysicsListWorkspace.hh.

Member Typedef Documentation

◆ pool_type

Constructor & Destructor Documentation

◆ G4PhysicsListWorkspace()

G4PhysicsListWorkspace::G4PhysicsListWorkspace ( G4bool  verbose = false)

Definition at line 38 of file G4PhysicsListWorkspace.cc.

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

◆ ~G4PhysicsListWorkspace()

G4PhysicsListWorkspace::~G4PhysicsListWorkspace ( )

Definition at line 57 of file G4PhysicsListWorkspace.cc.

57{}

Member Function Documentation

◆ DestroyWorkspace()

void G4PhysicsListWorkspace::DestroyWorkspace ( )

Definition at line 107 of file G4PhysicsListWorkspace.cc.

108{
109 fpVUPLSIM->FreeWorker();
110 fpVPCSIM->FreeWorker();
111 fpVMPLSIM->FreeWorker();
112}

◆ GetPool()

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

◆ GetVerbose()

G4bool G4PhysicsListWorkspace::GetVerbose ( )
inline

Definition at line 70 of file G4PhysicsListWorkspace.hh.

70{ return fVerbose; }

◆ InitialisePhysicsList()

void G4PhysicsListWorkspace::InitialisePhysicsList ( )
protected

Definition at line 82 of file G4PhysicsListWorkspace.cc.

82{}

Referenced by InitialiseWorkspace().

◆ InitialiseWorkspace()

void G4PhysicsListWorkspace::InitialiseWorkspace ( )

Definition at line 84 of file G4PhysicsListWorkspace.cc.

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

Referenced by G4PhysicsListWorkspace().

◆ ReleaseWorkspace()

void G4PhysicsListWorkspace::ReleaseWorkspace ( )

Definition at line 75 of file G4PhysicsListWorkspace.cc.

76{
77 fpVUPLSIM->UseWorkArea(0);
78 fpVPCSIM->UseWorkArea(0);
79 fpVMPLSIM->UseWorkArea(0);
80}
void UseWorkArea(T *newOffset)

◆ SetVerbose()

void G4PhysicsListWorkspace::SetVerbose ( G4bool  v)
inline

Definition at line 69 of file G4PhysicsListWorkspace.hh.

69{ fVerbose = v; }

◆ UseWorkspace()

void G4PhysicsListWorkspace::UseWorkspace ( )

Definition at line 59 of file G4PhysicsListWorkspace.cc.

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

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