CHROMA
inline_noisy_building_blocks_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline construction of noisy BuildingBlocks
4  *
5  * Noisy Building Blocks on forward props and noisy sources
6  */
7 
8 #ifndef __inline_noisy_building_blocks_h__
9 #define __inline_noisy_building_blocks_h__
10 
11 #include "chromabase.h"
13 #include "io/qprop_io.h"
14 
15 namespace Chroma
16 {
17  /*! \ingroup inlinehadron */
18  namespace InlineNoisyBuildingBlocksEnv
19  {
20  extern const std::string name;
21  bool registerAll();
22  }
23 
24  //! Parameter structure
25  /*! \ingroup inlinehadron */
27  {
29  InlineNoisyBuildingBlocksParams(XMLReader& xml_in, const std::string& path);
30  void write(XMLWriter& xml_out, const std::string& path);
31 
32  unsigned long frequency;
33 
34  //! Parameters
35  struct Param_t
36  {
37  bool use_sink_offset; /*!< should insertion origin be sink_mom */
38  int mom2_max; /*!< (mom)^2 <= mom2_max */
39  int links_max; /*!< maximum number of links */
40  bool canonical; /*!< True if mom in BB filenames is canonicalized */
41  bool time_reverse; /*!< Time reverse the building blocks */
42  GroupXML_t cfs; /*!< Fermion state */
43  } param;
44 
45  //! Propagators
46 // struct NamedObject_t
47 // {
48 // std::string BkwdPropId; // backward propagator
49 // std::string BkwdPropG5Format; // backward propagators Gamma5 Format
50 // int GammaInsertion; // second gamma insertion
51 // std::string Flavor; // Flavor id - values like U, D, S, C, B, T
52 // std::string BBFileNamePattern; // BB output file name pattern
53 // };
54 
55  //! BB output
56  struct BB_out_t
57  {
59  std::string GaugeId; // input forward prop
60  std::string FrwdPropId; // input forward prop
61 // multi1d<NamedObject_t> BkwdProps;
62  std::string NoisySrcId; // input noisy source
63  std::string NoisySrcG5Format; // noisy source Gamma5 Format
64  int GammaInsertion; // second gamma insertion
65  std::string Flavor; // Flavor id - values like U, D, S, C, B, T
66  std::string BBFileNamePattern; // BB output file name pattern
67  } bb;
68 
69  std::string xml_file; // Alternate XML file pattern
70  };
71 
72 
73  //! Inline measurement of noisy building blocks
74  /*! \ingroup inlinehadron */
76  {
77  public:
81 
82  unsigned long getFrequency(void) const {return params.frequency;}
83 
84  //! Do the measurement
85  void operator()(const unsigned long update_no,
86  XMLWriter& xml_out);
87 
88  protected:
89  //! Do the measurement
90  void func(const unsigned long update_no,
91  XMLWriter& xml_out);
92 
93  private:
95  };
96 
97 }
98 
99 #endif
Abstract inline measurements.
Primary include file for CHROMA library code.
Inline measurement of noisy building blocks.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
InlineNoisyBuildingBlocks(const InlineNoisyBuildingBlocksParams &p)
unsigned long getFrequency(void) const
Tell me how often I should measure this beastie.
InlineNoisyBuildingBlocks(const InlineNoisyBuildingBlocks &p)
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Routines associated with Chroma propagator IO.
Hold group xml and type id.
struct Chroma::InlineNoisyBuildingBlocksParams::Param_t param
void write(XMLWriter &xml_out, const std::string &path)
struct Chroma::InlineNoisyBuildingBlocksParams::BB_out_t bb