Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ENDFTapeRead Class Reference

#include <G4ENDFTapeRead.hh>

Public Member Functions

 G4ENDFTapeRead (G4String FileLocation, G4String FileName, G4FFGEnumerations::YieldType WhichYield, G4FFGEnumerations::FissionCause WhichCause)
 
 G4ENDFTapeRead (G4String FileLocation, G4String FileName, G4FFGEnumerations::YieldType WhichYield, G4FFGEnumerations::FissionCause WhichCause, G4int Verbosity)
 
 G4ENDFTapeRead (std::istringstream &dataStream, G4FFGEnumerations::YieldType WhichYield, G4FFGEnumerations::FissionCause WhichCause, G4int Verbosity)
 
G4doubleG4GetEnergyGroupValues (void)
 
G4int G4GetNumberOfEnergyGroups (void)
 
G4int G4GetNumberOfFissionProducts (void)
 
G4ENDFYieldDataContainerG4GetYield (G4int WhichYield)
 
void G4SetVerbosity (G4int WhatVerbosity)
 
 ~G4ENDFTapeRead (void)
 

Protected Member Functions

void Initialize (G4String dataFile)
 
void Initialize (std::istringstream &dataStream)
 

Detailed Description

G4ENDFTapeRead is a class designed to read in data from unformatted ENDF data tapes for MT = 454 or MT = 459, which correspond to independent fission yields and cumulative fission yields, respectively. The data is stored internally and can be recalled one product at a time by calling G4GetNextYield().

Definition at line 48 of file G4ENDFTapeRead.hh.

Constructor & Destructor Documentation

G4ENDFTapeRead::G4ENDFTapeRead ( G4String  FileLocation,
G4String  FileName,
G4FFGEnumerations::YieldType  WhichYield,
G4FFGEnumerations::FissionCause  WhichCause 
)

Default constructor

  • Usage:
    • FileLocation: the absolute path to the file
    • FileName: the name of the data file
    • WhichYield: INDEPENDENT or CUMULATIVE
    • WhichCause: SPONTANEOUS or N_INDUCED
  • Notes: The data will be read in immediately upon construction.

Definition at line 48 of file G4ENDFTapeRead.cc.

52 : /* Cause_(WhichCause),*/
54  YieldType_(WhichYield)
55 {
56  // Initialize the class
57  Initialize(FileLocation + FileName);
58 }
void Initialize(G4String dataFile)
static const G4FFGEnumerations::Verbosity Verbosity

Here is the call graph for this function:

G4ENDFTapeRead::G4ENDFTapeRead ( G4String  FileLocation,
G4String  FileName,
G4FFGEnumerations::YieldType  WhichYield,
G4FFGEnumerations::FissionCause  WhichCause,
G4int  Verbosity 
)

Overloaded constructor

  • Usage:
    • FileLocation: the absolute path to the file
    • FileName: the name of the data file
    • WhichYield: INDEPENDENT or CUMULATIVE
    • WhichCause: SPONTANEOUS or N_INDUCED
    • Verbosity: Verbosity level
  • Notes: The data will be read in immediately upon construction.

Definition at line 61 of file G4ENDFTapeRead.cc.

66 : /*Cause_(WhichCause),*/
67  Verbosity_(Verbosity),
68  YieldType_(WhichYield)
69 {
70  // Initialize the class
71  Initialize(FileLocation + FileName);
72 }
void Initialize(G4String dataFile)

Here is the call graph for this function:

G4ENDFTapeRead::G4ENDFTapeRead ( std::istringstream &  dataStream,
G4FFGEnumerations::YieldType  WhichYield,
G4FFGEnumerations::FissionCause  WhichCause,
G4int  Verbosity 
)

Overloaded constructor

  • Usage:
    • DataFile: The absolute path to the data file
    • WhichYield: INDEPENDENT or CUMULATIVE
    • WhichCause: SPONTANEOUS or N_INDUCED
    • Verbosity: Verbosity level
  • Notes: The data will be read in immediately upon construction.

Definition at line 75 of file G4ENDFTapeRead.cc.

79 : /*Cause_(WhichCause),*/
80  Verbosity_(Verbosity),
81  YieldType_(WhichYield)
82 {
83  // Initialize the class
84  Initialize(dataStream);
85 }
void Initialize(G4String dataFile)

Here is the call graph for this function:

G4ENDFTapeRead::~G4ENDFTapeRead ( void  )

Default Deconstructor

Definition at line 551 of file G4ENDFTapeRead.cc.

552 {
554 
555  delete[] EnergyGroupValues_;
556  delete YieldContainerTable_;
557 
559 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__

Member Function Documentation

G4double * G4ENDFTapeRead::G4GetEnergyGroupValues ( void  )

Returns and array containing the values of each of the energy groups

  • Usage: No arguments required
  • Notes:

Definition at line 121 of file G4ENDFTapeRead.cc.

122 {
124 
126  return EnergyGroupValues_;
127 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4int G4ENDFTapeRead::G4GetNumberOfEnergyGroups ( void  )

Returns the number of energy yield groups that were extracted from the ENDF tape file

  • Usage: No arguments required
  • Notes:

Definition at line 130 of file G4ENDFTapeRead.cc.

131 {
133 
135  return EnergyGroups_;
136 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__
G4int G4ENDFTapeRead::G4GetNumberOfFissionProducts ( void  )

Returns the number of fission products that were extracted from the ENDF tape file

  • Usage: No arguments required
  • Notes:

Definition at line 139 of file G4ENDFTapeRead.cc.

140 {
142 
143  G4int NumberOfElements = YieldContainerTable_->G4GetNumberOfElements();
144 
146  return NumberOfElements;
147 }
G4long G4GetNumberOfElements(void)
int G4int
Definition: G4Types.hh:78
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__

Here is the call graph for this function:

Here is the caller graph for this function:

G4ENDFYieldDataContainer * G4ENDFTapeRead::G4GetYield ( G4int  WhichYield)

Returns the data for the requested fission product

  • Usage:
    • WhichYield: 0-based index of the fission product for which to get the yield data
  • Notes:
    • This will return a pointer to the next G4FissionYieldContainer. NULL will be returned if no more fission containers exist.

Definition at line 150 of file G4ENDFTapeRead.cc.

151 {
153 
154  G4ENDFYieldDataContainer* Container = NULL;
155  if(WhichYield >= 0 && WhichYield < YieldContainerTable_->G4GetNumberOfElements())
156  {
157  Container = YieldContainerTable_->G4GetContainer(WhichYield);
158  }
159 
161  return Container;
162 }
#define G4FFG_DATA_FUNCTIONENTER__
#define G4FFG_DATA_FUNCTIONLEAVE__
T * G4GetContainer(unsigned int WhichContainer)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ENDFTapeRead::G4SetVerbosity ( G4int  WhatVerbosity)

Sets the verbosity levels

  • Usage:
    • WhichVerbosity: Combination of levels
  • Notes:
    • SILENT: All verbose output is repressed
    • UPDATES: Only high-level internal changes are reported
    • DAUGHTER_INFO: Displays information about daughter product sampling
    • NEUTRON_INFO: Displays information about neutron sampling
    • GAMMA_INFO: Displays information about gamma sampling
    • ALPHA_INFO: Displays information about alpha sampling
    • MOMENTUM_INFO: Displays information about momentum balancing
    • EXTRAPOLATION_INTERPOLATION_INFO: Displays information about any data extrapolation or interpolation that occurs
    • DEBUG: Reports program flow as it steps through functions
    • PRINT_ALL: Displays any and all output

Definition at line 165 of file G4ENDFTapeRead.cc.

166 {
168 
169  this->Verbosity_ = WhatVerbosity;
170 
172 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__

Here is the caller graph for this function:

void G4ENDFTapeRead::Initialize ( G4String  dataFile)
protected

Initialize is a common function called by all constructors.

Definition at line 88 of file G4ENDFTapeRead.cc.

89 {
90  std::istringstream dataStream(std::ios::in);
91  G4ParticleHPManager::GetInstance()->GetDataStream(dataFile, dataStream);
92 
93  Initialize(dataStream);
94 }
static G4ParticleHPManager * GetInstance()
void Initialize(G4String dataFile)
void GetDataStream(G4String, std::istringstream &iss)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ENDFTapeRead::Initialize ( std::istringstream &  dataStream)
protected

Initialize is a common function calles by all constructors

Definition at line 97 of file G4ENDFTapeRead.cc.

98 {
100 
101  EnergyGroups_ = 0;
102  EnergyGroupValues_ = NULL;
103 
104  YieldContainerTable_ = new G4TableTemplate< G4ENDFYieldDataContainer >;
105 
106  try
107  {
108  ReadInData(dataStream);
109  } catch (std::exception e)
110  {
111  delete YieldContainerTable_;
112 
114  throw e;
115  }
116 
118 }
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__

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