31 std::unique_ptr<PCrossingFrame<T> >
merged_;
49 const auto& cf = *hcf;
50 if(!cf.getPileups().empty()) {
51 throw cms::Exception(
"LogicError") <<
"Got CrossingFrame from signal with pileup content?";
54 merged_ = std::make_unique<PCrossingFrame<T> >(cf);
62 const auto& cf = *hcf;
63 if(!cf.getSignals().empty()) {
64 throw cms::Exception(
"LogicError") <<
"Got PCrossingFrame from pileup with signal content?";
67 merged_->setAllExceptSignalFrom(cf);
73 const auto& pcf = *orphanHandle;
75 const auto bx = pcf.getBunchRange();
76 auto cf = std::make_unique<CrossingFrame<T> >(bx.first, bx.second, pcf.getBunchSpace(), pcf.getSubDet(), pcf.getMaxNbSources());
77 cf->addSignals(&(pcf.getSignals()), pcf.getEventID());
78 cf->setPileups(pcf.getPileups());
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.
void addSignals(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
~PreMixingCrossingFrameWorker() override=default
std::unique_ptr< PCrossingFrame< T > > merged_
void put(edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing) override
PreMixingCrossingFrameWorker(const edm::ParameterSet &ps, edm::ProducerBase &producer, edm::ConsumesCollector &&iC)
edm::EDGetTokenT< CrossingFrame< T > > signalToken_
std::string collectionDM_
void initializeEvent(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
void addPileups(PileUpEventPrincipal const &pep, edm::EventSetup const &iSetup) override
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
#define DEFINE_PREMIXING_WORKER(TYPE)