|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4BlockingList is an utility class responsible for (efficiently) maintaining a list of blocked volume numbers, with rapid 'reset' operations. More...
#include <G4BlockingList.hh>
Public Member Functions | |
| G4BlockingList (G4int maxDefault=kBlockingListMaxDefault, G4int stride=kBlockingListStride) | |
| ~G4BlockingList ()=default | |
| void | Reset () |
| void | FullyReset () |
| void | Enlarge (const G4int nv) |
| std::size_t | Length () const |
| void | BlockVolume (const G4int v) |
| G4bool | IsBlocked (const G4int v) const |
G4BlockingList is an utility class responsible for (efficiently) maintaining a list of blocked volume numbers, with rapid 'reset' operations.
Definition at line 58 of file G4BlockingList.hh.
| G4BlockingList::G4BlockingList | ( | G4int | maxDefault = kBlockingListMaxDefault, |
| G4int | stride = kBlockingListStride ) |
Constructor for G4BlockingList. Creates empty blocking list of default size and 'stride' resize count.
| [in] | maxDefault | Maximum list size. |
| [in] | stride | Stride resize count. |
Definition at line 33 of file G4BlockingList.cc.
|
default |
Default Destructor.
|
inline |
Blocks the volume number 'v'. Requires: 0<=v<Length().
|
inline |
Enlarges the blocking list if current size less than 'nv', in units of stride. Clears the new part of the list.
| void G4BlockingList::FullyReset | ( | ) |
Clears the blocking list and resets the tag value [slow].
Definition at line 40 of file G4BlockingList.cc.
Returns true if the volume number 'v' is blocked, else false. Requires: 0 <= v < Length().
|
inline |
Returns the current length of the list. A length of 16 means volumes of indices between 0 & 15 inclusive may be blocked.
|
inline |
Efficiently resets the blocking list, so that no volumes are blocked. Advances tag number and only fully clears the list if tag max is reached.