25{
26 log<<MSG::DEBUG<<
"TileWienerFilterWeights::loadWeights"<<
endmsg;
27
28 m_weights = std::make_unique<TileWienerFilterWeightsStruct>();
29
30
33
35
36 std::string file_name_gn =
"wiener_General_mu"+std::to_string(
m_Luminosity)+
".dat";
38 std::ifstream file_gn(file_path_gn.c_str());
39 std::string line_gn;
40
41 if (file_gn.is_open()) {
42 log<<MSG::DEBUG<<file_name_gn<<
" opened"<<
endmsg;
43
45
46 while (std::getline(file_gn, line_gn)) {
47
48 if (line_gn.empty() || line_gn[0] == '#') continue;
49
50
51 std::istringstream iss(line_gn);
54 if (partition > -1 && partition < 4 && channel > -1 && channel < 48) {
55 for (
int i=0;
i<8;
i++) {
57 }
58 }
59 }
60
61 file_gn.close();
62 } else {
63 log<<MSG::FATAL<<file_name_gn<<
" not found"<<
endmsg;
64 return;
65 }
67
69
70 std::string file_name_op =
"wiener_Optimal_mu"+std::to_string(
m_Luminosity)+
".dat";
72 std::ifstream file_op(file_path_op.c_str());
73 std::string line_op;
74
75 if (file_op.is_open()) {
76 log<<MSG::DEBUG<<file_name_op<<
" opened"<<
endmsg;
77
78 int bcidIndex = 0;
79
80 while (std::getline(file_op, line_op)) {
81
82 if (line_op.empty() || line_op[0] == '#') continue;
83
84
85 std::istringstream iss(line_op);
86 for (
int i=0;
i<8;
i++) {
88 }
89 bcidIndex++;
90 }
91
92 file_op.close();
93 } else {
94 log<<MSG::FATAL<<file_name_op<<
" not found"<<
endmsg;
95 return;
96 }
98
100 log<<MSG::DEBUG<<
" WienerFilter Weights loaded"<<
endmsg;
101}
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
std::unique_ptr< TileWienerFilterWeightsStruct > m_weights