/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
PhysicsTools/PatAlgos/src/EfficiencyLoader.cc
25 строк
839 B
Cms Build
Clang-Format
11 июн 2019, 11:28
11 июн 2019, 11:28
c32a387
Код
Авторство
О чём код?
#include "PhysicsTools/PatAlgos/interface/EfficiencyLoader.h" #include <algorithm> using pat::helper::EfficiencyLoader; EfficiencyLoader::EfficiencyLoader(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC) { // Get the names (sorted) names_ = iConfig.getParameterNamesForType<edm::InputTag>(); std::sort(names_.begin(), names_.end()); // get the InputTags for (std::vector<std::string>::const_iterator it = names_.begin(), ed = names_.end(); it != ed; ++it) { tokens_.push_back(iC.consumes<edm::ValueMap<pat::LookupTableRecord> >(iConfig.getParameter<edm::InputTag>(*it))); } // prepare the Handles handles_.resize(names_.size()); } void EfficiencyLoader::newEvent(const edm::Event &iEvent) { for (size_t i = 0, n = names_.size(); i < n; ++i) { iEvent.getByToken(tokens_[i], handles_[i]); } }