|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4NavigationHistoryPool is a thread-local pool for navigation history levels collections being allocated by G4NavigationHistory. It allows for reuse of the vectors allocated according to lifetime of G4NavigationHistory objects. More...
#include <G4NavigationHistoryPool.hh>
Public Member Functions | |
| ~G4NavigationHistoryPool () | |
| std::vector< G4NavigationLevel > * | GetNewLevels () |
| std::vector< G4NavigationLevel > * | GetLevels () |
| void | DeRegister (std::vector< G4NavigationLevel > *pLevels) |
| void | Clean () |
| void | Print () const |
Static Public Member Functions | |
| static G4NavigationHistoryPool * | GetInstance () |
G4NavigationHistoryPool is a thread-local pool for navigation history levels collections being allocated by G4NavigationHistory. It allows for reuse of the vectors allocated according to lifetime of G4NavigationHistory objects.
Definition at line 50 of file G4NavigationHistoryPool.hh.
| G4NavigationHistoryPool::~G4NavigationHistoryPool | ( | ) |
Destructor: takes care to delete the allocated levels.
Definition at line 57 of file G4NavigationHistoryPool.cc.
| void G4NavigationHistoryPool::Clean | ( | ) |
Deletes all levels stored in the pool.
Definition at line 66 of file G4NavigationHistoryPool.cc.
Referenced by ~G4NavigationHistoryPool().
|
inline |
Deactivates the levels collection in pool.
Definition at line 129 of file G4NavigationHistoryPool.hh.
Referenced by G4NavigationHistory::~G4NavigationHistory().
|
static |
Returns the unique instance of G4NavigationHistoryPool.
Definition at line 108 of file G4NavigationHistoryPool.cc.
Referenced by G4NavigationHistory::G4NavigationHistory(), G4NavigationHistory::G4NavigationHistory(), G4NavigationHistory::~G4NavigationHistory(), and G4RunManagerKernel::~G4RunManagerKernel().
|
inline |
Returns the pointer of the first available collection of levels If none are available (i.e. empty free vector) allocates the collection.
Definition at line 152 of file G4NavigationHistoryPool.hh.
Referenced by G4NavigationHistory::G4NavigationHistory(), and G4NavigationHistory::G4NavigationHistory().
|
inline |
Returns the pointer to a new collection of levels being allocated.
Definition at line 139 of file G4NavigationHistoryPool.hh.
Referenced by GetLevels().
| void G4NavigationHistoryPool::Print | ( | ) | const |
Prints the number of entries.
Definition at line 80 of file G4NavigationHistoryPool.cc.
Referenced by G4RunManagerKernel::~G4RunManagerKernel().