CHROMA
make_xml_file.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Make xml file writer
3  */
4 
6 #include <ostream>
7 
8 namespace Chroma
9 {
10  // Return a xml file name for inline measurements
11  std::string makeXMLFileName(std::string xml_file, unsigned long update_no)
12  {
13  if (xml_file == "")
14  {
15  QDPIO::cerr << __func__ << ": empty xml file" << std::endl;
16  QDP_abort(1);
17  }
18 
19  std::string xml;
20  // Could/should allow file pattern
21  if( update_no == 0 ) {
22  xml = xml_file;
23  }
24  else {
25  std::ostringstream os;
26  os << xml_file << "." << update_no;
27  xml = os.str();
28  }
29  // Return xml
30  return xml;
31  }
32 }
std::string makeXMLFileName(std::string xml_file, unsigned long update_no)
Return a xml file name for inline measurements.
Make xml file writer.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979