36 for (
const auto& producer_tag : conf.
getParameter<std::vector<edm::InputTag>>(
"pfProducers")) {
38 prod->consumes<
T>(
edm::InputTag(producer_tag.label(), producer_tag.instance(), producer_tag.process())));
46 auto out = std::make_unique<T>();
58 for (
auto& egobj : *
out) {
61 egobj.setEGRef(newref->second);
69 for (std::size_t ix = 0; ix <
out->size(); ix++) {
76 out->insert(
out->end(),
in->begin(),
in->end());
83 for (
int bx =
in->getFirstBX();
bx <=
in->getLastBX();
bx++) {
84 for (
auto egee_itr =
in->begin(
bx); egee_itr !=
in->end(
bx); egee_itr++) {
85 out->push_back(
bx, *egee_itr);
97 std::vector<InstanceMerger<l1t::TkElectronCollection>>
tkEleMerger;
98 std::vector<InstanceMerger<l1t::TkEmCollection>>
tkEmMerger;
99 std::vector<InstanceMerger<BXVector<l1t::EGamma>>>
tkEGMerger;
103 for (
const auto&
config : conf.
getParameter<std::vector<edm::ParameterSet>>(
"tkEgs")) {
106 for (
const auto&
config : conf.
getParameter<std::vector<edm::ParameterSet>>(
"tkElectrons")) {
109 for (
const auto&
config : conf.
getParameter<std::vector<edm::ParameterSet>>(
"tkEms")) {
119 egMerger.produce(
iEvent, refmapper);
121 eleMerger.produce(
iEvent, refmapper);
123 emMerger.produce(
iEvent, refmapper);
129 psetDesc.
add<std::vector<edm::InputTag>>(
"pfProducers");
131 desc.addVPSet(
"tkElectrons", psetDesc);
132 desc.addVPSet(
"tkEms", psetDesc);
133 desc.addVPSet(
"tkEgs", psetDesc);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
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_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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