From 9822547708e74612795f600be7cbce3e6bf2668b Mon Sep 17 00:00:00 2001 From: Srecko Morovic Date: Thu, 5 May 2022 21:22:46 +0200 Subject: [PATCH] handle abort flag by the DQM file saver. Avoids writing out files when exception is thrown, so that hltd can close cleanly that LS. Restores behavior of the old DQMFileSaver. --- DQMServices/FileIO/plugins/DQMFileSaverPB.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DQMServices/FileIO/plugins/DQMFileSaverPB.cc b/DQMServices/FileIO/plugins/DQMFileSaverPB.cc index aec8b2c7390dd..2a881f50cba71 100644 --- a/DQMServices/FileIO/plugins/DQMFileSaverPB.cc +++ b/DQMServices/FileIO/plugins/DQMFileSaverPB.cc @@ -103,7 +103,8 @@ void DQMFileSaverPB::saveLumi(const FileParameters& fp) const { fms = (evf::FastMonitoringService*)(edm::Service().operator->()); } - if (fms ? fms->getEventsProcessedForLumi(fp.lumi_) : true) { + bool abortFlag = false; + if (fms ? fms->getEventsProcessedForLumi(fp.lumi_, &abortFlag) : true) { // Save the file in the open directory. this->savePB(&*store, openHistoFilePathName, fp.run_, fp.lumi_); @@ -111,6 +112,9 @@ void DQMFileSaverPB::saveLumi(const FileParameters& fp) const { ::rename(openHistoFilePathName.c_str(), histoFilePathName.c_str()); } + if (abortFlag) + return; + // Write the json file in the open directory. bpt::ptree pt = fillJson(fp.run_, fp.lumi_, histoFilePathName, transferDestination_, mergeType_, fms); write_json(openJsonFilePathName, pt);