Skip to content

Commit

Permalink
handle abort flag by the DQM file saver. Avoids writing out files when
Browse files Browse the repository at this point in the history
exception is thrown, so that hltd can close cleanly that LS. Restores
behavior of the old DQMFileSaver.
  • Loading branch information
smorovic committed May 5, 2022
1 parent 0581792 commit 9822547
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 9822547

Please sign in to comment.