CHROMA
enum_mesonop_io.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Type of contractions for stochastic meson operators
4  */
5 
6 #include "enum_mesonop_io.h"
7 
8 #include <string>
9 
10 namespace Chroma {
11 
12  namespace MesonOpTypeEnv {
13 
14  bool registerAll(void)
15  {
16  bool success = true;
17  success &= theMesonOpTypeMap::Instance().registerPair(std::string("SOURCE-SOURCE"), MESON_OP_TYPE_SOURCE_SOURCE);
18  success &= theMesonOpTypeMap::Instance().registerPair(std::string("SOURCE-SOLUTION"), MESON_OP_TYPE_SOURCE_SOLUTION);
19  success &= theMesonOpTypeMap::Instance().registerPair(std::string("SOLUTION-SOURCE "), MESON_OP_TYPE_SOLUTION_SOURCE);
20  success &= theMesonOpTypeMap::Instance().registerPair(std::string("SOLUTION-SOLUTION"), MESON_OP_TYPE_SOLUTION_SOLUTION);
21  return success;
22  }
23 
25  const std::string typeIDString = "MesonOpType";
26  }
27  using namespace MesonOpTypeEnv;
28 
29  //! read an approximation coefficient type enum
30  void read(XMLReader& xml_in, const std::string& path, MesonOpType& t) {
31  theMesonOpTypeMap::Instance().read(typeIDString, xml_in, path,t);
32  }
33 
34  //! write an approximation coefficient type enum
35  void write(XMLWriter& xml_out, const std::string& path, const MesonOpType& t) {
36  theMesonOpTypeMap::Instance().write(typeIDString, xml_out, path, t);
37  }
38 }
static T & Instance()
Definition: singleton.h:432
Type of contractions for stochastic meson operators.
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.
MesonOpType
Meson operator contraction orderings.
@ MESON_OP_TYPE_SOLUTION_SOURCE
@ MESON_OP_TYPE_SOURCE_SOLUTION
@ MESON_OP_TYPE_SOLUTION_SOLUTION
@ MESON_OP_TYPE_SOURCE_SOURCE
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