1 #ifndef SimGeneral_PremixingModule_PreMixingDigiSimLinkWorker_h 2 #define SimGeneral_PremixingModule_PreMixingDigiSimLinkWorker_h 15 template <
typename DigiSimLinkCollection>
31 std::unique_ptr<DigiSimLinkCollection>
merged_;
34 template <
typename DigiSimLinkCollection>
36 signalToken_(iC.consumes<DigiSimLinkCollection>(ps.getParameter<
edm::InputTag>(
"labelSig"))),
43 template <
typename DigiSimLinkCollection>
49 merged_ = std::make_unique<DigiSimLinkCollection>(*digis);
52 merged_ = std::make_unique<DigiSimLinkCollection>();
56 template <
typename DigiSimLinkCollection>
61 for(
const auto& detsetSource: *digis) {
62 auto& detsetTarget =
merged_->find_or_insert(detsetSource.detId());
63 std::copy(detsetSource.begin(), detsetSource.end(), std::back_inserter(detsetTarget));
68 template <
typename DigiSimLinkCollection>
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PreMixingDigiSimLinkWorker(const edm::ParameterSet &ps, edm::ProducerBase &producer, edm::ConsumesCollector &&iC)
~PreMixingDigiSimLinkWorker() override=default
edm::EDGetTokenT< DigiSimLinkCollection > signalToken_
void addSignals(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
void addPileups(PileUpEventPrincipal const &pep, edm::EventSetup const &iSetup) override
void initializeEvent(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
void put(edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing) override
std::string collectionDM_
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
std::unique_ptr< DigiSimLinkCollection > merged_