CHROMA
ferm_createstate_reader_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief All ferm create-state method
3  */
4 
5 #include "chromabase.h"
6 
12 
13 namespace Chroma
14 {
15 
16  // State reader
17  namespace CreateFermStateEnv
18  {
19 
20  // Helper function for the FermAction readers
21  Handle< CreateFermState<LatticeFermion,
22  multi1d<LatticeColorMatrix>,
23  multi1d<LatticeColorMatrix> > > reader(XMLReader& xml_in,
24  const std::string& path)
25  {
26  XMLReader top(xml_in, path);
27 
28  std::string fermstate;
29  std::string fermstate_path;
30  if (top.count("FermState") != 0)
31  {
32  fermstate_path = "FermState";
33  read(top, fermstate_path + "/Name", fermstate);
34  }
35  else
36  {
37 // QDPIO::cerr << "Error: FermState group not found" << std::endl;
38 // QDP_abort(1);
39 
40  fermstate_path = ".";
42  }
43 
45  LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > >
46  cgs(TheCreateFermStateFactory::Instance().createObject(fermstate,
47  top,
48  fermstate_path));
49 
50  return cgs;
51  }
52 
53  }
54 
55 } // end chroma namespace
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< LatticeFermion, 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.
Simple ferm state and a creator.