-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.C
62 lines (50 loc) · 1.54 KB
/
main.C
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include "config.h"
#include "meson.h"
#include "jackknife.h"
int main()
{
std::vector<std::string> config;
std::vector<std::string> pion_file_list;
std::string marker="*";
std::string common_name="./data/klks_ml_0.00062/traj_*_pion_1e-4.txt";
std::string config_path="./inputs/configs.txt";
list_config( config, config_path);
list_file_name(pion_file_list, config, common_name, marker );
std::vector< std::vector<double> > pion(pion_file_list.size());
std::vector< std::vector<double> > pion_jknf(pion_file_list.size());
meson_in(pion, pion_file_list);
meson_jknf(pion, pion_jknf);
//Display
std::cout << "The pion file list contents: " << std::endl;
for (auto i=pion_file_list.begin(); i!= pion_file_list.end() ; ++i)
std::cout << *i << '\n';
std::cout << "The pion read contents: " << std::endl;
for (auto i=pion.begin(); i!= pion.end() ; ++i)
{
for(auto j=(*i).begin(); j != (*i).end(); ++j)
std::cout << *j << '\n';
std::cout << '\n' << '\n';
}
std::ofstream pion_out("pion_jknf.txt");
if (pion_out.is_open())
{
std::cout << "The pion jknf contents: " << std::endl;
for (auto i=pion_jknf.begin(); i!= pion_jknf.end() ; ++i)
{
for(auto j=(*i).begin(); j != (*i).end(); ++j)
pion_out << *j << '\t';
pion_out << '\n';
}
pion_out.close();
}
pion_out<<std::endl;
std::cout << "Configs read in are:" << std::endl;
for (auto i=config.begin(); i != config.end(); ++i)
std::cout << *i << '\n';
//std::cin.get();
return 0;
}