42 std::string InputFileSignalPDF,
43 std::string InputFileNoise)
46 stream.open(InputFileName.c_str());
48 B2ERROR(
"openFile: " << InputFileName <<
" *** failed to open");
51 std::ifstream stream1;
52 stream1.open(InputFileSignalPDF.c_str());
54 B2ERROR(
"openFile: " << InputFileSignalPDF <<
" *** failed to open");
58 std::ifstream stream2;
59 stream2.open(InputFileNoise.c_str());
61 B2ERROR(
"openFile: " << InputFileNoise <<
" *** failed to open");
70 std::vector<int> FPGAversion;
71 std::vector<int> TCId;
72 std::vector<int> FAMId;
73 std::vector<int> ChannelId;
74 std::vector<int> TEreconstruction;
75 std::vector<int> Threshold;
76 std::vector<double> Conversionfactor;
77 std::vector<int> Toffset;
78 std::vector<int> Wavemean;
79 std::vector<int> Wavesigma;
84 TEreconstruction.clear();
86 Conversionfactor.clear();
91 FPGAversion.resize(624, 0);
94 ChannelId.resize(624, 0);
95 TEreconstruction.resize(624, 0);
96 Threshold.resize(624, 0);
97 Conversionfactor.resize(624, 0);
98 Toffset.resize(624, 0);
100 Wavemean.resize(624, 0);
101 Wavesigma.resize(624, 0);
104 std::vector<std::vector<double> >
SignalPDF;
106 std::vector<std::vector<double> > NoiseCovarianceMatrix;
107 NoiseCovarianceMatrix.clear();
108 SignalPDF.resize(624, std::vector<double>(8, 0));
109 NoiseCovarianceMatrix.resize(624, std::vector<double>(78, 0));
112 while (!stream.eof()) {
116 >> TEreconstruction[Id]
118 >> Conversionfactor[Id]
134 while (!stream1.eof()) {
147 while (!stream2.eof()) {
148 stream2 >> NoiseCovarianceMatrix[Id][line];
160 for (
int iTCId = 0; iTCId < 624; iTCId++) {
165 TEreconstruction[iTCId],
166 Conversionfactor[iTCId],
172 NoiseCovarianceMatrix[iTCId]
181 B2RESULT(
"FAM parameters are imported to database.");
255 std::ifstream stream;
256 stream.open(InputFileName.c_str());
258 B2ERROR(
"openFile: " << InputFileName <<
" *** failed to open");
263 std::vector<string> v_par_name;
264 std::vector<double> v_par_value;
267 while (getline(stream, str_line)) {
268 if (str_line.find(
"#")) {
269 std::stringstream sss;
274 if (sscanf(sss.str().data(),
276 &tmp_id, tmp_name, &tmp_value) == 3) {
277 string str_tmp_name = string(tmp_name);
278 v_par_name.push_back(str_tmp_name);
279 v_par_value.push_back(tmp_value);
286 B2INFO(
"[TrgEclDatabaseImporter] The number of parameters in "
294 etmpara->setnpar(cnt_par);
296 for (
int iii = 0; iii < cnt_par; iii++) {
297 etmpara->setparMap(v_par_name[iii], v_par_value[iii]);
305 B2RESULT(
"ETM Parameters are imported to database.");