00001 // -*- C++ -*- 00002 // $Id: inline_prop_3pt_w.h,v 1.4 2008/11/19 03:33:03 kostas Exp $ 00003 /*! \file 00004 * \brief Inline measurement of stochastic 3pt functions. 00005 * 00006 * spectroscopy 00007 */ 00008 00009 #ifndef __inline_prop_3pt_h__ 00010 #define __inline_prop_3pt_h__ 00011 00012 #include "chromabase.h" 00013 #include "meas/inline/abs_inline_measurement.h" 00014 #include "io/qprop_io.h" 00015 //#include <map> 00016 00017 namespace Chroma 00018 { 00019 /*! \ingroup inlinehadron */ 00020 namespace InlineProp3ptEnv 00021 { 00022 extern const std::string name; 00023 bool registerAll(); 00024 00025 // The flavors 00026 enum Flavor {up, down, strange, charm, bottom}; 00027 00028 //! Parameter structure 00029 /*! \ingroup inlinehadron */ 00030 struct Params 00031 { 00032 Params(); 00033 Params(XMLReader& xml_in, const std::string& path); 00034 00035 unsigned long frequency; 00036 00037 struct Operator_t{ 00038 int t ; /*!< time for insersion */ 00039 multi1d<int> p ; /*!< the momentum inserted */ 00040 int gamma ; /*!< insersion operator gamma Matrix 0..15 */ 00041 Complex f ; /*!< overal factor */ 00042 } ; 00043 00044 struct Param_t 00045 { 00046 Operator_t op ; /*! the operator */ 00047 multi1d<GroupXML_t> chi ; /*! dilutions */ 00048 } param; 00049 00050 00051 struct NamedObject_t 00052 { 00053 std::string gauge_id; 00054 std::string prop_id; 00055 std::string prop3pt_id; 00056 } named_obj; 00057 00058 std::string xml_file; // Alternate XML file pattern 00059 00060 void write(XMLWriter& xml_out, const std::string& path); 00061 00062 }; 00063 00064 00065 //! Inline measurement of stochastic baryon operators 00066 /*! \ingroup inlinehadron */ 00067 class InlineMeas : public AbsInlineMeasurement{ 00068 protected: 00069 //! Do the measurement 00070 void func(const unsigned long update_no, 00071 XMLWriter& xml_out); 00072 00073 private: 00074 00075 00076 Params params; 00077 00078 public: 00079 ~InlineMeas() {} 00080 InlineMeas(const Params& p) : params(p) {} 00081 InlineMeas(const InlineMeas& p) : params(p.params) {} 00082 00083 unsigned long getFrequency(void) const {return params.frequency;} 00084 00085 //! Do the measurement 00086 void operator()(const unsigned long update_no, 00087 XMLWriter& xml_out); 00088 00089 }; 00090 00091 }; // name space InlineProp3ptEnv 00092 00093 }; 00094 00095 #endif
1.4.7