make_xml_file.cc

Go to the documentation of this file.
00001 // $Id: make_xml_file.cc,v 3.1 2007/04/09 18:41:57 bjoo Exp $
00002 /*! \file
00003  *  \brief Make xml file writer
00004  */
00005 
00006 #include "meas/inline/make_xml_file.h"
00007 #include <ostream>
00008 using namespace std;
00009 
00010 namespace Chroma
00011 {
00012   // Return a xml file name for inline measurements
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     // Could/should allow file pattern
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     // Return xml
00032     return xml;
00033   }
00034 }

Generated on Mon Mar 15 04:33:38 2010 for CHROMA by  doxygen 1.4.7