23 namespace InlineHadronContractEnv
60 XMLReader inputtop(xml, path);
64 QDPIO::cout <<
"Read contraction list" << std::endl;
66 QDPIO::cout <<
"Finished reading correlators" << std::endl;
96 XMLReader paramtop(xml_in, path);
98 if (paramtop.count(
"Frequency") == 1)
107 if (paramtop.count(
"xml_file") != 0)
114 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
145 push(xml_out,
"HadronContract");
146 write(xml_out,
"update_no", update_no);
147 write(xml_out,
"xml_file", xml_file);
150 XMLFileWriter xml(xml_file);
151 func(update_no, xml);
155 func(update_no, xml_out);
172 XMLBufferWriter gauge_xml;
178 catch( std::bad_cast )
190 const multi1d<LatticeColorMatrix>&
u =
193 push(xml_out,
"HadronContract");
194 write(xml_out,
"update_no", update_no);
197 <<
": hadron contracts and spectroscopy for any type of fermion"
199 QDPIO::cout <<
" Volume: " << Layout::lattSize()[0];
200 for (
int i=1;
i<
Nd; ++
i) {
201 QDPIO::cout <<
" x " << Layout::lattSize()[
i];
203 QDPIO::cout << std::endl;
211 write(xml_out,
"Config_info", gauge_xml);
213 push(xml_out,
"Output_version");
214 write(xml_out,
"out_version", 1);
218 XMLBufferWriter file_xml;
219 push(file_xml,
"HadronContract");
225 QDPIO_SINGLEFILE, QDPIO_SERIAL, QDPIO_OPEN);
228 MesPlq(xml_out,
"Observables",
u);
231 push(xml_out,
"HadronMeasurements");
238 push(xml_out,
"elem");
239 write(xml_out,
"Input", had_xml.
xml);
245 QDPIO::cout <<
"Contractions for id = " << had_xml.
id << std::endl;
248 std::istringstream xml_s(had_xml.
xml);
249 XMLReader hadtop(xml_s);
260 std::list< Handle<HadronContractResult_t> > hadron_cont =
261 (*hadronContract)(
u,
"HadronContraction",
"ContractionType");
265 push(xml_out,
"HadronContractions");
269 had_ptr != hadron_cont.end();
274 push(xml_out,
"elem");
282 write(xml_out,
"RecordXML", had_cont->xml);
283 write(xml_out,
"Diagnostic", had_cont->xml_regres);
286 write(qio_output, had_cont->xml, had_cont->bin);
310 << snoop.getTimeInSeconds()
311 <<
" secs" << std::endl;
Inline measurement factory.
Class for counted reference semantics.
Inline measurement of hadron contraction functions.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
std::string uniqueId()
Return a unique id.
void proginfo(XMLWriter &xml)
Print out basic information about this program.
std::string makeXMLFileName(std::string xml_file, unsigned long update_no)
Return a xml file name for inline measurements.
multi1d< GroupXML_t > readXMLArrayGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
Construct hadron correlators.
All hadron contraction constructors.
Factory for producing hadron correlator objects.
Class for counted reference semantics.
Inline hadron contractions - for correlators.
Named object function std::map.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
void write(XMLWriter &xml, const std::string &path, const Params::NamedObject_t &input)
Propagator output.
void read(XMLReader &xml, const std::string &path, Params::NamedObject_t &input)
Propagator input.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Print out basic info about this program.
Hold group xml and type id.
multi1d< GroupXML_t > correlators
void writeXML(XMLWriter &xml_out, const std::string &path)