Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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 ()
 
G4int G4GetNumberOfEnergyGroups ()
 
G4int G4GetNumberOfFissionProducts ()
 
G4ENDFYieldDataContainerG4GetYield (G4int WhichYield)
 
void G4SetVerbosity (G4int WhatVerbosity)
 
 ~G4ENDFTapeRead ()
 

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 47 of file G4ENDFTapeRead.hh.

Constructor & Destructor Documentation

◆ G4ENDFTapeRead() [1/3]

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 47 of file G4ENDFTapeRead.cc.

50 : /* Cause_(WhichCause),*/
51 Verbosity_(G4FFGDefaultValues::Verbosity),
52 YieldType_(WhichYield)
53{
54 // Initialize the class
55 Initialize(FileLocation + FileName);
56}
void Initialize(G4String dataFile)

◆ G4ENDFTapeRead() [2/3]

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 58 of file G4ENDFTapeRead.cc.

61 : /*Cause_(WhichCause),*/
62 Verbosity_(Verbosity),
63 YieldType_(WhichYield)
64{
65 // Initialize the class
66 Initialize(FileLocation + FileName);
67}

◆ G4ENDFTapeRead() [3/3]

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 69 of file G4ENDFTapeRead.cc.

72 : /*Cause_(WhichCause),*/
73 Verbosity_(Verbosity),
74 YieldType_(WhichYield)
75{
76 // Initialize the class
77 Initialize(dataStream);
78}

◆ ~G4ENDFTapeRead()

G4ENDFTapeRead::~G4ENDFTapeRead ( )

Default Deconstructor

Definition at line 524 of file G4ENDFTapeRead.cc.

525{
527
528 delete[] EnergyGroupValues_;
529 delete YieldContainerTable_;
530
532}
#define G4FFG_FUNCTIONLEAVE__
#define G4FFG_FUNCTIONENTER__

Member Function Documentation

◆ G4GetEnergyGroupValues()

G4double * G4ENDFTapeRead::G4GetEnergyGroupValues ( )

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

  • Usage: No arguments required
  • Notes:

Definition at line 110 of file G4ENDFTapeRead.cc.

111{
113
115 return EnergyGroupValues_;
116}

◆ G4GetNumberOfEnergyGroups()

G4int G4ENDFTapeRead::G4GetNumberOfEnergyGroups ( )

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

  • Usage: No arguments required
  • Notes:

Definition at line 118 of file G4ENDFTapeRead.cc.

119{
121
123 return EnergyGroups_;
124}

◆ G4GetNumberOfFissionProducts()

G4int G4ENDFTapeRead::G4GetNumberOfFissionProducts ( )

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

  • Usage: No arguments required
  • Notes:

Definition at line 126 of file G4ENDFTapeRead.cc.

127{
129
130 auto NumberOfElements = (G4int)YieldContainerTable_->G4GetNumberOfElements();
131
133 return NumberOfElements;
134}
int G4int
Definition G4Types.hh:85
G4long G4GetNumberOfElements()

Referenced by G4FissionProductYieldDist::MakeTrees(), and G4FissionProductYieldDist::ReadProbabilities().

◆ G4GetYield()

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 136 of file G4ENDFTapeRead.cc.

137{
139
140 G4ENDFYieldDataContainer* Container = nullptr;
141 if (WhichYield >= 0 && WhichYield < YieldContainerTable_->G4GetNumberOfElements()) {
142 Container = YieldContainerTable_->G4GetContainer(WhichYield);
143 }
144
146 return Container;
147}
#define G4FFG_DATA_FUNCTIONENTER__
#define G4FFG_DATA_FUNCTIONLEAVE__
T * G4GetContainer(unsigned int WhichContainer)

Referenced by G4FissionProductYieldDist::ReadProbabilities().

◆ G4SetVerbosity()

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 149 of file G4ENDFTapeRead.cc.

150{
152
153 this->Verbosity_ = WhatVerbosity;
154
156}

Referenced by G4FissionProductYieldDist::G4SetVerbosity().

◆ Initialize() [1/2]

void G4ENDFTapeRead::Initialize ( G4String dataFile)
protected

Initialize is a common function called by all constructors.

Definition at line 80 of file G4ENDFTapeRead.cc.

81{
82 std::istringstream dataStream(std::ios::in);
83 G4ParticleHPManager::GetInstance()->GetDataStream(dataFile, dataStream);
84
85 Initialize(dataStream);
86}
void GetDataStream(const G4String &, std::istringstream &iss)
static G4ParticleHPManager * GetInstance()

Referenced by G4ENDFTapeRead(), G4ENDFTapeRead(), G4ENDFTapeRead(), and Initialize().

◆ Initialize() [2/2]

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

Initialize is a common function calles by all constructors

Definition at line 88 of file G4ENDFTapeRead.cc.

89{
91
92 EnergyGroups_ = 0;
93 EnergyGroupValues_ = nullptr;
94
95 YieldContainerTable_ = new G4TableTemplate<G4ENDFYieldDataContainer>;
96
97 try {
98 ReadInData(dataStream);
99 }
100 catch (std::exception& e) {
101 delete YieldContainerTable_;
102
104 throw e;
105 }
106
108}

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