Skip to content

Commit

Permalink
Merge pull request #30472 from JamminJones/fixL1TriggerRPCTrigger
Browse files Browse the repository at this point in the history
added esConsumes to  modules in L1Trigger/RPCTrigger
  • Loading branch information
cmsbuild committed Jul 7, 2020
2 parents 0bf5683 + c25d13f commit c1627bc
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 28 deletions.
19 changes: 19 additions & 0 deletions L1Trigger/RPCTrigger/interface/RPCTrigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,21 @@
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "FWCore/Utilities/interface/EDPutToken.h"
#include "FWCore/Utilities/interface/ESGetToken.h"

#include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
// Configuration via eventsetup:
#include "CondFormats/DataRecord/interface/L1RPCConfigRcd.h"
#include "CondFormats/L1TObjects/interface/L1RPCConfig.h"

#include "CondFormats/DataRecord/interface/L1RPCConeBuilderRcd.h"
#include "CondFormats/RPCObjects/interface/L1RPCConeBuilder.h"

#include "CondFormats/DataRecord/interface/L1RPCHwConfigRcd.h"
#include "CondFormats/RPCObjects/interface/L1RPCHwConfig.h"

#include "CondFormats/DataRecord/interface/L1RPCBxOrConfigRcd.h"
#include "CondFormats/L1TObjects/interface/L1RPCBxOrConfig.h"

// L1RpcTrigger specific includes
#include "L1Trigger/RPCTrigger/interface/RPCConeBuilderFromES.h"
Expand Down Expand Up @@ -77,6 +90,12 @@ class RPCTrigger : public edm::one::EDProducer<edm::one::SharedResources> {

const edm::EDPutTokenT<std::vector<RPCDigiL1Link>> m_brlLinksPutToken;
const edm::EDPutTokenT<std::vector<RPCDigiL1Link>> m_fwdLinksPutToken;
const edm::ESGetToken<L1RPCConfig, L1RPCConfigRcd> m_configToken;
const edm::ESGetToken<L1RPCConeBuilder, L1RPCConeBuilderRcd> m_coneBuilderToken;
const edm::ESGetToken<L1RPCConeDefinition, L1RPCConeDefinitionRcd> m_coneDefinitionToken;
const edm::ESGetToken<L1RPCHwConfig, L1RPCHwConfigRcd> m_hwConfigToken;
const edm::ESGetToken<L1RPCBxOrConfig, L1RPCBxOrConfigRcd> m_BxOrConfigToken;
const edm::ESGetToken<L1RPCHsbConfig, L1RPCHsbConfigRcd> m_hsbConfigToken;
};

#endif
1 change: 0 additions & 1 deletion L1Trigger/RPCTrigger/plugins/RPCConeBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "CondFormats/L1TObjects/interface/L1RPCConeDefinition.h"
#include "CondFormats/RPCObjects/interface/L1RPCConeBuilder.h"
#include "CondFormats/DataRecord/interface/L1RPCConeDefinitionRcd.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ModuleFactory.h"
#include "FWCore/Framework/interface/ESProducer.h"
#include "FWCore/Framework/interface/ModuleFactory.h"
Expand Down
40 changes: 13 additions & 27 deletions L1Trigger/RPCTrigger/plugins/RPCTrigger.cc
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#include "L1Trigger/RPCTrigger/interface/RPCTrigger.h"

// Configuration via eventsetup:
#include "CondFormats/DataRecord/interface/L1RPCConfigRcd.h"
#include "CondFormats/L1TObjects/interface/L1RPCConfig.h"

#include "CondFormats/DataRecord/interface/L1RPCConeBuilderRcd.h"
#include "CondFormats/RPCObjects/interface/L1RPCConeBuilder.h"

#include "CondFormats/DataRecord/interface/L1RPCHwConfigRcd.h"
#include "CondFormats/RPCObjects/interface/L1RPCHwConfig.h"

#include "CondFormats/DataRecord/interface/L1RPCBxOrConfigRcd.h"
#include "CondFormats/L1TObjects/interface/L1RPCBxOrConfig.h"

//#define ML_DEBUG

#include "L1Trigger/RPCTrigger/interface/MuonsGrabber.h"
Expand All @@ -31,7 +17,13 @@ RPCTrigger::RPCTrigger(const edm::ParameterSet& iConfig)
m_fwdCandPutToken{produces<std::vector<L1MuRegionalCand> >("RPCf")},

m_brlLinksPutToken{produces<std::vector<RPCDigiL1Link> >("RPCb")},
m_fwdLinksPutToken{produces<std::vector<RPCDigiL1Link> >("RPCf")} {
m_fwdLinksPutToken{produces<std::vector<RPCDigiL1Link> >("RPCf")},
m_configToken(esConsumes<L1RPCConfig, L1RPCConfigRcd>()),
m_coneBuilderToken(esConsumes<L1RPCConeBuilder, L1RPCConeBuilderRcd>()),
m_coneDefinitionToken(esConsumes<L1RPCConeDefinition, L1RPCConeDefinitionRcd>()),
m_hwConfigToken(esConsumes<L1RPCHwConfig, L1RPCHwConfigRcd>()),
m_BxOrConfigToken(esConsumes<L1RPCBxOrConfig, L1RPCBxOrConfigRcd>()),
m_hsbConfigToken(esConsumes<L1RPCHsbConfig, L1RPCHsbConfigRcd>()) {
//MuonsGrabber is a singleton
usesResource("MuonsGrabber");
}
Expand All @@ -46,8 +38,7 @@ void RPCTrigger::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
//std::cout << " New pats: " << iSetup.get<L1RPCConfigRcd>().cacheIdentifier() << std::endl ;
m_cacheID = iSetup.get<L1RPCConfigRcd>().cacheIdentifier();

edm::ESHandle<L1RPCConfig> conf;
iSetup.get<L1RPCConfigRcd>().get(conf);
edm::ESHandle<L1RPCConfig> conf = iSetup.getHandle(m_configToken);
const L1RPCConfig* rpcconf = conf.product();

m_pacManager.init(rpcconf);
Expand Down Expand Up @@ -84,20 +75,15 @@ void RPCTrigger::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
std::vector<RPCDigiL1Link> brlLinks;
std::vector<RPCDigiL1Link> fwdLinks;

edm::ESHandle<L1RPCConeBuilder> coneBuilder;
iSetup.get<L1RPCConeBuilderRcd>().get(coneBuilder);
edm::ESHandle<L1RPCConeBuilder> coneBuilder = iSetup.getHandle(m_coneBuilderToken);

edm::ESHandle<L1RPCConeDefinition> l1RPCConeDefinition;
iSetup.get<L1RPCConeDefinitionRcd>().get(l1RPCConeDefinition);
edm::ESHandle<L1RPCConeDefinition> l1RPCConeDefinition = iSetup.getHandle(m_coneDefinitionToken);

edm::ESHandle<L1RPCHwConfig> hwConfig;
iSetup.get<L1RPCHwConfigRcd>().get(hwConfig);
edm::ESHandle<L1RPCHwConfig> hwConfig = iSetup.getHandle(m_hwConfigToken);

edm::ESHandle<L1RPCBxOrConfig> bxOrConfig;
iSetup.get<L1RPCBxOrConfigRcd>().get(bxOrConfig);
edm::ESHandle<L1RPCBxOrConfig> bxOrConfig = iSetup.getHandle(m_BxOrConfigToken);

edm::ESHandle<L1RPCHsbConfig> hsbConfig;
iSetup.get<L1RPCHsbConfigRcd>().get(hsbConfig);
edm::ESHandle<L1RPCHsbConfig> hsbConfig = iSetup.getHandle(m_hsbConfigToken);

for (int iBx = -1; iBx < 2; ++iBx) {
L1RpcLogConesVec ActiveCones =
Expand Down

0 comments on commit c1627bc

Please sign in to comment.