CHROMA
enum_quarkspintype_io.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Enum for what spin components of a quark prop to compute
3  */
4 
6 
7 namespace Chroma
8 {
9  namespace QuarkSpinTypeEnv
10  {
11  bool registerAll(void)
12  {
13  bool success = true;
14  success &= theQuarkSpinTypeMap::Instance().registerPair(std::string("FULL"), QUARK_SPIN_TYPE_FULL );
15  success &= theQuarkSpinTypeMap::Instance().registerPair(std::string("UPPER"), QUARK_SPIN_TYPE_UPPER);
16  success &= theQuarkSpinTypeMap::Instance().registerPair(std::string("LOWER"), QUARK_SPIN_TYPE_LOWER);
17  return success;
18  }
19 
21  const std::string typeIDString = "QuarkSpinType";
22  }
23  using namespace QuarkSpinTypeEnv;
24 
25  //! Read a quark spin type enum
26  void read(XMLReader& xml_in, const std::string& path, QuarkSpinType& t)
27  {
28  theQuarkSpinTypeMap::Instance().read(typeIDString, xml_in, path,t);
29  }
30 
31  //! Write a quark spin type enum
32  void write(XMLWriter& xml_out, const std::string& path, const QuarkSpinType& t)
33  {
34  theQuarkSpinTypeMap::Instance().write(typeIDString, xml_out, path, t);
35  }
36 }
static T & Instance()
Definition: singleton.h:432
Enum for what spin components of a quark prop to compute.
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.
QuarkSpinType
Quark spin type.
int t
Definition: meslate.cc:37
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979