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