CHROMA
ferm_createstate_reader_s.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief All ferm create-state method
3  */
4 
5 #include "chromabase.h"
6 
11 
12 namespace Chroma
13 {
14 
15  //! Registration aggregator
16  namespace StaggeredCreateFermStateEnv
17  {
18 
19  // Helper function for the FermAction readers
20  Handle< CreateFermState<LatticeStaggeredFermion,
21  multi1d<LatticeColorMatrix>,
22  multi1d<LatticeColorMatrix> > > reader(XMLReader& xml_in,
23  const std::string& path)
24  {
25  XMLReader top(xml_in, path);
26 
27 // bool success = registered; // make sure all codes loaded
28 
29  std::string fermstate;
30  std::string fermstate_path;
31  if (top.count("FermState") != 0)
32  {
33  fermstate_path = "FermState";
34  read(top, fermstate_path + "/Name", fermstate);
35  }
36  else
37  {
38  QDPIO::cerr << "Error: FermState group not found" << std::endl;
39  QDP_abort(1);
40  }
41 
43  LatticeStaggeredFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > >
44  cgs(TheStaggeredCreateFermStateFactory::Instance().createObject(fermstate,
45  top,
46  fermstate_path));
47 
48  return cgs;
49  }
50 
51  }
52 
53 }
Primary include file for CHROMA library code.
Create a fermion connection state.
Definition: create_state.h:69
Class for counted reference semantics.
Definition: handle.h:33
static T & Instance()
Definition: singleton.h:432
All ferm create-state method.
Fermion create state factory.
All ferm create-state method.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
Handle< CreateFermState< LatticeStaggeredFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the CreateFermState readers.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Simple ferm state and a creator.