-
Notifications
You must be signed in to change notification settings - Fork 2
/
measure.hpp
47 lines (39 loc) · 1.29 KB
/
measure.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* @file measure-u1.hpp
* @author Simone Romiti ([email protected])
* @brief class for the offline measurements for the U(1) gauge theory
* @version 0.1
* @date 2022-09-02
*
* @copyright Copyright (c) 2022
*
*/
#include "base_program.hpp"
#include "detDDdag_monomial.hh"
template <class Group> class measure_algo : public base_program<Group, gp::measure> {
public:
measure_algo() {}
~measure_algo() {}
void print_program_info() const {
std::cout << "## Measuring Tool for U(1) gauge theory" << std::endl;
}
void parse_input_file(const YAML::Node &nd) {
namespace in_meas = input_file_parsing::measure;
in_meas::parse_input_file(nd, (*this).pparams, (*this).sparams);
(*this).omeas = (*this).sparams;
(*this).conf_path_basename =
io::get_conf_path_basename((*this).pparams, (*this).sparams);
}
void run(const YAML::Node &nd) {
this->pre_run(nd);
const size_t istart = (*this).omeas.icounter == 0
? (*this).omeas.icounter + (*this).omeas.nstep
: (*this).omeas.icounter;
const size_t nmax =
(*this).omeas.n_meas * (*this).omeas.nstep + (*this).omeas.icounter;
for (size_t i = istart; i < nmax; i += (*this).omeas.nstep) {
this->do_omeas_i(i);
}
return;
}
};