pyne::Material::Material(std::string filename, double m, std::string s, double apm) { // Initializes the mass stream based on an isotopic composition file with a string name. mass = m; name = s; atoms_per_mol = apm; // Check that the file is there if (!pyne::file_exists(filename)) throw pyne::FileNotFound(filename); // Check to see if the file is in HDF5 format. bool isH5 = H5::H5File::isHdf5(filename); if (isH5) from_hdf5(filename); else from_text(filename); };
void pyne::Material::from_hdf5(char * filename, char * datapath, int row, int protocol) { std::string fname (filename); std::string dpath (datapath); from_hdf5(fname, dpath, row, protocol); };
void pyne::Material::from_hdf5(char * fchar, char * dchar, int row, int protocol) { std::string filename (fchar); std::string datapath (dchar); from_hdf5(filename, datapath, row, protocol); };