Skip to content

Commit

Permalink
Merge pull request #37830 from smorovic/dev-124X-filesaver
Browse files Browse the repository at this point in the history
(DAQ, DQM) FileSaverPB fix when exception is thrown
  • Loading branch information
cmsbuild committed May 7, 2022
2 parents 51b4b8f + 9822547 commit 7032215
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion DQMServices/FileIO/plugins/DQMFileSaverPB.cc
Expand Up @@ -103,14 +103,18 @@ void DQMFileSaverPB::saveLumi(const FileParameters& fp) const {
fms = (evf::FastMonitoringService*)(edm::Service<evf::MicroStateService>().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_);

// Now move the the data and json files into the output directory.
::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);
Expand Down

0 comments on commit 7032215

Please sign in to comment.