CHROMA
inline_stoch_group_meson_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline measurement of stochastic group meson operators
4  */
5 
6 #ifndef __inline_stoch_group_meson_h__
7 #define __inline_stoch_group_meson_h__
8 
10 #include "io/xml_group_reader.h"
12 
13 namespace Chroma
14 {
15  /*! \ingroup inlinehadron */
16  namespace InlineStochGroupMesonEnv
17  {
18  extern const std::string name;
19  bool registerAll();
20 
21 
22  //! Parameter structure
23  /*! \ingroup inlinehadron */
24  struct Params
25  {
26  Params();
27  Params(XMLReader& xml_in, const std::string& path);
28  void writeXML(XMLWriter& xml_out, const std::string& path);
29 
30  unsigned long frequency;
31 
32  struct Param_t
33  {
34  MesonOpType creat_op_contract_type; /*<! Contraction type for creation op */
35  MesonOpType annih_op_contract_type; /*<! Contraction type for annihilation op */
36  int mom2_max; /*!< (mom)^2 <= mom2_max */
37  int displacement_length; /*!< Displacement length for creat. and annih. ops */
38  GroupXML_t quark_smearing; /*!< xml std::string holding smearing params */
39  GroupXML_t link_smearing; /*!< link smearing xml */
40 
41  multi1d<GroupXML_t> quark_dils; /*!< Dilutions for each quark */
42  };
43 
45  {
47  {
48  std::string ops_file; /*!< Coefficient file name */
49  std::string id; /*!< ID/tag used in analysis codes*/
50  };
51 
52  TwoQuarkOpsFile_t operators_file; /*!< Files holding 2-quark ops to make*/
53  std::string quark_ids; /*!< 2 character std::string indicating which quarks are degenerate */
54  std::string gauge_id; /*!< Gauge field */
55  };
56 
57  Param_t param; /*!< Parameters */
58  NamedObject_t named_obj; /*!< Named objects */
59  std::string xml_file; /*!< Alternate XML file pattern */
60  };
61 
62 
63  //! Inline measurement of stochastic group meson operators
64  /*! \ingroup inlinehadron */
66  {
67  public:
69  InlineMeas(const Params& p) : params(p) {}
71 
72  unsigned long getFrequency(void) const {return params.frequency;}
73 
74  //! Do the measurement
75  void operator()(const unsigned long update_no,
76  XMLWriter& xml_out);
77 
78  protected:
79  //! Do the measurement
80  void func(const unsigned long update_no,
81  XMLWriter& xml_out);
82 
83  private:
85  };
86 
87  } // namespace InlineStochGroupMesonEnv
88 }
89 
90 #endif
Abstract inline measurements.
Inline measurement of stochastic group meson operators.
unsigned long getFrequency(void) const
Tell me how often I should measure this beastie.
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.
Type of contractions for stochastic meson operators.
MesonOpType
Meson operator contraction orderings.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Hold group xml and type id.
void writeXML(XMLWriter &xml_out, const std::string &path)
Read an XML group as a std::string.