CHROMA
ovext_constant_strategy.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Ovext rescale strategy
4  */
5 
6 #include "chromabase.h"
8 
9 using namespace QDP;
10 
11 namespace Chroma
12 {
13 
14  namespace OvExtConstantStrategyEnv
15  {
16 
18  const std::string& path)
19  {
20  Real tuning_constant;
21  try {
22  XMLReader paramtop(xml_in, path);
23  read(paramtop, "./TuningConstant", tuning_constant);
24  }
25  catch(const std::string& e) {
26  QDPIO::cerr << "Caught Exception reading XML: " << e << std::endl;
27  QDP_abort(1);
28  }
29 
30  return new OvExtConstantStrategy(tuning_constant);
31  }
32 
33  const std::string name = "OVEXT_CONSTANT_STRATEGY";
34 
35  //! Local registration flag
36  static bool registered = false;
37 
38  //! Register all the factories
39  bool registerAll()
40  {
41  bool success = true;
42  if (! registered)
43  {
44  success &= TheAbsOvExtTuningStrategyFactory::Instance().registerObject(name, createStrategy);
45  registered = true;
46  }
47  return success;
48  }
49 
50  } // end namespace OvExtTuningStrategy
51 } // end namespace Chroma
Primary include file for CHROMA library code.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
bool registerAll()
Register all the factories.
AbsOvExtTuningStrategy * createStrategy(XMLReader &xml_in, const std::string &path)
static bool registered
Local registration flag.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Ovext rescale strategy.