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

L1muon offline dqm harvesting config fix #19226

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,7 +1,8 @@
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester

# RegionalMuonCands
l1tStage2BMTFEmulatorCompRatioClient = cms.EDAnalyzer("L1TStage2RatioClient",
l1tStage2BMTFEmulatorCompRatioClient = DQMEDHarvester("L1TStage2RatioClient",
monitorDir = cms.untracked.string('L1TEMU/L1TdeStage2BMTF'),
inputNum = cms.untracked.string('L1TEMU/L1TdeStage2BMTF/errorSummaryNum'),
inputDen = cms.untracked.string('L1TEMU/L1TdeStage2BMTF/errorSummaryDen'),
Expand Down
@@ -1,7 +1,8 @@
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester

# RegionalMuonCands
l1tStage2EMTFEmulatorCompRatioClient = cms.EDAnalyzer("L1TStage2RatioClient",
l1tStage2EMTFEmulatorCompRatioClient = DQMEDHarvester("L1TStage2RatioClient",
monitorDir = cms.untracked.string('L1TEMU/L1TdeStage2EMTF'),
inputNum = cms.untracked.string('L1TEMU/L1TdeStage2EMTF/errorSummaryNum'),
inputDen = cms.untracked.string('L1TEMU/L1TdeStage2EMTF/errorSummaryDen'),
Expand Down
@@ -1,7 +1,8 @@
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester

# RegionalMuonCands
l1tStage2OMTFEmulatorCompRatioClient = cms.EDAnalyzer("L1TStage2RatioClient",
l1tStage2OMTFEmulatorCompRatioClient = DQMEDHarvester("L1TStage2RatioClient",
monitorDir = cms.untracked.string('L1TEMU/L1TdeStage2OMTF'),
inputNum = cms.untracked.string('L1TEMU/L1TdeStage2OMTF/errorSummaryNum'),
inputDen = cms.untracked.string('L1TEMU/L1TdeStage2OMTF/errorSummaryDen'),
Expand Down
3 changes: 2 additions & 1 deletion DQM/L1TMonitorClient/python/L1TStage2uGMTClient_cff.py
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester

# directory path shortening
ugmtDqmDir = 'L1T/L1TStage2uGMT'
Expand All @@ -9,7 +10,7 @@
errHistDenStr = 'errorSummaryDen'

# Muons
l1tStage2uGMTOutVsuGTInRatioClient = cms.EDAnalyzer("L1TStage2RatioClient",
l1tStage2uGMTOutVsuGTInRatioClient = DQMEDHarvester("L1TStage2RatioClient",
monitorDir = cms.untracked.string(ugmtDqmDir+'/uGMToutput_vs_uGTinput'),
inputNum = cms.untracked.string(ugmtDqmDir+'/uGMToutput_vs_uGTinput/'+errHistNumStr),
inputDen = cms.untracked.string(ugmtDqmDir+'/uGMToutput_vs_uGTinput/'+errHistDenStr),
Expand Down
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester

# directories
ugmtEmuDqmDir = "L1TEMU/L1TdeStage2uGMT"
Expand All @@ -9,7 +10,7 @@
errHistDenStr = 'errorSummaryDen'

# Muons
l1tStage2uGMTEmulatorCompRatioClient = cms.EDAnalyzer("L1TStage2RatioClient",
l1tStage2uGMTEmulatorCompRatioClient = DQMEDHarvester("L1TStage2RatioClient",
monitorDir = cms.untracked.string(ugmtEmuDEDqmDir),
inputNum = cms.untracked.string(ugmtEmuDEDqmDir+'/'+errHistNumStr),
inputDen = cms.untracked.string(ugmtEmuDEDqmDir+'/'+errHistDenStr),
Expand Down
4 changes: 1 addition & 3 deletions DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py
Expand Up @@ -78,8 +78,6 @@
DQMOffline_SecondStep_PrePOGMC *
DQMMessageLoggerClientSeq )

from DQMOffline.L1Trigger.L1TriggerDqmOffline_SecondStep_cff import *

DQMHarvestCommon = cms.Sequence( dqmRefHistoRootFileGetter *
DQMMessageLoggerClientSeq *
dqmDcsInfoClient *
Expand All @@ -92,7 +90,7 @@
alcaBeamMonitorClient *
runTauEff *
dqmFastTimerServiceClient *
DQMHarvestL1Trigger
l1TriggerDqmOfflineClient
)
DQMHarvestCommonSiStripZeroBias = cms.Sequence(dqmRefHistoRootFileGetter *
DQMMessageLoggerClientSeq *
Expand Down
2 changes: 2 additions & 0 deletions DQMOffline/L1Trigger/python/L1TriggerDqmOffline_cff.py
Expand Up @@ -274,6 +274,7 @@

from Configuration.StandardSequences.Eras import eras
from DQM.L1TMonitor.L1TStage2_cff import *
from DQMOffline.L1Trigger.L1TriggerDqmOffline_SecondStep_cff import *
from DQMOffline.L1Trigger.L1TEfficiencyHarvesting_cfi import *

stage2UnpackPath = cms.Sequence(
Expand Down Expand Up @@ -354,6 +355,7 @@
Stage2l1TriggerDqmOfflineClient = cms.Sequence(
l1tStage2EmulatorMonitorClient *
l1tStage2MonitorClient *
DQMHarvestL1Trigger *
l1tEfficiencyMuons_Harvesting
)

Expand Down
26 changes: 16 additions & 10 deletions DQMOffline/L1Trigger/src/L1TEfficiency_Harvesting.cc
Expand Up @@ -39,28 +39,28 @@ L1TEfficiencyPlotHandler::L1TEfficiencyPlotHandler(const L1TEfficiencyPlotHandle

void L1TEfficiencyPlotHandler::book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) {

cout << "[L1TEfficiencyMuons_Harvesting:] Booking efficiency histo for " << m_dir << " and " << m_plotName << endl;
edm::LogInfo("L1TEfficiency_Harvesting") << "Booking efficiency histo for " << m_dir << " and " << m_plotName;

MonitorElement *num = igetter.get(m_dir+"/"+m_plotName+"Num");
MonitorElement *den = igetter.get(m_dir+"/"+m_plotName+"Den");

if (!num || !den) {
cout << "[L1TEfficiencyMuons_Harvesting:] " << (!num && !den ? "Num && Den" : !num ? "Num" : "Den") << " not gettable. Quitting booking" << endl;
edm::LogInfo("L1TEfficiency_Harvesting") << (!num && !den ? "Num && Den" : !num ? "Num" : "Den") << " not gettable. Quitting booking";
return;
}
TH1F *numH = num->getTH1F();
TH1F *denH = den->getTH1F();

if (!numH || !denH) {
cout << "[L1TEfficiencyMuons_Harvesting:] " << (!numH && !denH ? "Num && Den" : !numH ? "Num" : "Den") << " is not TH1F. Quitting booking" << endl;
edm::LogInfo("L1TEfficiency_Harvesting") << (!numH && !denH ? "Num && Den" : !numH ? "Num" : "Den") << " is not TH1F. Quitting booking";
return;
}

int nBinsNum = numH->GetNbinsX();
int nBinsDen = denH->GetNbinsX();

if (nBinsNum != nBinsDen) {
cout << "[L1TEfficiencyMuons_Harvesting:] # bins in num and den is different. Quitting booking" << endl;
edm::LogInfo("L1TEfficiency_Harvesting") << "# bins in num and den is different. Quitting booking";
return;
}

Expand Down Expand Up @@ -136,7 +136,7 @@ void L1TEfficiencyPlotHandler::computeEfficiency(DQMStore::IBooker &ibooker, DQM

if (!m_effHisto) return;

cout << "[L1TEfficiencyMuons_Harvesting:] Computing efficiency for " << m_plotName << endl;
edm::LogInfo("L1TEfficiency_Harvesting") << "Computing efficiency for " << m_plotName;

MonitorElement *num = igetter.get(m_dir+"/"+m_plotName+"Num");
MonitorElement *den = igetter.get(m_dir+"/"+m_plotName+"Den");
Expand Down Expand Up @@ -225,11 +225,13 @@ void L1TEfficiencyPlotHandler::computeEfficiency(DQMStore::IBooker &ibooker, DQM
}

//___________DQM_analyzer_class________________________________________
L1TEfficiency_Harvesting::L1TEfficiency_Harvesting(const ParameterSet & ps){
L1TEfficiency_Harvesting::L1TEfficiency_Harvesting(const ParameterSet & ps) :
m_verbose(ps.getUntrackedParameter<bool>("verbose"))
{
// Initializing Variables
if (m_verbose) {
cout << "[L1TEfficiency_Harvesting:] ____________ Storage inicialization ____________ " << endl;
cout << "[L1TEfficiency_Harvesting:] Setting up dbe folder: L1T/Efficiency" << endl;
edm::LogInfo("L1TEfficiency_Harvesting") << "____________ Storage initialization ____________ ";
edm::LogInfo("L1TEfficiency_Harvesting") << "Setting up dbe folder: L1T/Efficiency";
}
vector<ParameterSet> plotCfgs = ps.getUntrackedParameter<vector<ParameterSet>>("plotCfgs");
vector<ParameterSet>::const_iterator plotCfgIt = plotCfgs.begin();
Expand All @@ -250,7 +252,9 @@ L1TEfficiency_Harvesting::~L1TEfficiency_Harvesting(){ m_plotHandlers.clear(); }

//_____________________________________________________________________
void L1TEfficiency_Harvesting::dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter){
if (m_verbose) {cout << "[L1TEfficiency_Harvesting:] Called endRun." << endl;}
if (m_verbose) {
edm::LogInfo("L1TEfficiency_Harvesting") << "Called endRun.";
}

vector<L1TEfficiencyPlotHandler>::iterator plotHandlerIt = m_plotHandlers.begin();
vector<L1TEfficiencyPlotHandler>::iterator plotHandlerEnd = m_plotHandlers.end();
Expand All @@ -263,7 +267,9 @@ void L1TEfficiency_Harvesting::dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::I

//_____________________________________________________________________
void L1TEfficiency_Harvesting::dqmEndLuminosityBlock(DQMStore::IGetter &igetter, LuminosityBlock const& lumiBlock, EventSetup const& c) {
if(m_verbose) cout << "[L1TEfficiency_Harvesting:] Called endLuminosityBlock at LS=" << lumiBlock.id().luminosityBlock() << endl;
if (m_verbose) {
edm::LogInfo("L1TEfficiency_Harvesting") << "Called endLuminosityBlock at LS=" << lumiBlock.id().luminosityBlock();
}
}

//define this as a plug-in
Expand Down