diff --git a/Validation/EventGenerator/plugins/LheWeightValidation.cc b/Validation/EventGenerator/plugins/LheWeightValidation.cc index eaca0b51a874d..a9175845e6eeb 100644 --- a/Validation/EventGenerator/plugins/LheWeightValidation.cc +++ b/Validation/EventGenerator/plugins/LheWeightValidation.cc @@ -31,6 +31,7 @@ LheWeightValidation::LheWeightValidation(const edm::ParameterSet& iPSet) void LheWeightValidation::bookHistograms(DQMStore::IBooker& iBook, edm::Run const& iRun, edm::EventSetup const&) { // check LHE product exists edm::Handle lheInfo; + // getByToken throws an exception unless we're in the endRun (see https://github.com/cms-sw/cmssw/pull/18499) iRun.getByLabel(lheLabel_, lheInfo); if (!lheInfo.isValid())