Geant4 10.7.0
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 ()
 
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 50 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.

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

◆ ~G4ParticlesWorkspace()

G4ParticlesWorkspace::~G4ParticlesWorkspace ( )

Definition at line 56 of file G4ParticlesWorkspace.cc.

57{
58}

Member Function Documentation

◆ DestroyWorkspace()

void G4ParticlesWorkspace::DestroyWorkspace ( )

Definition at line 105 of file G4ParticlesWorkspace.cc.

106{
107 fpPDefSIM->FreeSlave();
108}

◆ 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 67 of file G4ParticlesWorkspace.hh.

67{ return fVerbose; }

◆ InitialiseParticles()

void G4ParticlesWorkspace::InitialiseParticles ( )
protected

Definition at line 77 of file G4ParticlesWorkspace.cc.

78{
79}

Referenced by InitialiseWorkspace().

◆ InitialiseWorkspace()

void G4ParticlesWorkspace::InitialiseWorkspace ( )

Definition at line 82 of file G4ParticlesWorkspace.cc.

83{
84 if( fVerbose )
85 {
86 G4cout << "G4ParticlesWorkspace::InitialiseWorkspace: "
87 << "Copying particles-definition Split-Class - Start " << G4endl;
88 }
89
90 // Particles related, split classes mechanism:
91 // Do *NOT* instantiate sub-instance for this thread,
92 // just copy the contents !!
93 fpPDefSIM->NewSubInstances();
94
95 // Additional initialization if needed - beyond copying memory
97
98 if( fVerbose )
99 {
100 G4cout << "G4ParticlesWorkspace::CreateAndUseWorkspace: "
101 << "Copying particles-definition Split-Class - Done!" << G4endl;
102 }
103}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void NewSubInstances()

Referenced by G4ParticlesWorkspace().

◆ ReleaseWorkspace()

void G4ParticlesWorkspace::ReleaseWorkspace ( )

Definition at line 72 of file G4ParticlesWorkspace.cc.

73{
74 fpPDefSIM->UseWorkArea(0);
75}
void UseWorkArea(G4PDefData *newOffset)

◆ SetVerbose()

void G4ParticlesWorkspace::SetVerbose ( G4bool  v)
inline

Definition at line 66 of file G4ParticlesWorkspace.hh.

66{ fVerbose=v; }

◆ UseWorkspace()

void G4ParticlesWorkspace::UseWorkspace ( )

Definition at line 60 of file G4ParticlesWorkspace.cc.

61{
62 if( fVerbose )
63 {
64 G4cout << "G4ParticlesWorkspace::UseWorkspace: "
65 << "Copying particles-definition Split-Class - Start " << G4endl;
66 }
67
68 // Split classes mechanism: instantiate sub-instance for this thread
69 fpPDefSIM->UseWorkArea(fpPDefOffset);
70}

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