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

DQM: migrate modules to esConsumes #34208

Merged
merged 9 commits into from
Jun 24, 2021
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
2 changes: 1 addition & 1 deletion DQM/EcalPreshowerMonitorModule/interface/ESDaqInfoTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ESDaqInfoTask : public edm::EDAnalyzer {

private:
DQMStore* dqmStore_;

edm::ESGetToken<RunInfo, RunInfoRcd> runInfoToken_;
std::string prefixME_;

bool mergeRuns_;
Expand Down
1 change: 1 addition & 0 deletions DQM/EcalPreshowerMonitorModule/interface/ESTimingTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ESTimingTask : public DQMEDAnalyzer {
MonitorElement *hTiming_[2][2];
MonitorElement *h2DTiming_;

edm::ESGetToken<ESGain, ESGainRcd> esgainToken_;
edm::ESHandle<ESGain> esgain_;

TF1 *fit_;
Expand Down
5 changes: 2 additions & 3 deletions DQM/EcalPreshowerMonitorModule/src/ESDaqInfoTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using namespace std;

ESDaqInfoTask::ESDaqInfoTask(const ParameterSet& ps) {
dqmStore_ = Service<DQMStore>().operator->();

runInfoToken_ = esConsumes<edm::Transition::BeginLuminosityBlock>();
prefixME_ = ps.getUntrackedParameter<string>("prefixME", "");

mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
Expand Down Expand Up @@ -117,8 +117,7 @@ void ESDaqInfoTask::beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock,
}

if (auto runInfoRec = iSetup.tryToGet<RunInfoRcd>()) {
edm::ESHandle<RunInfo> sumFED;
runInfoRec->get(sumFED);
const auto& sumFED = runInfoRec->getHandle(runInfoToken_);

std::vector<int> FedsInIds = sumFED->m_fed_in;

Expand Down
5 changes: 2 additions & 3 deletions DQM/EcalPreshowerMonitorModule/src/ESTimingTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ double fitf(double* x, double* par) {
ESTimingTask::ESTimingTask(const edm::ParameterSet& ps) {
digilabel_ = consumes<ESDigiCollection>(ps.getParameter<InputTag>("DigiLabel"));
prefixME_ = ps.getUntrackedParameter<string>("prefixME", "EcalPreshower");

esgainToken_ = esConsumes();
eCount_ = 0;

fit_ = new TF1("fitShape", fitf, -200, 200, 4);
Expand Down Expand Up @@ -171,8 +171,7 @@ void ESTimingTask::analyze(const edm::Event& e, const edm::EventSetup& iSetup) {
}

void ESTimingTask::set(const edm::EventSetup& es) {
es.get<ESGainRcd>().get(esgain_);
const ESGain* gain = esgain_.product();
const ESGain* gain = &es.getData(esgainToken_);

int ESGain = (int)gain->getESGain();

Expand Down
1 change: 1 addition & 0 deletions DQM/GEM/interface/GEMDQMBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ class GEMDQMBase : public DQMEDAnalyzer {
std::string log_category_;

const GEMGeometry *GEMGeometry_;
edm::ESGetToken<GEMGeometry, MuonGeometryRecord> geomToken_;

std::vector<GEMChamber> gemChambers_;

Expand Down
8 changes: 4 additions & 4 deletions DQM/GEM/src/GEMDQMBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using namespace std;
using namespace edm;

GEMDQMBase::GEMDQMBase(const edm::ParameterSet& cfg) {
GEMDQMBase::GEMDQMBase(const edm::ParameterSet& cfg) : geomToken_(esConsumes<edm::Transition::BeginRun>()) {
log_category_ = cfg.getUntrackedParameter<std::string>("logCategory");

nNumEtaPartitionGE0_ = 0;
Expand All @@ -15,9 +15,9 @@ GEMDQMBase::GEMDQMBase(const edm::ParameterSet& cfg) {
int GEMDQMBase::initGeometry(edm::EventSetup const& iSetup) {
GEMGeometry_ = nullptr;
try {
edm::ESHandle<GEMGeometry> hGeom;
iSetup.get<MuonGeometryRecord>().get(hGeom);
GEMGeometry_ = &*hGeom;
//edm::ESHandle<GEMGeometry> hGeom;
//iSetup.get<MuonGeometryRecord>().get(hGeom);
GEMGeometry_ = &iSetup.getData(geomToken_);
} catch (edm::eventsetup::NoProxyException<GEMGeometry>& e) {
edm::LogError(log_category_) << "+++ Error : GEM geometry is unavailable on event loop. +++\n";
return -1;
Expand Down
11 changes: 10 additions & 1 deletion DQM/L1TMonitor/interface/L1GtHwValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ class L1TcsWord;
class L1GtTriggerMenu;
class L1GtPrescaleFactors;
class L1GtTriggerMask;

class L1GtPrescaleFactorsTechTrigRcd;
class L1GtPrescaleFactorsAlgoTrigRcd;
class L1GtTriggerMenuRcd;
class L1GtTriggerMaskTechTrigRcd;
class L1GtTriggerMaskAlgoTrigRcd;
// class declaration

class L1GtHwValidation : public DQMEDAnalyzer {
Expand Down Expand Up @@ -267,6 +271,11 @@ class L1GtHwValidation : public DQMEDAnalyzer {
edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> m_l1GtEmulDaqInputToken_;
edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> m_l1GtDataEvmInputToken_;
edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> m_l1GtEmulEvmInputToken_;
edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd> l1gtPrescaleTechToken_;
edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd> l1gtPrescaleAlgoToken_;
edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> l1gtTrigmenuToken_;
edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd> l1gtTrigmaskTechToken_;
edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd> l1gtTrigmaskAlgoToken_;
};

#endif /*DQM_L1TMonitor_L1GtHwValidation_h*/
9 changes: 9 additions & 0 deletions DQM/L1TMonitor/interface/L1TBPTX.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ class RateBuffer {
std::map<std::pair<int, int>, double> m_lsTechRate;
};

class L1GtTriggerMenu;
class L1GtTriggerMenuRcd;
class L1GtPrescaleFactors;
class L1GtPrescaleFactorsAlgoTrigRcd;
class L1GtPrescaleFactorsTechTrigRcd;

class L1TBPTX : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
public:
enum BeamMode {
Expand Down Expand Up @@ -173,6 +179,9 @@ class L1TBPTX : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
edm::EDGetTokenT<Level1TriggerScalersCollection> m_scalersSource; // Where to get L1 Scalers
edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> m_l1GtEvmSource;
edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> m_l1GtDataDaqInputTag;
edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> l1gtMenuToken_;
edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd> l1GtPfAlgoToken_;
edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd> l1GtPfTechToken_;
};

#endif
2 changes: 2 additions & 0 deletions DQM/L1TMonitor/interface/L1TCSCTF.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ class L1TCSCTF : public DQMEDAnalyzer {
edm::EDGetTokenT<L1CSCTrackCollection> tracksToken_;
edm::EDGetTokenT<CSCTriggerContainer<csctf::TrackStub> > dtStubsToken_;
edm::EDGetTokenT<L1CSCTrackCollection> mbtracksToken_;
edm::ESGetToken<L1MuTriggerScales, L1MuTriggerScalesRcd> l1muTscalesToken_;
edm::ESGetToken<L1MuTriggerPtScale, L1MuTriggerPtScaleRcd> ptscalesToken_;
};

#endif
6 changes: 6 additions & 0 deletions DQM/L1TMonitor/interface/L1TGMT.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
//
// class decleration
//
class L1MuTriggerScales;
class L1MuTriggerScalesRcd;
class L1MuTriggerPtScale;
class L1MuTriggerPtScaleRcd;

class L1TGMT : public DQMEDAnalyzer {
public:
Expand Down Expand Up @@ -99,6 +103,8 @@ class L1TGMT : public DQMEDAnalyzer {
const bool verbose_;
std::ofstream logFile_;
const edm::EDGetTokenT<L1MuGMTReadoutCollection> gmtSource_;
edm::ESGetToken<L1MuTriggerScales, L1MuTriggerScalesRcd> l1muTrigscaleToken_;
edm::ESGetToken<L1MuTriggerPtScale, L1MuTriggerPtScaleRcd> l1TrigptscaleToken_;

int bxnum_old_; // bx of previous event
int obnum_old_; // orbit of previous event
Expand Down
1 change: 1 addition & 0 deletions DQM/L1TMonitor/interface/L1TGT.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class L1TGT : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {

/// input tag for L1 GT EVM readout record
edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> gtEvmSource_;
edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> l1gtTrigmenuToken_;

/// switches to choose the running of various methods
bool m_runInEventLoop;
Expand Down
1 change: 1 addition & 0 deletions DQM/L1TMonitor/interface/L1TRPCTPG.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class L1TRPCTPG : public DQMEDAnalyzer {
edm::EDGetTokenT<RPCDigiCollection> rpctpgSource_token_;
edm::InputTag rpctfSource_;
edm::EDGetTokenT<L1MuGMTReadoutCollection> rpctfSource_token_;
edm::ESGetToken<RPCGeometry, MuonGeometryRecord> rpcgeomToken_;
};

#endif
6 changes: 5 additions & 1 deletion DQM/L1TMonitor/interface/L1TdeRCT.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"

class RunInfoRcd;
class RunInfo;
// Trigger Headers
//
// class declaration
Expand All @@ -63,7 +65,7 @@ class L1TdeRCT : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<l1tderct::Emp
std::shared_ptr<l1tderct::Empty> globalBeginLuminosityBlock(const edm::LuminosityBlock&,
const edm::EventSetup&) const override;
void globalEndLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final {}
void readFEDVector(MonitorElement*, const edm::EventSetup&) const;
void readFEDVector(MonitorElement*, const edm::EventSetup&, const bool isLumitransition = true) const;

private:
// ----------member data ---------------------------
Expand Down Expand Up @@ -265,6 +267,8 @@ class L1TdeRCT : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<l1tderct::Emp
edm::EDGetTokenT<EcalTrigPrimDigiCollection> ecalTPGData_;
edm::EDGetTokenT<HcalTrigPrimDigiCollection> hcalTPGData_;
edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> gtDigisLabel_;
edm::ESGetToken<RunInfo, RunInfoRcd> runInfoToken_;
edm::ESGetToken<RunInfo, RunInfoRcd> runInfolumiToken_;
std::string gtEGAlgoName_; // name of algo to determine EG trigger threshold
int doubleThreshold_; // value of ET at which to make 2-D eff plot

Expand Down
25 changes: 10 additions & 15 deletions DQM/L1TMonitor/src/L1GtHwValidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ L1GtHwValidation::L1GtHwValidation(const edm::ParameterSet& paramSet)
consumes<L1GlobalTriggerEvmReadoutRecord>(paramSet.getParameter<edm::InputTag>("L1GtDataEvmInputTag"));
m_l1GtEmulEvmInputToken_ =
consumes<L1GlobalTriggerEvmReadoutRecord>(paramSet.getParameter<edm::InputTag>("L1GtEmulEvmInputTag"));
l1gtPrescaleTechToken_ = esConsumes<edm::Transition::BeginRun>();
l1gtPrescaleAlgoToken_ = esConsumes<edm::Transition::BeginRun>();
l1gtTrigmenuToken_ = esConsumes<edm::Transition::BeginRun>();
l1gtTrigmaskTechToken_ = esConsumes<edm::Transition::BeginRun>();
l1gtTrigmaskAlgoToken_ = esConsumes<edm::Transition::BeginRun>();
}

// destructor
Expand Down Expand Up @@ -652,9 +657,7 @@ void L1GtHwValidation::bookHistograms(DQMStore::IBooker& ibooker,
unsigned long long l1GtMenuCacheID = evSetup.get<L1GtTriggerMenuRcd>().cacheIdentifier();

if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
edm::ESHandle<L1GtTriggerMenu> l1GtMenu;
evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu);
m_l1GtMenu = l1GtMenu.product();
m_l1GtMenu = &evSetup.getData(l1gtTrigmenuToken_);

// compute the list of algorithms excluded from the computing of the agreement flag
m_excludedAlgoList.clear();
Expand Down Expand Up @@ -752,9 +755,7 @@ void L1GtHwValidation::bookHistograms(DQMStore::IBooker& ibooker,
unsigned long long l1GtPfAlgoCacheID = evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().cacheIdentifier();

if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
edm::ESHandle<L1GtPrescaleFactors> l1GtPfAlgo;
evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
m_l1GtPfAlgo = l1GtPfAlgo.product();
m_l1GtPfAlgo = &evSetup.getData(l1gtPrescaleAlgoToken_);

m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors());

Expand All @@ -764,9 +765,7 @@ void L1GtHwValidation::bookHistograms(DQMStore::IBooker& ibooker,
unsigned long long l1GtPfTechCacheID = evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().cacheIdentifier();

if (m_l1GtPfTechCacheID != l1GtPfTechCacheID) {
edm::ESHandle<L1GtPrescaleFactors> l1GtPfTech;
evSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech);
m_l1GtPfTech = l1GtPfTech.product();
m_l1GtPfTech = &evSetup.getData(l1gtPrescaleTechToken_);

m_prescaleFactorsTechTrig = &(m_l1GtPfTech->gtPrescaleFactors());

Expand All @@ -779,9 +778,7 @@ void L1GtHwValidation::bookHistograms(DQMStore::IBooker& ibooker,
unsigned long long l1GtTmAlgoCacheID = evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier();

if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
edm::ESHandle<L1GtTriggerMask> l1GtTmAlgo;
evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().get(l1GtTmAlgo);
m_l1GtTmAlgo = l1GtTmAlgo.product();
m_l1GtTmAlgo = &evSetup.getData(l1gtTrigmaskAlgoToken_);

m_triggerMaskAlgoTrig = m_l1GtTmAlgo->gtTriggerMask();

Expand All @@ -791,9 +788,7 @@ void L1GtHwValidation::bookHistograms(DQMStore::IBooker& ibooker,
unsigned long long l1GtTmTechCacheID = evSetup.get<L1GtTriggerMaskTechTrigRcd>().cacheIdentifier();

if (m_l1GtTmTechCacheID != l1GtTmTechCacheID) {
edm::ESHandle<L1GtTriggerMask> l1GtTmTech;
evSetup.get<L1GtTriggerMaskTechTrigRcd>().get(l1GtTmTech);
m_l1GtTmTech = l1GtTmTech.product();
m_l1GtTmTech = &evSetup.getData(l1gtTrigmaskTechToken_);

m_triggerMaskTechTrig = m_l1GtTmTech->gtTriggerMask();

Expand Down
14 changes: 6 additions & 8 deletions DQM/L1TMonitor/src/L1TBPTX.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ L1TBPTX::L1TBPTX(const ParameterSet& pset) {
m_scalersSource = consumes<Level1TriggerScalersCollection>(pset.getParameter<InputTag>("inputTagScalersResults"));
m_l1GtDataDaqInputTag = consumes<L1GlobalTriggerReadoutRecord>(pset.getParameter<InputTag>("inputTagL1GtDataDaq"));
m_l1GtEvmSource = consumes<L1GlobalTriggerEvmReadoutRecord>(pset.getParameter<InputTag>("inputTagtEvmSource"));
l1gtMenuToken_ = esConsumes<edm::Transition::BeginRun>();
l1GtPfAlgoToken_ = esConsumes<edm::Transition::BeginRun>();
l1GtPfTechToken_ = esConsumes<edm::Transition::BeginRun>();
m_verbose = pset.getUntrackedParameter<bool>("verbose", false);
// m_refPrescaleSet = pset.getParameter <int> ("refPrescaleSet");

Expand Down Expand Up @@ -82,9 +85,7 @@ void L1TBPTX::bookHistograms(DQMStore::IBooker& ibooker, const edm::Run& iRun, c
m_currentLS = 0;

// Getting Trigger menu from GT
ESHandle<L1GtTriggerMenu> menuRcd;
iSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
const L1GtTriggerMenu* menu = menuRcd.product();
const L1GtTriggerMenu* menu = &iSetup.getData(l1gtMenuToken_);

// Filling Alias-Bit Map
for (CItAlgo algo = menu->gtAlgorithmAliasMap().begin(); algo != menu->gtAlgorithmAliasMap().end(); ++algo) {
Expand Down Expand Up @@ -185,11 +186,8 @@ void L1TBPTX::bookHistograms(DQMStore::IBooker& ibooker, const edm::Run& iRun, c

//_____________________________________________________________________
// Getting the prescale columns definition for this run
ESHandle<L1GtPrescaleFactors> l1GtPfAlgo;
ESHandle<L1GtPrescaleFactors> l1GtPfTech;

iSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
iSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech);
const auto& l1GtPfAlgo = iSetup.getHandle(l1GtPfAlgoToken_);
const auto& l1GtPfTech = iSetup.getHandle(l1GtPfTechToken_);

if (l1GtPfAlgo.isValid()) {
const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();
Expand Down
17 changes: 8 additions & 9 deletions DQM/L1TMonitor/src/L1TCSCTF.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ L1TCSCTF::L1TCSCTF(const ParameterSet& ps)
lctProducer(ps.getParameter<InputTag>("lctProducer")),
trackProducer(ps.getParameter<InputTag>("trackProducer")),
statusProducer(ps.getParameter<InputTag>("statusProducer")),
mbProducer(ps.getParameter<InputTag>("mbProducer")) {
mbProducer(ps.getParameter<InputTag>("mbProducer")),
l1muTscalesToken_(esConsumes()),
ptscalesToken_(esConsumes()) {
// verbosity switch
verbose_ = ps.getUntrackedParameter<bool>("verbose", false);

Expand Down Expand Up @@ -653,12 +655,9 @@ void L1TCSCTF::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::
void L1TCSCTF::analyze(const Event& e, const EventSetup& c) {
if (c.get<L1MuTriggerScalesRcd>().cacheIdentifier() != m_scalesCacheID ||
c.get<L1MuTriggerPtScaleRcd>().cacheIdentifier() != m_ptScaleCacheID) {
edm::ESHandle<L1MuTriggerScales> scales;
c.get<L1MuTriggerScalesRcd>().get(scales);
ts = scales.product();
edm::ESHandle<L1MuTriggerPtScale> ptscales;
c.get<L1MuTriggerPtScaleRcd>().get(ptscales);
tpts = ptscales.product();
ts = &c.getData(l1muTscalesToken_);
tpts = &c.getData(ptscalesToken_);

m_scalesCacheID = c.get<L1MuTriggerScalesRcd>().cacheIdentifier();
m_ptScaleCacheID = c.get<L1MuTriggerPtScaleRcd>().cacheIdentifier();

Expand Down Expand Up @@ -930,8 +929,8 @@ void L1TCSCTF::analyze(const Event& e, const EventSetup& c) {
}

if (lctProducer.label() != "null") {
edm::ESHandle<CSCGeometry> pDD;
c.get<MuonGeometryRecord>().get(pDD);
//edm::ESHandle<CSCGeometry> pDD;
//c.get<MuonGeometryRecord>().get(pDD);

edm::Handle<CSCCorrelatedLCTDigiCollection> corrlcts;
e.getByToken(corrlctsToken_, corrlcts);
Expand Down
11 changes: 4 additions & 7 deletions DQM/L1TMonitor/src/L1TGMT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ L1TGMT::L1TGMT(const ParameterSet& ps)
trsrc_old_(0) {
if (verbose_)
cout << "L1TGMT: constructor...." << endl;
l1muTrigscaleToken_ = esConsumes<edm::Transition::BeginRun>();
l1TrigptscaleToken_ = esConsumes<edm::Transition::BeginRun>();
}

L1TGMT::~L1TGMT() {}
Expand Down Expand Up @@ -239,13 +241,8 @@ double L1TGMT::phiconv_(float phi) {
void L1TGMT::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const& c) {
std::string subs[5] = {"DTTF", "RPCb", "CSCTF", "RPCf", "GMT"};

edm::ESHandle<L1MuTriggerScales> trigscales_h;
c.get<L1MuTriggerScalesRcd>().get(trigscales_h);
const L1MuTriggerScales* scales = trigscales_h.product();

edm::ESHandle<L1MuTriggerPtScale> trigptscale_h;
c.get<L1MuTriggerPtScaleRcd>().get(trigptscale_h);
const L1MuTriggerPtScale* scalept = trigptscale_h.product();
const L1MuTriggerScales* scales = &c.getData(l1muTrigscaleToken_);
const L1MuTriggerPtScale* scalept = &c.getData(l1TrigptscaleToken_);

ibooker.setCurrentFolder("L1T/L1TGMT");

Expand Down
9 changes: 5 additions & 4 deletions DQM/L1TMonitor/src/L1TGT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ L1TGT::L1TGT(const edm::ParameterSet& ps)
preGps_(0ULL),
preOrb_(0ULL) {
m_histFolder = ps.getUntrackedParameter<std::string>("HistFolder", "L1T/L1TGT");
l1gtTrigmenuToken_ = esConsumes<edm::Transition::BeginRun>();
}

L1TGT::~L1TGT() {
Expand Down Expand Up @@ -274,10 +275,10 @@ void L1TGT::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::Eve

//--------book AlgoBits/TechBits vs Bx Histogram-----------

edm::ESHandle<L1GtTriggerMenu> menuRcd;
evSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);

const L1GtTriggerMenu* menu = menuRcd.product();
//edm::ESHandle<L1GtTriggerMenu> menuRcd;
//evSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
//menuRcd.product();
const L1GtTriggerMenu* menu = &evSetup.getData(l1gtTrigmenuToken_);

h_L1AlgoBX1 = ibooker.book2D("h_L1AlgoBX1", "L1 Algo Trigger BX (algo bit 0 to 31)", 32, -0.5, 31.5, 5, -2.5, 2.5);
h_L1AlgoBX2 = ibooker.book2D("h_L1AlgoBX2", "L1 Algo Trigger BX (algo bit 32 to 63)", 32, 31.5, 63.5, 5, -2.5, 2.5);
Expand Down
Loading