Skip to content

Commit be4240b

Browse files
authored
Merge pull request #46760 from smorovic/14_2_X-fix-service-type
(HLT) fix service discovery in HLTriggerJSONMonitoring
2 parents 0266ec6 + 8f13c7a commit be4240b

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

HLTrigger/JSONMonitoring/plugins/HLTriggerJSONMonitoring.cc

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -429,15 +429,10 @@ void HLTriggerJSONMonitoring::globalEndLuminosityBlockSummary(edm::LuminosityBlo
429429
unsigned int ls = lumi.luminosityBlock();
430430
unsigned int run = lumi.run();
431431

432-
bool writeFiles = true;
433-
if (edm::Service<evf::FastMonitoringService*>().isAvailable()) {
434-
evf::FastMonitoringService* fms =
435-
(evf::FastMonitoringService*)(edm::Service<evf::FastMonitoringService*>().operator->());
436-
if (fms)
437-
writeFiles = fms->shouldWriteFiles(ls);
432+
if (edm::Service<evf::FastMonitoringService>().isAvailable()) {
433+
if (!edm::Service<evf::FastMonitoringService>()->shouldWriteFiles(ls))
434+
return;
438435
}
439-
if (not writeFiles)
440-
return;
441436

442437
unsigned int processed = lumidata->processed.value().at(0);
443438
auto const& rundata = *runCache(lumi.getRun().index());

HLTrigger/JSONMonitoring/plugins/L1TriggerJSONMonitoring.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,15 +365,10 @@ void L1TriggerJSONMonitoring::globalEndLuminosityBlockSummary(edm::LuminosityBlo
365365
unsigned int ls = lumi.luminosityBlock();
366366
unsigned int run = lumi.run();
367367

368-
bool writeFiles = true;
369368
if (edm::Service<evf::FastMonitoringService>().isAvailable()) {
370-
evf::FastMonitoringService* fms =
371-
(evf::FastMonitoringService*)(edm::Service<evf::FastMonitoringService>().operator->());
372-
if (fms)
373-
writeFiles = fms->shouldWriteFiles(ls);
369+
if (!edm::Service<evf::FastMonitoringService>()->shouldWriteFiles(ls))
370+
return;
374371
}
375-
if (not writeFiles)
376-
return;
377372

378373
unsigned int processed = lumidata->processed.value().at(0);
379374
auto const& rundata = *runCache(lumi.getRun().index());

0 commit comments

Comments
 (0)