00001
00002
00003
00004
00005
00006 #include "meas/inline/make_xml_file.h"
00007 #include <ostream>
00008 using namespace std;
00009
00010 namespace Chroma
00011 {
00012
00013 string makeXMLFileName(std::string xml_file, unsigned long update_no)
00014 {
00015 if (xml_file == "")
00016 {
00017 QDPIO::cerr << __func__ << ": empty xml file" << endl;
00018 QDP_abort(1);
00019 }
00020
00021 std::string xml;
00022
00023 if( update_no == 0 ) {
00024 xml = xml_file;
00025 }
00026 else {
00027 std::ostringstream os;
00028 os << xml_file << "." << update_no;
00029 xml = os.str();
00030 }
00031
00032 return xml;
00033 }
00034 }