Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -27,16 +27,16 @@
//
// Class description:
//
// Class managing the per-thread state of particles, those which
// Class managing the per-thread state of particles, those which
// have a per-thread state and dependent classes (if any).
// In particular, it owns the arrays that implement 'split' classes
// In particular, it owns the arrays that implement 'split' classes
// and classes/objects which are owned by the split classes.
// The classes/objects affected are
// The classes/objects affected are
// - 'split' classes part of its state is per-thread,
// - per-thread objects, in particular those which are owned
// - per-thread objects, in particular those which are owned
// by the split classes.
// Goal: Take ownership and control of per-thread state of classes
// to work with multi-threading.
// to work with multi-threading.
// Authors: J.Apostolakis & A.Dotti, 4 October 2013
// --------------------------------------------------------------------
@@ -44,44 +44,45 @@
#define G4PARTICLESWORKSPACE_HH
#include "G4ParticleDefinition.hh"
#include "G4TWorkspacePool.hh"
class G4ParticlesWorkspace
{
public:
using pool_type = G4TWorkspacePool<G4ParticlesWorkspace>;
G4ParticlesWorkspace(G4bool verbose=false);
G4ParticlesWorkspace(G4bool verbose = false);
~G4ParticlesWorkspace() = default;
void UseWorkspace(); // Take ownership
void ReleaseWorkspace(); // Release ownership
void DestroyWorkspace(); // Release ownership and destroy
// Take ownership
void UseWorkspace();
// Release ownership
void ReleaseWorkspace();
// Release ownership and destroy
void DestroyWorkspace();
// To be called at start of each run (especially 2nd and further runs)
void InitialiseWorkspace();
// To be called at start of each run (especially 2nd and further runs)
void SetVerbose(G4bool v) { fVerbose=v; }
G4bool GetVerbose() { return fVerbose; }
void SetVerbose(G4bool v) { fVerbose = v; }
G4bool GetVerbose() { return fVerbose; }
static pool_type* GetPool();
protected: // Implementation methods
void InitialiseParticles();
private:
// Helper pointer - can be per instance or shared
G4PDefManager* fpPDefSIM = nullptr;
// Helper pointer - can be per instance or shared
// Per Instance variables
// NOTE: the ownership of the Data Arrays is IN this object
// Store SubInstanceManager object pointers (SIM pointers)
G4PDefData* fpPDefOffset = nullptr;
// Store SubInstanceManager object pointers (SIM pointers)
G4bool fVerbose = false;
};