Skip to content

Commit

Permalink
Merge pull request #46760 from smorovic/14_2_X-fix-service-type
Browse files Browse the repository at this point in the history
(HLT) fix service discovery in HLTriggerJSONMonitoring
  • Loading branch information
cmsbuild authored Nov 27, 2024
2 parents 0266ec6 + 8f13c7a commit be4240b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
11 changes: 3 additions & 8 deletions HLTrigger/JSONMonitoring/plugins/HLTriggerJSONMonitoring.cc
Original file line number Diff line number Diff line change
Expand Up @@ -429,15 +429,10 @@ void HLTriggerJSONMonitoring::globalEndLuminosityBlockSummary(edm::LuminosityBlo
unsigned int ls = lumi.luminosityBlock();
unsigned int run = lumi.run();

bool writeFiles = true;
if (edm::Service<evf::FastMonitoringService*>().isAvailable()) {
evf::FastMonitoringService* fms =
(evf::FastMonitoringService*)(edm::Service<evf::FastMonitoringService*>().operator->());
if (fms)
writeFiles = fms->shouldWriteFiles(ls);
if (edm::Service<evf::FastMonitoringService>().isAvailable()) {
if (!edm::Service<evf::FastMonitoringService>()->shouldWriteFiles(ls))
return;
}
if (not writeFiles)
return;

unsigned int processed = lumidata->processed.value().at(0);
auto const& rundata = *runCache(lumi.getRun().index());
Expand Down
9 changes: 2 additions & 7 deletions HLTrigger/JSONMonitoring/plugins/L1TriggerJSONMonitoring.cc
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,10 @@ void L1TriggerJSONMonitoring::globalEndLuminosityBlockSummary(edm::LuminosityBlo
unsigned int ls = lumi.luminosityBlock();
unsigned int run = lumi.run();

bool writeFiles = true;
if (edm::Service<evf::FastMonitoringService>().isAvailable()) {
evf::FastMonitoringService* fms =
(evf::FastMonitoringService*)(edm::Service<evf::FastMonitoringService>().operator->());
if (fms)
writeFiles = fms->shouldWriteFiles(ls);
if (!edm::Service<evf::FastMonitoringService>()->shouldWriteFiles(ls))
return;
}
if (not writeFiles)
return;

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

0 comments on commit be4240b

Please sign in to comment.