Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4NeutronHPFieldPoint Class Reference

#include <G4NeutronHPFieldPoint.hh>

Public Member Functions

 G4NeutronHPFieldPoint ()
 
 G4NeutronHPFieldPoint (G4int n)
 
void operator= (const G4NeutronHPFieldPoint &aSet)
 
 ~G4NeutronHPFieldPoint ()
 
void InitY (G4int n)
 
G4int GetDepth () const
 
G4double GetX () const
 
G4double GetY (G4int i) const
 
void SetX (G4double e)
 
void SetY (G4int i, G4double x)
 
void SetData (G4double e, G4int i, G4double x)
 

Detailed Description

Definition at line 33 of file G4NeutronHPFieldPoint.hh.

Constructor & Destructor Documentation

G4NeutronHPFieldPoint::G4NeutronHPFieldPoint ( )
inline

Definition at line 37 of file G4NeutronHPFieldPoint.hh.

38  {
39  X = 0;
40  nP = 0;
41  Y = 0;
42  }
G4NeutronHPFieldPoint::G4NeutronHPFieldPoint ( G4int  n)

Definition at line 33 of file G4NeutronHPFieldPoint.cc.

References n.

34  {
35  nP = n;
36  X = 0;
37  Y = new G4double[nP];
38  for (G4int i=0; i<nP; i++) Y[i]=0.;
39  }
int G4int
Definition: G4Types.hh:78
const G4int n
double G4double
Definition: G4Types.hh:76
G4NeutronHPFieldPoint::~G4NeutronHPFieldPoint ( )

Definition at line 52 of file G4NeutronHPFieldPoint.cc.

53  {
54  delete [] Y;
55  }

Member Function Documentation

G4int G4NeutronHPFieldPoint::GetDepth ( ) const
inline

Definition at line 52 of file G4NeutronHPFieldPoint.hh.

Referenced by G4NeutronHPField::Dump(), and operator=().

52 {return nP;}
G4double G4NeutronHPFieldPoint::GetX ( ) const
inline
G4double G4NeutronHPFieldPoint::GetY ( G4int  i) const
inline

Definition at line 54 of file G4NeutronHPFieldPoint.hh.

Referenced by G4NeutronHPField::Dump(), G4NeutronHPField::GetY(), and operator=().

54 {return Y[i];}
void G4NeutronHPFieldPoint::InitY ( G4int  n)

Definition at line 57 of file G4NeutronHPFieldPoint.cc.

References n.

Referenced by G4NeutronHPField::InitY().

58  {
59  nP = n;
60  X=0;
61  Y = new G4double[nP];
62  for (G4int i=0; i<nP; i++) Y[i]=0.;
63  }
int G4int
Definition: G4Types.hh:78
const G4int n
double G4double
Definition: G4Types.hh:76
void G4NeutronHPFieldPoint::operator= ( const G4NeutronHPFieldPoint aSet)

Definition at line 41 of file G4NeutronHPFieldPoint.cc.

References GetDepth(), GetX(), and GetY().

42  {
43  if(&aSet!=this)
44  {
45  X = aSet.GetX();
46  delete [] Y;
47  Y = new G4double[aSet.GetDepth()];
48  for(G4int i=0; i<aSet.GetDepth(); i++) Y[i] = aSet.GetY(i);
49  }
50  }
G4double GetY(G4int i) const
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76
void G4NeutronHPFieldPoint::SetData ( G4double  e,
G4int  i,
G4double  x 
)
inline

Definition at line 59 of file G4NeutronHPFieldPoint.hh.

References test::x.

Referenced by G4NeutronHPField::G4NeutronHPField(), and G4NeutronHPField::SetData().

59 {X = e; Y[i] = x;}
void G4NeutronHPFieldPoint::SetX ( G4double  e)
inline

Definition at line 56 of file G4NeutronHPFieldPoint.hh.

Referenced by G4NeutronHPField::SetEnergy(), and G4NeutronHPField::SetX().

56 {X = e;}
void G4NeutronHPFieldPoint::SetY ( G4int  i,
G4double  x 
)
inline

Definition at line 57 of file G4NeutronHPFieldPoint.hh.

References test::x.

Referenced by G4NeutronHPField::SetY().

57 {Y[i] = x;}

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