BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
3D array class. More...
#include <BDSArray3D.hh>
Public Member Functions | |
BDSArray3D ()=delete | |
BDSArray3D (G4int nX, G4int nY, G4int nZ) | |
![]() | |
BDSArray4D ()=delete | |
BDSArray4D (G4int nXIn, G4int nYIn, G4int nZIn, G4int nTIn) | |
virtual BDSFieldValue & | operator() (G4int x, G4int y=0, G4int z=0, G4int t=0) |
Setter & (technically, a non-const) accessor. | |
const BDSFieldValue & | operator() (BDSFourVector< G4int > &pos) |
Convenience accessor to operator(). | |
virtual const BDSFieldValue & | GetConst (G4int x, G4int y=0, G4int z=0, G4int t=0) const |
virtual const BDSFieldValue & | operator() (G4int x, G4int y=0, G4int z=0, G4int t=0) const |
Convenience shortcut to GetConst(). | |
const BDSFieldValue & | operator() (const BDSFourVector< G4int > &pos) const |
Convenience accessor to operator(). | |
virtual G4bool | Outside (G4int x, G4int y, G4int z, G4int t) const |
Return whether the indices are valid and lie within the array boundaries or not. | |
virtual void | OutsideWarn (G4int x, G4int y, G4int z, G4int t) const |
Use Outside() but warn and exit if the coordinates requested are outside the array. | |
virtual std::ostream & | Print (std::ostream &out) const |
G4int | NX () const |
Access the number of elements in a given dimension. | |
G4int | NY () const |
Access the number of elements in a given dimension. | |
G4int | NZ () const |
Access the number of elements in a given dimension. | |
G4int | NT () const |
Access the number of elements in a given dimension. | |
BDSFourVector< G4int > | NXYZT () const |
Access the number of elements in a given dimension. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, BDSArray3D const &a) |
Output stream. | |
Additional Inherited Members | |
![]() | |
BDSFieldValue | defaultValue |
Need to store a default value so it can be return by reference. | |
const G4int | nX |
Dimension. | |
const G4int | nY |
Dimension. | |
const G4int | nZ |
Dimension. | |
const G4int | nT |
Dimension. | |
3D array class.
All functionality is provided through BDSArray4D. A 3D array is a subset of a 4D array.
Definition at line 37 of file BDSArray3D.hh.
|
delete |
No default constructor as the array is not adjustable after construction and therefore the size must be known at construction time.
BDSArray3D::BDSArray3D | ( | G4int | nX, |
G4int | nY, | ||
G4int | nZ | ||
) |
Definition at line 25 of file BDSArray3D.cc.
|
inlinevirtual |
Definition at line 44 of file BDSArray3D.hh.
|
friend |
Output stream.
Definition at line 29 of file BDSArray3D.cc.