Skip to content

Commit

Permalink
HLTTauDQMPathPlotter: added if hCounter_ before calling it
Browse files Browse the repository at this point in the history
  • Loading branch information
slehti committed Apr 10, 2024
1 parent aad09ab commit 5ff91d9
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions DQMOffline/Trigger/src/HLTTauDQMPathPlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ void HLTTauDQMPathPlotter::bookHistograms(HistoWrapper& iWrapper, DQMStore::IBoo
0,
hltPath_.filtersSize(),
kEverything);
hCounter_->setBinLabel(1, "all events");
hCounter_->setBinLabel(2, "ref tau found");
hCounter_->setBinLabel(3, "passed trg");
if (hCounter_) {
hCounter_->setBinLabel(1, "all events");
hCounter_->setBinLabel(2, "ref tau found");
hCounter_->setBinLabel(3, "passed trg");
}
for (size_t i = 0; i < hltPath_.filtersSize(); ++i) {
if (hAcceptedEvents_)
hAcceptedEvents_->setBinLabel(i + 1, hltPath_.getFilterName(i));
Expand Down Expand Up @@ -450,11 +452,13 @@ void HLTTauDQMPathPlotter::analyze(const edm::TriggerResults& triggerResults,
int lastMatchedMuonFilter = -1;
int lastMatchedTauFilter = -1;
int firstMatchedMETFilter = -1;
hCounter_->Fill(0.5);
if (refCollection.taus.size() > 0) {
hCounter_->Fill(1.5);
if (hltPath_.fired(triggerResults))
hCounter_->Fill(2.5);
if (hCounter_) {
hCounter_->Fill(0.5);
if (refCollection.taus.size() > 0) {
hCounter_->Fill(1.5);
if (hltPath_.fired(triggerResults))
hCounter_->Fill(2.5);
}
}

if (doRefAnalysis_) {
Expand Down

0 comments on commit 5ff91d9

Please sign in to comment.