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

#include <G4ParticlesWorkspace.hh>

Public Types

using pool_type = G4TWorkspacePool<G4ParticlesWorkspace>
 

Public Member Functions

 G4ParticlesWorkspace (G4bool verbose=false)
 
 ~G4ParticlesWorkspace ()=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 InitialiseParticles ()
 

Detailed Description

Definition at line 49 of file G4ParticlesWorkspace.hh.

Member Typedef Documentation

◆ pool_type

Constructor & Destructor Documentation

◆ G4ParticlesWorkspace()

G4ParticlesWorkspace::G4ParticlesWorkspace ( G4bool verbose = false)

Definition at line 43 of file G4ParticlesWorkspace.cc.

43 : fVerbose(verbose)
44{
46
47 // Copy information from master in this thread.
49
50 // Capture its address of ParticleDefinition split-class in this thread
51 fpPDefOffset = fpPDefSIM->GetOffset();
52}
G4PDefData * GetOffset()
static const G4PDefManager & GetSubInstanceManager()

◆ ~G4ParticlesWorkspace()

G4ParticlesWorkspace::~G4ParticlesWorkspace ( )
default

Member Function Documentation

◆ DestroyWorkspace()

void G4ParticlesWorkspace::DestroyWorkspace ( )

Definition at line 93 of file G4ParticlesWorkspace.cc.

94{
95 fpPDefSIM->FreeSlave();
96}

◆ GetPool()

G4ParticlesWorkspace::pool_type * G4ParticlesWorkspace::GetPool ( )
static

Definition at line 38 of file G4ParticlesWorkspace.cc.

39{
40 return &thePool;
41}

Referenced by G4WorkerThread::BuildGeometryAndPhysicsVector(), and G4WorkerThread::DestroyGeometryAndPhysicsVector().

◆ GetVerbose()

G4bool G4ParticlesWorkspace::GetVerbose ( )
inline

Definition at line 70 of file G4ParticlesWorkspace.hh.

70{ return fVerbose; }

◆ InitialiseParticles()

void G4ParticlesWorkspace::InitialiseParticles ( )
protected

Definition at line 70 of file G4ParticlesWorkspace.cc.

70{}

Referenced by InitialiseWorkspace().

◆ InitialiseWorkspace()

void G4ParticlesWorkspace::InitialiseWorkspace ( )

Definition at line 72 of file G4ParticlesWorkspace.cc.

73{
74 if (fVerbose) {
75 G4cout << "G4ParticlesWorkspace::InitialiseWorkspace: "
76 << "Copying particles-definition Split-Class - Start " << G4endl;
77 }
78
79 // Particles related, split classes mechanism:
80 // Do *NOT* instantiate sub-instance for this thread,
81 // just copy the contents !!
82 fpPDefSIM->NewSubInstances();
83
84 // Additional initialization if needed - beyond copying memory
86
87 if (fVerbose) {
88 G4cout << "G4ParticlesWorkspace::CreateAndUseWorkspace: "
89 << "Copying particles-definition Split-Class - Done!" << G4endl;
90 }
91}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
void NewSubInstances()

Referenced by G4ParticlesWorkspace().

◆ ReleaseWorkspace()

void G4ParticlesWorkspace::ReleaseWorkspace ( )

Definition at line 65 of file G4ParticlesWorkspace.cc.

66{
67 fpPDefSIM->UseWorkArea(nullptr);
68}
void UseWorkArea(G4PDefData *newOffset)

◆ SetVerbose()

void G4ParticlesWorkspace::SetVerbose ( G4bool v)
inline

Definition at line 69 of file G4ParticlesWorkspace.hh.

69{ fVerbose = v; }

◆ UseWorkspace()

void G4ParticlesWorkspace::UseWorkspace ( )

Definition at line 54 of file G4ParticlesWorkspace.cc.

55{
56 if (fVerbose) {
57 G4cout << "G4ParticlesWorkspace::UseWorkspace: "
58 << "Copying particles-definition Split-Class - Start " << G4endl;
59 }
60
61 // Split classes mechanism: instantiate sub-instance for this thread
62 fpPDefSIM->UseWorkArea(fpPDefOffset);
63}

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