qsw.read(rec_xml,s1);
try {   std::string tname;  char tprec[2]={0,'\n'};  QIOStrings::QIOTypeStringFromType(tname, s1); tprec[0] = QIOStrings::QIOPrecisionStringFromType(s1);  QIO_RecordInfo* info = QIO_create_record_info(QIO_FIELD, const_cast<char *>(tname.c_str()), tprec, Nc, Ns, sizeof(T),1);     QIO_String *xml_c  = QIO_string_create(); try { if (QIO_read(get(), info, xml_c, &(QDPOLatticeFactoryPut<T>), sizeof(T), sizeof(typename WordType<T>::Type_t), (void *)s1.getF()) != QIO_SUCCESS) { QDPIO::cerr << "QDPFileReader: error reading file" << endl; clear(QDPIO_badbit); } } catch(std::bad_alloc) { QDPIO::cerr << "Bad Alloc Exception caught in QIO_read(OLattice) " <<endl << flush; QDP_abort(-1); }   istringstream ss; if (Layout::primaryNode()) { string foo = QIO_string_ptr(xml_c); ss.str(foo); } rec_xml.open(ss);  QIO_string_destroy(xml_c); QIO_destroy_record_info(info); } catch(std::bad_alloc) { QDPIO::cout << "Bad ALLOC exception caught " << endl; QDP_abort(-1); }
void read(QDPFileReader& qsw, XMLReader& rec_xml, OScalar<T>& s1){  qsw.read(rec_xml,s1);}