CHROMA
inline_stoch_group_baryon_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline measurement of stochastic group baryon operator
4  */
5 
6 #ifndef __inline_stoch_group_baryon_h__
7 #define __inline_stoch_group_baryon_h__
8 
10 #include "io/xml_group_reader.h"
11 
12 namespace Chroma
13 {
14  /*! \ingroup inlinehadron */
15  namespace InlineStochGroupBaryonEnv
16  {
17  extern const std::string name;
18  bool registerAll();
19 
20 
21  //! Parameter structure
22  /*! \ingroup inlinehadron */
23  struct Params
24  {
25  Params();
26  Params(XMLReader& xml_in, const std::string& path);
27  void writeXML(XMLWriter& xml_out, const std::string& path);
28 
29  unsigned long frequency;
30 
31  struct Param_t
32  {
33 
34  int version; /*!< included to handle the two momentum options */
35  int mom2_max; /*!< (mom)^2 <= mom2_max */
36  int displacement_length; /*!< Displacement length for creat. and annih. ops */
37  GroupXML_t quark_smearing; /*!< xml std::string holding smearing params */
38  GroupXML_t link_smearing; /*!< link smearing xml */
39 
40  multi1d<GroupXML_t> quark_dils; /*!< Dilutions for each quark */
41 
42  multi2d<int> moms; /*!< Momenta to be used */
43  };
44 
46  {
48  {
49  std::string ops_file; /*!< Coefficient file name */
50  std::string id; /*!< ID/tag used in analysis codes*/
51  };
52 
53  ThreeQuarkOpsFile_t operators_file; /*!< Files holding 3-quark ops to make*/
54  std::string quark_ids; /*!< 3 character std::string indicating which quarks are degenerate */
55  std::string gauge_id; /*!< Gauge field */
56  };
57 
58  Param_t param; /*!< Parameters */
59  NamedObject_t named_obj; /*!< Named objects */
60  std::string xml_file; /*!< Alternate XML file pattern */
61  };
62 
63 
64  //! Inline measurement of stochastic group baryon operators
65  /*! \ingroup inlinehadron */
67  {
68  public:
70  InlineMeas(const Params& p) : params(p) {}
72 
73  unsigned long getFrequency(void) const {return params.frequency;}
74 
75  //! Do the measurement
76  void operator()(const unsigned long update_no,
77  XMLWriter& xml_out);
78 
79  protected:
80  //! Do the measurement
81  void func(const unsigned long update_no,
82  XMLWriter& xml_out);
83 
84  private:
86  };
87 
88  } // namespace InlineStochGroupBaryonEnv
89 }
90 
91 #endif
Abstract inline measurements.
Inline measurement of stochastic group baryon operators.
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.
unsigned long getFrequency(void) const
Tell me how often I should measure this beastie.
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.