@@ -83,6 +83,10 @@ double AnalysisEntry::FillVariable(const Variable& var, std::vector<const Branch
8383 return result;
8484}
8585
86+ double AnalysisEntry::FillWeight (const Variable& var, std::vector<const Branch*>& br, std::vector<int >& id) {
87+ return var.GetNumberOfBranches () > 0 ? FillVariable (var, br, id) : 1 .;
88+ }
89+
8690double AnalysisEntry::FillVariable (const Variable& var, const Branch& br1, int ch1, const Branch& br2, int ch2) {
8791 Branch* br1_ptr = new Branch (std::move (br1));
8892 Branch* br2_ptr = new Branch (std::move (br2));
@@ -132,7 +136,7 @@ void AnalysisEntry::FillFromEveHeaders() {
132136 i_var++;
133137 }// variables
134138 values_.emplace_back (temp_vars);
135- weights_.emplace_back (FillVariable (var4weight_, br_vec, id_vec));
139+ weights_.emplace_back (FillWeight (var4weight_, br_vec, id_vec));
136140}
137141
138142/* *
@@ -168,7 +172,7 @@ void AnalysisEntry::FillFromOneChannalizedBranch() {
168172 i_var++;
169173 }// variables
170174 values_.emplace_back (temp_vars);
171- weights_.emplace_back (FillVariable (var4weight_, br_vec, id_vec));
175+ weights_.emplace_back (FillWeight (var4weight_, br_vec, id_vec));
172176 }// channels
173177}
174178
@@ -211,7 +215,7 @@ void AnalysisEntry::FillFromTwoChannalizedBranches() {
211215 i_var++;
212216 }// variables
213217 values_.emplace_back (temp_vars);
214- weights_.emplace_back (FillVariable (var4weight_, br_vec, id_vec));
218+ weights_.emplace_back (FillWeight (var4weight_, br_vec, id_vec));
215219 }// channels
216220}
217221
0 commit comments