33 for (
const auto& producer_tag : conf.
getParameter<std::vector<edm::InputTag>>(
"pfProducers")) {
35 prod->consumes<
T>(
edm::InputTag(producer_tag.label(), producer_tag.instance(), producer_tag.process())));
43 auto out = std::make_unique<T>();
55 for (
auto& egobj : *
out) {
58 egobj.setEGRef(newref->second);
66 for (std::size_t ix = 0; ix <
out->size(); ix++) {
73 out->insert(
out->end(),
in->begin(),
in->end());
80 for (
int bx =
in->getFirstBX();
bx <=
in->getLastBX();
bx++) {
81 for (
auto egee_itr =
in->begin(
bx); egee_itr !=
in->end(
bx); egee_itr++) {
82 out->push_back(
bx, *egee_itr);
94 std::vector<InstanceMerger<l1t::TkElectronCollection>>
tkEleMerger;
95 std::vector<InstanceMerger<l1t::TkEmCollection>>
tkEmMerger;
96 std::vector<InstanceMerger<BXVector<l1t::EGamma>>>
tkEGMerger;
100 for (
const auto&
config : conf.
getParameter<std::vector<edm::ParameterSet>>(
"tkEgs")) {
103 for (
const auto&
config : conf.
getParameter<std::vector<edm::ParameterSet>>(
"tkElectrons")) {
106 for (
const auto&
config : conf.
getParameter<std::vector<edm::ParameterSet>>(
"tkEms")) {
116 egMerger.produce(
iEvent, refmapper);
118 eleMerger.produce(
iEvent, refmapper);
120 emMerger.produce(
iEvent, refmapper);
T getParameter(std::string const &) const
std::vector< InstanceMerger< BXVector< l1t::EGamma > > > tkEGMerger
void produce(edm::Event &iEvent, RefRemapper &refRemapper) const
InstanceMerger(L1TEGMultiMerger *prod, const edm::ParameterSet &conf)
std::vector< InstanceMerger< l1t::TkEmCollection > > tkEmMerger
std::map< edm::Ref< BXVector< l1t::EGamma > >, edm::Ref< BXVector< l1t::EGamma > > > old2newRefMap
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
void populate(std::unique_ptr< TT > &out, const edm::Handle< TT > &in, RefRemapper &refRemapper) const
std::vector< InstanceMerger< l1t::TkElectronCollection > > tkEleMerger
L1TEGMultiMerger(const edm::ParameterSet &)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
#define DEFINE_FWK_MODULE(type)
std::vector< edm::EDGetTokenT< T > > tokens_
std::string instanceLabel_
void remapRefs(edm::Event &iEvent, std::unique_ptr< TT > &out, RefRemapper &refRemapper) const
void populate(std::unique_ptr< BXVector< l1t::EGamma >> &out, const edm::Handle< BXVector< l1t::EGamma >> &in, RefRemapper &refRemapper) const
BXVector< edm::Ref< BXVector< l1t::EGamma > > > oldRefs
~L1TEGMultiMerger() override
void push_back(int bx, T object)
void remapRefs(edm::Event &iEvent, std::unique_ptr< BXVector< l1t::EGamma >> &out, RefRemapper &refRemapper) const