43#ifndef G4TWORKSPACEPOOL_HH
44#define G4TWORKSPACEPOOL_HH 1
68 inline void Recycle(T* myWrkSpace);
93 if(fMyWorkspace ==
nullptr)
98 G4Exception(
"G4TWorspacePool<someType>::CreateWorkspace()",
"MemoryError",
108 G4Exception(
"ParticlesWorspacePool::CreateWorkspace()",
"InvalidCondition",
110 "Cannot create workspace twice for the same thread.");
119 (this->CreateWorkspace())->UseWorkspace();
125 T* wrk = fMyWorkspace;
128 wrk = this->CreateWorkspace();
139 myWrkSpace->ReleaseWorkspace();
146 if(fMyWorkspace !=
nullptr)
148 fMyWorkspace->DestroyWorkspace();
150 fMyWorkspace =
nullptr;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void CreateAndUseWorkspace()
void CleanUpAndDestroyAllWorkspaces()
void Recycle(T *myWrkSpace)
T * FindOrCreateWorkspace()