CHROMA
cfgtype_io.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Configuration structure IO
3  */
4 
5 #include "chromabase.h"
6 #include "io/cfgtype_io.h"
7 
8 
9 namespace Chroma
10 {
11 
12  // Configuration input
13  void read(XMLReader& xml, const std::string& path, Cfg_t& input)
14  {
15  XMLReader inputtop(xml, path);
16 
17  read(inputtop, "cfg_type", input.cfg_type);
18  read(inputtop, "cfg_file", input.cfg_file);
19  }
20 
21  // Write a config struct
22  void write(XMLWriter& xml, const std::string& path, const Cfg_t& cfg)
23  {
24  push(xml, "Cfg");
25  write(xml, "cfg_type", cfg.cfg_type);
26  write(xml, "cfg_file", cfg.cfg_file);
27  pop(xml);
28  }
29 
30 } // end namespace Chroma
Configuration structure IO.
Primary include file for CHROMA library code.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
push(xml_out,"Condensates")
pop(xml_out)
::std::string string
Definition: gtest.h:1979
Gauge configuration structure.
Definition: cfgtype_io.h:16
std::string cfg_file
Definition: cfgtype_io.h:18
CfgType cfg_type
Definition: cfgtype_io.h:17