template<typename Object, typename Collection = std::vector<Object>>
class StringBranchHelper< Object, Collection >
Definition at line 124 of file StringBasedNTupler.h.
template<typename Object , typename Collection = std::vector<Object>>
Definition at line 129 of file StringBasedNTupler.h.
130 const float defaultValue = 0.;
134 iEvent.getByLabel(
B.src(), oH);
138 if (!(
iEvent.isRealData() &&
B.className() ==
"reco::GenParticle")) {
139 edm::LogError(
"StringBranchHelper") <<
"cannot open: " <<
B.src() <<
" " <<
B.className();
141 value_ = std::make_unique<std::vector<float>>();
146 value_ = std::make_unique<std::vector<float>>();
147 value_->reserve(oH->size());
150 if (!
B.selection().empty()) {
155 uint i_end = oH->size();
157 if (!
B.order().empty()) {
160 std::vector<const Object*> copyToSort(oH->size());
161 for (
uint i = 0;
i != i_end; ++
i)
162 copyToSort[
i] = &(*oH)[
i];
165 for (
uint i = 0;
i != i_end; ++
i) {
173 <<
"with sorting. could not evaluate expression: " <<
B.expr() <<
" on class: " <<
B.className();
174 value_->push_back(defaultValue);
179 for (
uint i = 0;
i != i_end; ++
i) {
187 <<
"could not evaluate expression: " <<
B.expr() <<
" on class: " <<
B.className();
188 value_->push_back(defaultValue);
References TtFullHadDaughter::B, jets_cff::expr, edm::HandleBase::failedToGet(), mps_fire::i, iEvent, LogDebug, eventshapeDQM_cfi::order, corrVsCorr::selection, jetUpdater_cfi::sort, parallelization::uint, and StringBranchHelper< Object, Collection >::value_.