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

#include <G4NeutronHPList.hh>

Public Member Functions

 G4NeutronHPList ()
 
 ~G4NeutronHPList ()
 
void SetValue (G4int i, G4double y)
 
G4double GetValue (G4int i)
 
G4int GetListLength ()
 
void Dump ()
 
void Init (std::istream &aDataFile, G4int nPar, G4double unit=1.)
 
void Init (std::istream &aDataFile, G4double unit=1.)
 
void SetLabel (G4double aLabel)
 
G4double GetLabel ()
 

Detailed Description

Definition at line 34 of file G4NeutronHPList.hh.

Constructor & Destructor Documentation

G4NeutronHPList::G4NeutronHPList ( )
inline

Definition at line 38 of file G4NeutronHPList.hh.

39  {
40  theData = new G4double[2];
41  nPoints=2;
42  nEntries=0;
43  }
double G4double
Definition: G4Types.hh:76
G4NeutronHPList::~G4NeutronHPList ( )
inline

Definition at line 45 of file G4NeutronHPList.hh.

46  {
47  delete [] theData;
48  }

Member Function Documentation

void G4NeutronHPList::Dump ( )
G4double G4NeutronHPList::GetLabel ( )
inline

Definition at line 67 of file G4NeutronHPList.hh.

Referenced by G4NeutronHPContAngularPar::Merge(), and G4NeutronHPContAngularPar::Sample().

67 { return theLabel; }
G4int G4NeutronHPList::GetListLength ( )
inline

Definition at line 57 of file G4NeutronHPList.hh.

Referenced by GetValue().

57 {return nEntries;}
G4double G4NeutronHPList::GetValue ( G4int  i)

Definition at line 74 of file G4NeutronHPList.cc.

References GetListLength().

Referenced by Lesson1Wx.Counter::Adjusted(), Lesson2Wx.Counter::Adjusted(), G4NeutronHPNeutronYield::GetDecayConstant(), G4NeutronHPContAngularPar::Merge(), and G4NeutronHPContAngularPar::Sample().

75  {
76 // G4cout << "TestList "<<i<<" "<<nEntries<<G4endl;
77  if(nEntries<0)
78  {
79 // G4cout <<nPoints<<" "<<nEntries<<" "<<theData<<G4endl;
80 // for(G4int ii=0; ii<2; ii++) G4cout << theData[ii]<<" ";
81 // G4cout << G4endl;
82  }
83  if (i<0) i=0;
84  if(i>=GetListLength()) i=GetListLength()-1;
85  return theData[i];
86  }
void G4NeutronHPList::Init ( std::istream &  aDataFile,
G4int  nPar,
G4double  unit = 1. 
)

Definition at line 51 of file G4NeutronHPList.cc.

References SetValue().

Referenced by G4NeutronHPContAngularPar::Init(), and G4NeutronHPNeutronYield::InitDelayed().

52  {
53  G4int i;
54  G4double y;
55  for (i=0; i<nPar; i++)
56  {
57  aDataFile >> y;
58  SetValue(i,y*unit);
59  }
60  }
void SetValue(G4int i, G4double y)
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76
void G4NeutronHPList::Init ( std::istream &  aDataFile,
G4double  unit = 1. 
)

Definition at line 62 of file G4NeutronHPList.cc.

References SetValue(), and G4INCL::CrossSections::total().

63  {
64  G4int total, i;
65  aDataFile >> total;
66  G4double y;
67  for (i=0;i<total;i++)
68  {
69  aDataFile >>y;
70  SetValue(i,y*unit);
71  }
72  }
void SetValue(G4int i, G4double y)
int G4int
Definition: G4Types.hh:78
G4double total(Particle const *const p1, Particle const *const p2)
double G4double
Definition: G4Types.hh:76
void G4NeutronHPList::SetLabel ( G4double  aLabel)
inline
void G4NeutronHPList::SetValue ( G4int  i,
G4double  y 
)
inline

Definition at line 50 of file G4NeutronHPList.hh.

Referenced by Lesson1Wx.Counter::__init__(), Lesson2Wx.Counter::__init__(), Init(), and G4NeutronHPContAngularPar::Merge().

51  {
52  Check(i);
53  theData[i]=y;
54  }

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