CHROMA
enum_cfgtype_io.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief CfgType enum
4  */
5 
6 #include "enum_cfgtype_io.h"
7 #include <string>
8 
9 
10 namespace Chroma {
11 
12  namespace CfgTypeEnv {
13 
14  bool registerAll(void)
15  {
16  bool success;
17  success = theCfgTypeMap::Instance().registerPair(std::string("MILC"), CFG_TYPE_MILC );
18  success &= theCfgTypeMap::Instance().registerPair(std::string("NERSC"), CFG_TYPE_NERSC);
19  success &= theCfgTypeMap::Instance().registerPair( std::string("SCIDAC"), CFG_TYPE_SCIDAC );
20  success &= theCfgTypeMap::Instance().registerPair( std::string("SZIN" ), CFG_TYPE_SZIN );
21  success &= theCfgTypeMap::Instance().registerPair( std::string("SZINQIO"), CFG_TYPE_SZINQIO );
22 
23  success &= theCfgTypeMap::Instance().registerPair( std::string("KYU"), CFG_TYPE_KYU );
24  success &= theCfgTypeMap::Instance().registerPair( std::string("WUP"), CFG_TYPE_WUPP);
25  success &= theCfgTypeMap::Instance().registerPair( std::string("DISORDERED"), CFG_TYPE_DISORDERED );
26  success &= theCfgTypeMap::Instance().registerPair( std::string("UNIT"), CFG_TYPE_UNIT );
27  success &= theCfgTypeMap::Instance().registerPair( std::string("CPPACS"), CFG_TYPE_CPPACS );
28  success &= theCfgTypeMap::Instance().registerPair( std::string("CERN"), CFG_TYPE_CERN );
29  success &= theCfgTypeMap::Instance().registerPair( std::string("WEAK_FIELD"), CFG_TYPE_WEAK_FIELD);
30  success &= theCfgTypeMap::Instance().registerPair( std::string("CLASSICAL_SF"), CFG_TYPE_CLASSICAL_SF);
31 
32  return success;
33  }
34 
36  const std::string typeIDString = "CfgType";
37  }
38 
39  using namespace CfgTypeEnv;
40 
41  void read(XMLReader& xml_in, const std::string& path, CfgType& t) {
42  theCfgTypeMap::Instance().read(typeIDString, xml_in,path,t);
43  }
44 
45  void write(XMLWriter& xml_out, const std::string& path, const CfgType& t) {
46  theCfgTypeMap::Instance().write(typeIDString, xml_out, path, t);
47  }
48 }
static T & Instance()
Definition: singleton.h:432
CfgType enum.
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.
CfgType
Configuration type.
@ CFG_TYPE_WEAK_FIELD
@ CFG_TYPE_DISORDERED
@ CFG_TYPE_SZINQIO
@ CFG_TYPE_CLASSICAL_SF
@ CFG_TYPE_NERSC
@ CFG_TYPE_CPPACS
@ CFG_TYPE_SCIDAC
int t
Definition: meslate.cc:37
const std::string typeIDString
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979