26 std::vector<PileupSummaryInfo>
const& ps,
34 std::unique_ptr<PCrossingFrame<T> >
merged_;
42 pileupTag_(ps.getParameter<
edm::
InputTag>(
"pileInputTag")),
43 collectionDM_(ps.getParameter<
std::
string>(
"collectionDM")) {
52 iEvent.getByToken(signalToken_, hcf);
54 const auto& cf = *hcf;
55 if (!cf.getPileups().empty()) {
56 throw cms::Exception(
"LogicError") <<
"Got CrossingFrame from signal with pileup content?";
59 merged_ = std::make_unique<PCrossingFrame<T> >(cf);
67 const auto& cf = *hcf;
68 if (!cf.getSignals().empty()) {
69 throw cms::Exception(
"LogicError") <<
"Got PCrossingFrame from pileup with signal content?";
72 merged_->setAllExceptSignalFrom(cf);
78 std::vector<PileupSummaryInfo>
const& ps,
81 const auto& pcf = *orphanHandle;
83 const auto bx = pcf.getBunchRange();
84 auto cf = std::make_unique<CrossingFrame<T> >(
85 bx.first,
bx.second, pcf.getBunchSpace(), pcf.getSubDet(), pcf.getMaxNbSources());
86 cf->addSignals(&(pcf.getSignals()), pcf.getEventID());
87 cf->setPileups(pcf.getPileups());
void addSignals(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
~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
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
PreMixingCrossingFrameWorker(const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
#define DEFINE_PREMIXING_WORKER(TYPE)
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const