43#ifndef G4TWORKSPACEPOOL_HH
44#define G4TWORKSPACEPOOL_HH 1
93 if(fMyWorkspace ==
nullptr)
98 G4Exception(
"G4TWorspacePool<someType>::CreateWorkspace()",
"MemoryError",
108 G4Exception(
"ParticlesWorspacePool::CreateWorkspace()",
"InvalidCondition",
110 "Cannot create workspace twice for the same thread.");
125 T* wrk = fMyWorkspace;
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)
G4ThreadLocal T * G4TWorkspacePool< T >::fMyWorkspace
void CreateAndUseWorkspace()
void CleanUpAndDestroyAllWorkspaces()
void Recycle(T *myWrkSpace)
T * FindOrCreateWorkspace()