diff --git a/DQM/Integration/python/clients/sistrip_approx_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/clients/sistrip_approx_dqm_sourceclient-live_cfg.py index 19f43ef65315e..b65ddb665870f 100644 --- a/DQM/Integration/python/clients/sistrip_approx_dqm_sourceclient-live_cfg.py +++ b/DQM/Integration/python/clients/sistrip_approx_dqm_sourceclient-live_cfg.py @@ -87,8 +87,7 @@ #you may need to set manually the GT in the line below process.GlobalTag = gtCustomise(process.GlobalTag, 'auto:run3_hlt', '') - -print("Will process with GlobalTag %s",process.GlobalTag.globaltag.value()) +print("Will process with GlobalTag: %s" % process.GlobalTag.globaltag.value()) #-------------------------------------------- # Patch to avoid using Run Info information in reconstruction diff --git a/DQM/Integration/python/config/unitteststreamerinputsource_cfi.py b/DQM/Integration/python/config/unitteststreamerinputsource_cfi.py index c4ff7d8a27ccd..5ba032cbafbe9 100644 --- a/DQM/Integration/python/config/unitteststreamerinputsource_cfi.py +++ b/DQM/Integration/python/config/unitteststreamerinputsource_cfi.py @@ -128,5 +128,6 @@ def checkInputFolder(streamer_folder): skipFirstLumis = cms.untracked.bool(options.skipFirstLumis), deleteDatFiles = cms.untracked.bool(False), endOfRunKills = cms.untracked.bool(False), - inputFileTransitionsEachEvent = cms.untracked.bool(False) + inputFileTransitionsEachEvent = cms.untracked.bool(False), + unitTest = cms.untracked.bool(True) # stop processing if the input data cannot be deserialized ) diff --git a/DQM/Integration/test/BuildFile.xml b/DQM/Integration/test/BuildFile.xml index fd7f63fbb208c..dbaf361425d62 100644 --- a/DQM/Integration/test/BuildFile.xml +++ b/DQM/Integration/test/BuildFile.xml @@ -1,6 +1,5 @@ - - + @@ -25,9 +24,10 @@ - - - + + + + diff --git a/DQMServices/StreamerIO/plugins/DQMStreamerReader.cc b/DQMServices/StreamerIO/plugins/DQMStreamerReader.cc index 906db29d4259e..434b40fcf2bad 100644 --- a/DQMServices/StreamerIO/plugins/DQMStreamerReader.cc +++ b/DQMServices/StreamerIO/plugins/DQMStreamerReader.cc @@ -27,7 +27,8 @@ namespace dqmservices { flagSkipFirstLumis_(pset.getUntrackedParameter("skipFirstLumis")), flagEndOfRunKills_(pset.getUntrackedParameter("endOfRunKills")), flagDeleteDatFiles_(pset.getUntrackedParameter("deleteDatFiles")), - hltSel_(pset.getUntrackedParameter>("SelectEvents")) { + hltSel_(pset.getUntrackedParameter>("SelectEvents")), + unitTest_(pset.getUntrackedParameter("unitTest", false)) { setAcceptAllEvt(); reset_(); } @@ -167,6 +168,12 @@ namespace dqmservices { openFileImp_(currentLumi); return true; } catch (const cms::Exception& e) { + if (unitTest_) { + throw edm::Exception(edm::errors::FileReadError, "DQMStreamerReader::openNextFileInp") + << std::string("Can't deserialize registry data (in open file): ") + e.what() + << "\n error: data file corrupted"; + } + fiterator_.logFileAction(std::string("Can't deserialize registry data (in open file): ") + e.what(), p); fiterator_.logLumiState(currentLumi, "error: data file corrupted"); @@ -463,6 +470,9 @@ namespace dqmservices { "Kill the processing as soon as the end-of-run file appears, even if " "there are/will be unprocessed lumisections."); + desc.addUntracked("unitTest", false) + ->setComment("Kill the processing if the input data cannot be deserialized"); + // desc.addUntracked("skipEvents", 0U) // ->setComment("Skip the first 'skipEvents' events that otherwise would " // "have been processed."); diff --git a/DQMServices/StreamerIO/plugins/DQMStreamerReader.h b/DQMServices/StreamerIO/plugins/DQMStreamerReader.h index bf13f51784fb1..cb634d4b0c871 100644 --- a/DQMServices/StreamerIO/plugins/DQMStreamerReader.h +++ b/DQMServices/StreamerIO/plugins/DQMStreamerReader.h @@ -57,6 +57,7 @@ namespace dqmservices { bool const flagEndOfRunKills_; bool const flagDeleteDatFiles_; std::vector const hltSel_; + bool const unitTest_; bool acceptAllEvt_ = false; bool setAcceptAllEvt();