template<typename Object, typename Collection = std::vector<Object>>
class StringBranchHelper< Object, Collection >
Definition at line 127 of file StringBasedNTupler.h.
template<typename Object , typename Collection = std::vector<Object>>
Definition at line 132 of file StringBasedNTupler.h.
References TreeBranch::className(), TreeBranch::expr(), edm::HandleBase::failedToGet(), edm::Event::getByLabel(), i, edm::EventBase::isRealData(), LogDebug, TreeBranch::order(), TreeBranch::selection(), corrVsCorr::selection, TreeBranch::src(), and StringBranchHelper< Object, Collection >::value_.
134 const float defaultValue = 0.;
146 value_.reset(
new std::vector<float>());
152 value_.reset(
new std::vector<float>());
153 value_->reserve(oH->size());
161 uint i_end=oH->size();
166 std::vector<const Object*> copyToSort(oH->size());
167 for (uint
i=0;
i!=i_end;++
i) copyToSort[
i]= &(*oH)[
i];
170 for (uint
i=0;
i!=i_end;++
i) {
173 if (selection && !((*selection)(*(copyToSort)[
i])))
continue;
174 value_->push_back((expr)(*(copyToSort)[i]));
176 LogDebug(
"StringBranchHelper")<<
"with sorting. could not evaluate expression: "<<B.
expr()<<
" on class: "<<B.
className();
177 value_->push_back(defaultValue);
183 for (uint i=0;i!=i_end;++
i){
186 if (selection && !((*selection)((*oH)[i])))
continue;
187 value_->push_back((expr)((*oH)[i]));
189 LogDebug(
"StringBranchHelper")<<
"could not evaluate expression: "<<B.
expr()<<
" on class: "<<B.
className();
190 value_->push_back(defaultValue);
const std::string & selection() const
const std::string & order() const
const edm::InputTag & src() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const std::string & className() const
const std::string & expr() const