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

added esConsumes to modules in RecoLocalCalo/Castor #30641

Merged
merged 1 commit into from Jul 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions RecoLocalCalo/Castor/src/CastorTowerProducer.cc
Expand Up @@ -31,6 +31,7 @@
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "DataFormats/Math/interface/Point3D.h"

// Castor Object include
Expand Down Expand Up @@ -66,6 +67,7 @@ class CastorTowerProducer : public edm::stream::EDProducer<> {
typedef std::vector<reco::CastorTower> CastorTowerCollection;
typedef edm::RefVector<CastorRecHitCollection> CastorRecHitRefVector;
edm::EDGetTokenT<CastorRecHitCollection> tok_input_;
edm::ESGetToken<CastorChannelQuality, CastorChannelQualityRcd> tok_channelQuality_;
double towercut_;
double mintime_;
double maxtime_;
Expand All @@ -88,6 +90,7 @@ CastorTowerProducer::CastorTowerProducer(const edm::ParameterSet& iConfig)
mintime_(iConfig.getParameter<double>("mintime")),
maxtime_(iConfig.getParameter<double>("maxtime")) {
tok_input_ = consumes<CastorRecHitCollection>(iConfig.getParameter<std::string>("inputprocess"));
tok_channelQuality_ = esConsumes<CastorChannelQuality, CastorChannelQualityRcd>();
//register your products
produces<CastorTowerCollection>();
//now do what ever other initialization is needed
Expand Down Expand Up @@ -146,8 +149,7 @@ void CastorTowerProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSe
}

// retrieve the channel quality lists from database
edm::ESHandle<CastorChannelQuality> p;
iSetup.get<CastorChannelQualityRcd>().get(p);
edm::ESHandle<CastorChannelQuality> p = iSetup.getHandle(tok_channelQuality_);
std::vector<DetId> channels = p->getAllChannels();

// loop over rechits to build castortowerarray[4][16] and castorusedrechits[16]
Expand Down