47 std::ifstream theChannel(filename);
49 if(Z==1 && (aFile.
GetZ()!=Z || std::abs(aFile.
GetA()-A)>0.0001) )
51 if(getenv(
"NeutronHPNamesLogging"))
G4cout <<
"Skipped = "<< filename <<
" "<<A<<
" "<<Z<<
G4endl;
57 if(!theChannel) {theChannel.close();
return false;}
59 if(theChannel.eof()) {theChannel.close();
return false;}
60 if(!theChannel) {theChannel.close();
return false;}
62 theChannel >> dummy >> dummy;
66 theChannelData->
Init(theChannel, nData, eV, abundance*barn);
80 if(!getenv(
"G4NEUTRONHPDATA"))
81 throw G4HadronicException(__FILE__, __LINE__,
"Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
82 G4String baseName = getenv(
"G4NEUTRONHPDATA");
83 dirName = baseName+
"/Fission";
88 Init(A, Z, M, abun, dirName,
"/CrossSection");
94 theFissionData = theChannelData;
96 dirName = baseName+
"/Capture";
98 Init(A, Z, M, abun, dirName,
"/CrossSection");
99 theCaptureData = theChannelData;
101 dirName = baseName+
"/Elastic";
103 Init(A, Z, M, abun, dirName,
"/CrossSection");
104 theElasticData = theChannelData;
106 dirName = baseName+
"/Inelastic";
108 Init(A, Z, M, abun, dirName,
"/CrossSection");
109 theInelasticData = theChannelData;
130 return (theNames.
GetName(A, Z, base, rest, dbool)).GetName();
G4DLLIMPORT std::ostream G4cout
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
G4String GetName(G4int A, G4int Z, G4String base, G4String rest)
G4NeutronHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void Init(std::ifstream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)