BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
2D array. More...
#include <BDSArray2D.hh>
Public Member Functions | |
BDSArray2D (G4int nXIn, G4int nYIn) | |
![]() | |
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. | |
Private Member Functions | |
BDSArray2D ()=delete | |
Friends | |
std::ostream & | operator<< (std::ostream &out, BDSArray2D 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. | |
2D array.
Inherits (ie is a type of) BDSArray3D and in turn BDSArray4D.
Definition at line 36 of file BDSArray2D.hh.
BDSArray2D::BDSArray2D | ( | G4int | nXIn, |
G4int | nYIn | ||
) |
Definition at line 25 of file BDSArray2D.cc.
|
inlinevirtual |
Definition at line 40 of file BDSArray2D.hh.
|
privatedelete |
No default constructor as the array is not adjustable after construction and therefore the size must be known at construction time.
|
friend |
Output stream.
Definition at line 29 of file BDSArray2D.cc.