135 string filename = string(gSystem->Getenv(
"GENIE")) +
136 string(
"/data/evgen/catalogues/iso/natural-isotopes.data");
139 <<
"Loading natural occurring isotope table from file: " << filename;
141 bool is_accessible = ! (gSystem->AccessPathName( filename.c_str() ));
142 if (!is_accessible) {
143 LOG(
"NatIsotop",
pWARN) <<
"Can not read file: " << filename;
149 std::ifstream input(filename.c_str());
150 if (input.is_open()){
153 for(
int i=0; i<8; i++){
155 getline(input, buffer);
158 int Z = -1, Z_previous = -1, nelements = 0, pdgcode = 0;
159 double atomicmass = 0, abundance = 0;
160 string elementname, subelementname;
162 while( !input.eof() ) {
166 input >> elementname;
169 vector<NaturalIsotopeElementData *> vec;
174 LOG(
"NatIsotop",
pDEBUG) <<
"Reading entry for Z = " << Z;
175 for(
int n=0 ; n < nelements; n++){
176 input >> subelementname;
181 <<
" - Element: " << n <<
", pdg = " << pdgcode
182 <<
", A = " << atomicmass <<
", abundance = " << abundance;
187 map<
int,vector<NaturalIsotopeElementData*> >::value_type(Z,vec));
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...