diff --git a/CondCore/BeamSpotPlugins/test/testBeamSpotPayloadInspector.cpp b/CondCore/BeamSpotPlugins/test/testBeamSpotPayloadInspector.cpp index 06aa0a6162ab7..7bb6c277123dc 100644 --- a/CondCore/BeamSpotPlugins/test/testBeamSpotPayloadInspector.cpp +++ b/CondCore/BeamSpotPlugins/test/testBeamSpotPayloadInspector.cpp @@ -51,10 +51,33 @@ int main(int argc, char** argv) { tag = "BeamSpotOnlineTestLegacy"; start = static_cast(1443392479297557); + end = static_cast(1470910334763033); + + edm::LogPrint("") << "###########################################################################\n" + << " DISCLAIMER\n" + << " The following unit test is going to print error messages about\n" + << " out-of-range indices for the BeamSpotOnlineParameters.\n" + << " This normal and expected, since the test payload has been written \n" + << " with an obsolete data layout which doesn't contain few additional \n" + << " parameters, see https://github.com/cms-sw/cmssw/pull/35338 for details. \n" + << " This tests the catching of exceptions coming from reading not existing \n" + << " parameters in the Payload inspector.\n"; BeamSpotOnlineParameters histoOnlineParameters; histoOnlineParameters.process(connectionString, PI::mk_input(tag, start, start)); edm::LogPrint("testBeamSpotPayloadInspector") << histoOnlineParameters.data() << std::endl; + BeamSpotOnlineParametersDiffSingleTag histoOnlineParametersDiff; + histoOnlineParametersDiff.process(connectionString, PI::mk_input(tag, start, end)); + edm::LogPrint("testBeamSpotPayloadInspector") << histoOnlineParametersDiff.data() << std::endl; + + tag1 = "BeamSpotOnlineObjects_Ideal_Centered_SLHC_v3_mc"; + tag2 = "BeamSpotOnlineObjects_Realistic25ns_13TeVCollisions_RoundOpticsLowSigmaZ_RunBased_v1_mc"; + start = static_cast(4294967297); /*Run 1 : LS 1 (packed: 4294967297) this needs to be per LS */ + + BeamSpotOnlineParametersDiffTwoTags histoOnlineParametersDiffTwoTags; + histoOnlineParametersDiffTwoTags.process(connectionString, PI::mk_input(tag1, start, start, tag2, start, start)); + edm::LogPrint("testBeamSpotPayloadInspector") << histoOnlineParametersDiffTwoTags.data() << std::endl; + Py_Finalize(); }