CHROMA
inline_hadron_contract.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline hadron contractions - for correlators
4  *
5  * Hadron spectrum calculations. The general version that write output
6  * into lime files.
7  */
8 
9 #ifndef __inline_hadron_contract_h__
10 #define __inline_hadron_contract_h__
11 
12 #include "chromabase.h"
14 #include "io/xml_group_reader.h"
15 
16 namespace Chroma
17 {
18  /*! \ingroup inlinehadron */
19  namespace InlineHadronContractEnv
20  {
21  extern const std::string name;
22  bool registerAll();
23 
24  //! Parameter structure
25  /*! \ingroup inlinehadron */
26  struct Params
27  {
28  Params();
29  Params(XMLReader& xml_in, const std::string& path);
30  void writeXML(XMLWriter& xml_out, const std::string& path);
31 
33  {
34  std::string gauge_id; /*!< Input gauge field */
35  std::string output_file; /*!< Output file for data in QIO/LIME format */
36  multi1d<GroupXML_t> correlators; /*!< XML used for each correlator */
37  };
38 
39  unsigned long frequency;
40 
41  NamedObject_t named_obj; /*!< Named objects */
42  std::string xml_file; /*!< Alternate XML file pattern */
43  };
44 
45 
46  //! Inline measurement of hadron contraction functions
47  /*! \ingroup inlinehadron */
49  {
50  public:
52  InlineMeas(const Params& p) : params(p) {}
54 
55  unsigned long getFrequency(void) const {return params.frequency;}
56 
57  //! Do the measurement
58  void operator()(const unsigned long update_no,
59  XMLWriter& xml_out);
60 
61  protected:
62  //! Do the measurement
63  void func(const unsigned long update_no,
64  XMLWriter& xml_out);
65 
66  private:
68  };
69 
70  }
71 
72 }
73 
74 #endif
Abstract inline measurements.
Primary include file for CHROMA library code.
Inline measurement of hadron contraction functions.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
unsigned long getFrequency(void) const
Tell me how often I should measure this beastie.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
void writeXML(XMLWriter &xml_out, const std::string &path)
Read an XML group as a std::string.