Import Geant4 11.4.0 source tree
This commit is contained in:
@@ -27,20 +27,19 @@
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Manages the per-thread state of solids - those which
|
||||
// have a per-thread state and dependent classes (if any)
|
||||
// In particular it
|
||||
// - owns the arrays that implement 'split' classes
|
||||
// - classes/objects which are owned by the split classes.
|
||||
// Background: the classes/objects affected are
|
||||
// - 'split' classes part of its state is per-thread,
|
||||
// - per-thread objects, in particular those which are owned
|
||||
// by the split classes.
|
||||
// Manages the per-thread state of solids - those which have a per-thread
|
||||
// state and dependent classes (if any)
|
||||
// In particular it owns:
|
||||
// - the arrays that implement 'split' classes
|
||||
// - classes/objects which are owned by the split classes.
|
||||
// Background: the classes/objects affected are:
|
||||
// - 'split' classes part of its state is per-thread,
|
||||
// - per-thread objects, in particular those which are owned by split classes.
|
||||
// Goal: Take ownership and control of per-thread state of
|
||||
// classes to work with multi-threading.
|
||||
// Offshoot of G4GeometryWorkspace, to deal with Solids.
|
||||
|
||||
// 4.10.2013 - Created: John Apostolakis, Andrea Dotti
|
||||
// Authors: John Apostolakis, Andrea Dotti (CERN), 04.10.2013 - Created
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4SOLIDSWORKSPACE_HH
|
||||
#define G4SOLIDSWORKSPACE_HH
|
||||
@@ -51,43 +50,71 @@
|
||||
#include "G4PolyconeSide.hh"
|
||||
#include "G4PolyhedraSide.hh"
|
||||
|
||||
/**
|
||||
* @brief G4SolidsWorkspace manages the per-thread state of thoese solids
|
||||
* which have a per-thread state and dependent classes (if any). It takes
|
||||
* ownership and control of per-thread state of classes to work with
|
||||
* multi-threading.
|
||||
*/
|
||||
|
||||
class G4SolidsWorkspace
|
||||
{
|
||||
public:
|
||||
|
||||
using pool_type = G4TWorkspacePool<G4SolidsWorkspace>;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param[in] verbose Verbosity flag.
|
||||
*/
|
||||
G4SolidsWorkspace(G4bool verbose = false);
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
~G4SolidsWorkspace() = default;
|
||||
|
||||
/**
|
||||
* Methods to achieve/release ownership.
|
||||
*/
|
||||
void UseWorkspace(); // Take ownership
|
||||
void ReleaseWorkspace(); // Release ownership
|
||||
void DestroyWorkspace(); // Release ownership and destroy
|
||||
|
||||
/**
|
||||
* Method to be called at start of each run (especially at the
|
||||
* 2nd and further runs).
|
||||
*/
|
||||
void InitialiseWorkspace();
|
||||
// To be called at start of each run (especially 2nd and further runs)
|
||||
|
||||
/**
|
||||
* Accessor/modifier for verbosity.
|
||||
*/
|
||||
inline void SetVerbose(G4bool v) { fVerbose=v; }
|
||||
inline G4bool GetVerbose() { return fVerbose; }
|
||||
|
||||
/**
|
||||
* Accessor to the object pool.
|
||||
*/
|
||||
static pool_type* GetPool();
|
||||
|
||||
protected:
|
||||
private:
|
||||
|
||||
/**
|
||||
* Does nothing.
|
||||
*/
|
||||
void InitialiseSolids();
|
||||
|
||||
private:
|
||||
|
||||
// Helper pointers - can be per instance or shared
|
||||
//
|
||||
/** Helper pointers - can be per instance or shared. */
|
||||
G4PlSideManager* fpPolyconeSideSIM = nullptr;
|
||||
G4PhSideManager* fpPolyhedraSideSIM = nullptr;
|
||||
|
||||
// Per Instance variables
|
||||
// NOTE: the ownership of the Data Arrays is IN this object
|
||||
|
||||
// Store SubInstanceManager object pointers (SIM pointers)
|
||||
//
|
||||
/** Store SubInstanceManager object pointers (SIM pointers). */
|
||||
G4PlSideData* fPolyconeSideOffset = nullptr;
|
||||
G4PhSideData* fPolyhedraSideOffset = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user