Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup beginRun in L1Trigger #43660

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions L1Trigger/L1TCaloLayer1/plugins/L1TCaloSummary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ class L1TCaloSummary : public edm::stream::EDProducer<> {
void produce(edm::Event&, const edm::EventSetup&) override;
//void endJob() override;

void beginRun(edm::Run const&, edm::EventSetup const&) override{};

void print();

// ----------member data ---------------------------
Expand Down Expand Up @@ -305,4 +303,4 @@ typedef L1TCaloSummary<ap_ufixed<10, 10>, ap_fixed<11, 5>> L1TCaloSummaryCICADAv
typedef L1TCaloSummary<ap_uint<10>, ap_ufixed<16, 8>> L1TCaloSummaryCICADAv2;
//define type version plugins
DEFINE_FWK_MODULE(L1TCaloSummaryCICADAv1);
DEFINE_FWK_MODULE(L1TCaloSummaryCICADAv2);
DEFINE_FWK_MODULE(L1TCaloSummaryCICADAv2);
25 changes: 9 additions & 16 deletions L1Trigger/L1THGCalUtilities/plugins/CaloTruthCellsProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class CaloTruthCellsProducer : public edm::stream::EDProducer<> {
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
void beginRun(const edm::Run&, const edm::EventSetup&) override;
void produce(edm::Event&, edm::EventSetup const&) override;

std::unordered_map<uint32_t, double> makeHitMap(edm::Event const&,
Expand All @@ -47,7 +46,6 @@ class CaloTruthCellsProducer : public edm::stream::EDProducer<> {
edm::EDGetTokenT<std::vector<PCaloHit>> simHitsTokenHEfront_;
edm::EDGetTokenT<std::vector<PCaloHit>> simHitsTokenHEback_;
edm::ESGetToken<HGCalTriggerGeometryBase, CaloGeometryRecord> triggerGeomToken_;
edm::ESHandle<HGCalTriggerGeometryBase> triggerGeomHandle_;

HGCalClusteringDummyImpl dummyClustering_;
HGCalShowerShape showerShape_;
Expand All @@ -74,24 +72,19 @@ CaloTruthCellsProducer::CaloTruthCellsProducer(edm::ParameterSet const& config)

CaloTruthCellsProducer::~CaloTruthCellsProducer() {}

void CaloTruthCellsProducer::beginRun(const edm::Run& /*run*/, const edm::EventSetup& es) {
triggerGeomHandle_ = es.getHandle(triggerGeomToken_);
}

void CaloTruthCellsProducer::produce(edm::Event& event, edm::EventSetup const& setup) {
edm::Handle<CaloParticleCollection> caloParticlesHandle;
event.getByToken(caloParticlesToken_, caloParticlesHandle);
auto const& caloParticles(*caloParticlesHandle);
auto caloParticlesHandle = event.getHandle(caloParticlesToken_);
auto const& caloParticles = *caloParticlesHandle;

edm::Handle<l1t::HGCalTriggerCellBxCollection> triggerCellsHandle;
event.getByToken(triggerCellsToken_, triggerCellsHandle);
auto const& triggerCells(*triggerCellsHandle);
auto const& triggerCellsHandle = event.getHandle(triggerCellsToken_);
auto const& triggerCells = *triggerCellsHandle;

auto const& geometry(*triggerGeomHandle_);
auto const& geometry = setup.getData(triggerGeomToken_);
;

dummyClustering_.setGeometry(triggerGeomHandle_.product());
showerShape_.setGeometry(triggerGeomHandle_.product());
triggerTools_.setGeometry(triggerGeomHandle_.product());
dummyClustering_.setGeometry(&geometry);
showerShape_.setGeometry(&geometry);
triggerTools_.setGeometry(&geometry);

std::unordered_map<uint32_t, CaloParticleRef> tcToCalo;

Expand Down
5 changes: 0 additions & 5 deletions L1Trigger/L1TZDC/plugins/L1TZDCProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ class L1TZDCProducer : public edm::stream::EDProducer<> {
private:
void produce(edm::Event&, const edm::EventSetup&) override;

void beginRun(edm::Run const&, edm::EventSetup const&) override;

// ----------member data ---------------------------

// input tokens
Expand Down Expand Up @@ -157,9 +155,6 @@ void L1TZDCProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)
iEvent.emplace(etToken_, std::move(etsumsReduced));
}

// ------------ method called when starting to processes a run ------------
void L1TZDCProducer::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) {}

// ------------ method fills 'descriptions' with the allowed parameters for the module ------------
void L1TZDCProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
Expand Down