BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Friends
BDSArray2D Class Reference

2D array. More...

#include <BDSArray2D.hh>

Inheritance diagram for BDSArray2D:
Inheritance graph
Collaboration diagram for BDSArray2D:
Collaboration graph

Public Member Functions

 BDSArray2D (G4int nXIn, G4int nYIn)
 
- Public Member Functions inherited from BDSArray3D
 BDSArray3D ()=delete
 
 BDSArray3D (G4int nX, G4int nY, G4int nZ)
 
- Public Member Functions inherited from BDSArray4D
 BDSArray4D ()=delete
 
 BDSArray4D (G4int nXIn, G4int nYIn, G4int nZIn, G4int nTIn)
 
virtual BDSFieldValueoperator() (G4int x, G4int y=0, G4int z=0, G4int t=0)
 Setter & (technically, a non-const) accessor.
 
const BDSFieldValueoperator() (BDSFourVector< G4int > &pos)
 Convenience accessor to operator().
 
virtual const BDSFieldValueGetConst (G4int x, G4int y=0, G4int z=0, G4int t=0) const
 
virtual const BDSFieldValueoperator() (G4int x, G4int y=0, G4int z=0, G4int t=0) const
 Convenience shortcut to GetConst().
 
const BDSFieldValueoperator() (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

- Protected Attributes inherited from BDSArray4D
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.
 

Detailed Description

2D array.

Inherits (ie is a type of) BDSArray3D and in turn BDSArray4D.

Author
Laurie Nevay

Definition at line 36 of file BDSArray2D.hh.

Constructor & Destructor Documentation

◆ BDSArray2D() [1/2]

BDSArray2D::BDSArray2D ( G4int  nXIn,
G4int  nYIn 
)

Definition at line 25 of file BDSArray2D.cc.

◆ ~BDSArray2D()

virtual BDSArray2D::~BDSArray2D ( )
inlinevirtual

Definition at line 40 of file BDSArray2D.hh.

◆ BDSArray2D() [2/2]

BDSArray2D::BDSArray2D ( )
privatedelete

No default constructor as the array is not adjustable after construction and therefore the size must be known at construction time.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
BDSArray2D const &  a 
)
friend

Output stream.

Definition at line 29 of file BDSArray2D.cc.


The documentation for this class was generated from the following files: