/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
PhysicsTools/NanoAOD/plugins/rntuple/EventStringOutputFields.cc
24 строки
832 B
Shahzad Malik Muzaffar
Backport RNTuple NanoAOD output module from ROOT6 branch in to separate plugin
15 май 2023, 12:25
15 май 2023, 12:25
f9d768d
Код
Авторство
О чём код?
#include "FWCore/Framework/interface/EventForOutput.h" #include "EventStringOutputFields.h" void EventStringOutputFields::registerToken(const edm::EDGetToken &token) { m_tokens.push_back(token); } void EventStringOutputFields::createFields(RNTupleModel &model) { m_evstrings = RNTupleFieldPtr<std::vector<std::string>>("EventStrings", "", model); } void EventStringOutputFields::fill(const edm::EventForOutput &iEvent) { std::vector<std::string> evstrings; if (m_lastLumi != iEvent.id().luminosityBlock()) { edm::Handle<std::string> handle; for (const auto &t : m_tokens) { iEvent.getByToken(t, handle); const std::string &evstr = *handle; if (!evstr.empty()) { evstrings.push_back(evstr); } } m_lastLumi = iEvent.id().luminosityBlock(); } m_evstrings.fill(evstrings); }