CHROMA
inline_glueball_ops.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline measurement of glueball operators
4  */
5 
6 #ifndef __inline_glueball_ops_h__
7 #define __inline_glueball_ops_h__
8 
10 #include "io/xml_group_reader.h"
11 
12 namespace Chroma
13 {
14  /*! \ingroup inlineglue */
15  namespace InlineGlueballOpsEnv
16  {
17  bool registerAll();
18 
19 
20  //! Parameter structure
21  /*! \ingroup inlineglue */
22  struct Params
23  {
24  Params();
25  Params(XMLReader& xml_in, const std::string& path);
26  void writeXML(XMLWriter& xml_out, const std::string& path) const;
27 
28  unsigned long frequency;
29 
30  struct Param_t
31  {
32  int mom2_max; /*!< (mom)^2 <= mom2_max */
33  int displacement_length; /*!< Displacement length for creat. and annih. ops */
34  int decay_dir; /*!< Decay direction */
35  multi1d< multi1d<int> > displacement_list; /*!< Array of displacements list to generate */
36  GroupXML_t link_smearing; /*!< link smearing xml */
37  };
38 
40  {
41  std::string gauge_id; /*!< Gauge field */
42  std::string glue_op_file; /*!< File name for creation operators */
43  };
44 
45  Param_t param; /*!< Parameters */
46  NamedObject_t named_obj; /*!< Named objects */
47  std::string xml_file; /*!< Alternate XML file pattern */
48  };
49 
50 
51  //! Inline measurement of glueball operators
52  /*! \ingroup inlineglue */
54  {
55  public:
57  InlineMeas(const Params& p) : params(p) {}
59 
60  unsigned long getFrequency(void) const {return params.frequency;}
61 
62  //! Do the measurement
63  void operator()(const unsigned long update_no,
64  XMLWriter& xml_out);
65 
66  protected:
67  //! Do the measurement
68  void func(const unsigned long update_no,
69  XMLWriter& xml_out);
70 
71  private:
73  };
74 
75  } // namespace InlineGlueballOpsEnv
76 }
77 
78 #endif
Abstract inline measurements.
Inline measurement of glueball 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) const
Read an XML group as a std::string.