Geant4-11
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
G4ParticlesWorkspace Class Reference

#include <G4ParticlesWorkspace.hh>

Public Types

using pool_type = G4TWorkspacePool< G4ParticlesWorkspace >
 

Public Member Functions

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

Static Public Member Functions

static pool_typeGetPool ()
 

Protected Member Functions

void InitialiseParticles ()
 

Private Attributes

G4PDefDatafpPDefOffset = nullptr
 
G4PDefManagerfpPDefSIM = nullptr
 
G4bool fVerbose = false
 

Detailed Description

Definition at line 50 of file G4ParticlesWorkspace.hh.

Member Typedef Documentation

◆ pool_type

Definition at line 54 of file G4ParticlesWorkspace.hh.

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
54}
G4PDefData * GetOffset()
static const G4PDefManager & GetSubInstanceManager()

References fpPDefOffset, fpPDefSIM, G4PDefManager::GetOffset(), G4ParticleDefinition::GetSubInstanceManager(), and InitialiseWorkspace().

◆ ~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{
108}

References fpPDefSIM, and G4PDefManager::FreeSlave().

◆ GetPool()

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

◆ GetVerbose()

G4bool G4ParticlesWorkspace::GetVerbose ( )
inline

Definition at line 67 of file G4ParticlesWorkspace.hh.

67{ return fVerbose; }

References 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 !!
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()

References fpPDefSIM, fVerbose, G4cout, G4endl, InitialiseParticles(), and G4PDefManager::NewSubInstances().

Referenced by G4ParticlesWorkspace().

◆ ReleaseWorkspace()

void G4ParticlesWorkspace::ReleaseWorkspace ( )

Definition at line 72 of file G4ParticlesWorkspace.cc.

73{
75}
void UseWorkArea(G4PDefData *newOffset)

References fpPDefSIM, and G4PDefManager::UseWorkArea().

◆ SetVerbose()

void G4ParticlesWorkspace::SetVerbose ( G4bool  v)
inline

Definition at line 66 of file G4ParticlesWorkspace.hh.

66{ fVerbose=v; }

References fVerbose.

◆ 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
70}

References fpPDefOffset, fpPDefSIM, fVerbose, G4cout, G4endl, and G4PDefManager::UseWorkArea().

Field Documentation

◆ fpPDefOffset

G4PDefData* G4ParticlesWorkspace::fpPDefOffset = nullptr
private

Definition at line 83 of file G4ParticlesWorkspace.hh.

Referenced by G4ParticlesWorkspace(), and UseWorkspace().

◆ fpPDefSIM

G4PDefManager* G4ParticlesWorkspace::fpPDefSIM = nullptr
private

◆ fVerbose

G4bool G4ParticlesWorkspace::fVerbose = false
private

Definition at line 86 of file G4ParticlesWorkspace.hh.

Referenced by GetVerbose(), InitialiseWorkspace(), SetVerbose(), and UseWorkspace().


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