-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add unit test for HLT online-DQM plugins #40334
Conversation
f68f532
to
cb81125
Compare
@@ -258,5 +269,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"): | |||
|
|||
process = customizeHLTfor38761(process) | |||
process = customizeHLTfor40264(process) | |||
process = customizeHLTfor40334(process) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This customisation is not necessary for the menus in CMSSW. It can become necessary for user menus extracted from ConfDB
, if those somehow contain a PSMonitor
.
@@ -85,6 +85,7 @@ void ThroughputService::preGlobalBeginRun(edm::GlobalContext const& gc) { | |||
|
|||
// define a callback that can book the histograms | |||
auto bookTransactionCallback = [&, this](DQMStore::IBooker& booker, DQMStore::IGetter&) { | |||
auto scope = dqm::reco::DQMStore::IBooker::UseRunScope(booker); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is copied from
auto scope = dqm::reco::DQMStore::IBooker::UseRunScope(booker); |
Without this call, the harvesting output of the unit test does not contain a Throughtput
folder, and I'm not really sure why that is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Short version: I think this change is okay. More info below.
I had a look at https://github.com/cms-sw/cmssw/blob/master/DQMServices/Core/README.md, but that didn't really clarify things for me.
If I understand the interface, the DQM scope in ThroughputService
before the call to
auto scope = dqm::reco::DQMStore::IBooker::UseRunScope(booker);
corresponds to scope.oldscope
. The latter returns 1
, which corresponds to JOB
(and after the call, the scope becomes RUN
). This seems to match the default set here, i.e. JOB
.
The call to use the RUN
scope in FastTimerService
was introduced in #28622 by DQM (maybe ThoughputService
was simply overlooked in that PR). I don't see a reason why FastTimerService
and ThroughputService
should differ in this respect.
With this PR, I managed to produce a ROOT output file with the client hlt_dqm_clientPB-live_cfg.py
reading .pb
files produced by re-running a recent HLT menu on 2022 data; in that ROOT output file, I see the HLT/Throughput
folder, and the plots look as expected. This suggests that this PR does not break the workflow to produce these plots online (which somehow was already working).
Based on the above, I would conclude that this change is okay, even though I don't fully understand it; in particular, I don't know why the HLT/Throughput
plots were already being produced correctly in the online DQM without this PR.
@cms-sw/dqm-l2 , do you have insight on this?
@@ -95,7 +96,7 @@ void ThroughputService::preGlobalBeginRun(edm::GlobalContext const& gc) { | |||
}; | |||
|
|||
// book MonitorElement's for this run | |||
edm::Service<DQMStore>()->meBookerGetter(bookTransactionCallback); | |||
edm::Service<dqm::legacy::DQMStore>()->meBookerGetter(bookTransactionCallback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this change is unimportant; again it follows what is done in the FastTimerService
edm::Service<dqm::legacy::DQMStore>()->meBookerGetter(bookTransactionCallback); |
In ThroughputService
, the following is used
typedef dqm::reco::DQMStore DQMStore; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what difference does it make to use dqm::legacy
instead of dqm::reco
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
answering to myself: none, they are typedef
one to the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info. Since there is no difference, I will remove the extra dqm::legacy::
from here.
Edit : done in fda3c14.
test parameters:
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40334/33420
|
A new Pull Request was created by @missirol (Marino Missiroli) for master. It involves the following packages:
@Martin-Grunewald, @emanueleusai, @ahmad3213, @cmsbuild, @missirol, @jfernan2, @syuvivida, @pmandrik, @micsucmed, @rvenditti can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@fwyzard , it would be very useful to have your feedback on this PR. |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-c89ae2/29647/summary.html Comparison SummarySummary:
|
cb81125
to
9ff78e4
Compare
test parameters: |
please test Rebased on IB which includes #40325, and updated following the discussion in #40334 (comment). |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-c89ae2/29783/summary.html Comparison SummarySummary:
|
+hlt
|
@cms-sw/dqm-l2, could you please review this PR? Thanks! |
Concerning the removal of the PSMonitorClient, I agree with you, It look like the process just printed a warning if plots are not present. That's odd. Concerning the ThroughputService, your logic is correct, and I believe what is done in the FastTimerService is correct and can be safely copied to ThroughputService, but the fact that it worked already correctly online makes me suspicious. We could in principle test this online in playback to be extra safe, but we would need a backport... |
Opening a backport PR to do this test is probably easy to do (for which cycle ? On the other hand, I don't think the playback test would help checking the change in To try and convince myself that this change is okay, I produced streamer files by rerunning the HLT step with this PR, and then manually ran one of the HLT online-DQM clients on those streamer files [1]. In this 'online-like' test, one gets the expected histograms in the If you think the playback test is useful anyway, I'll open the backport PR to the relevant release cycle. [1] Tested in #!/bin/bash
# scram project CMSSW CMSSW_13_0_X_2023-01-12-2300
# cd CMSSW_13_0_X_2023-01-12-2300/src
# eval `scram runtime -sh`
# git cms-merge-topic cms-sw:40334
# scram build
INPUTFILE=root://eoscms.cern.ch//eos/cms/store/group/dpg_trigger/comm_trigger/TriggerStudiesGroup/STORM/RAW/Run2022F_EphemeralHLTPhysics0_run361468/26ce1488-8c46-436b-becd-6b41535dda79.root
HLTMENU=/users/missirol/test/dev/CMSSW_13_0_0/tmp/test01/cmssw40334/HLT/V3
[ -d run361468 ] || (convertToRaw -f 100 -l 100 -r 361468:172 -o . -- "${INPUTFILE}")
if [ ! -f hlt.py ]; then
tmpfile=$(mktemp)
hltConfigFromDB --configName "${HLTMENU}" > "${tmpfile}"
cat <<@EOF >> "${tmpfile}"
process.load('run361468_cff')
process.hltOnlineBeamSpotESProducer.timeThreshold = int(1e6)
from HLTrigger.Configuration.common import producers_by_type
for producer in producers_by_type(process, 'PSMonitor'):
if hasattr(producer, 'FolderName'):
if not hasattr(producer, 'folderName'):
producer.folderName = producer.FolderName
del producer.FolderName
@EOF
edmConfigDump "${tmpfile}" > hlt.py
fi
cmsRun hlt.py &> hlt.log
cmsRun DQM/Integration/python/clients/hlt_dqm_clientPB-live_cfg.py \
runInputDir=. runNumber=361468 runkey=pp_run \
scanOnce=True datafnPosition=4
# output file: ./upload/DQM_V0001_HLTpb_R000361468.root |
@missirol thank you very much for the detailed explanation. I now understand better your private test, and I agree this is sufficient for the PR to be approved. |
+1
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR aims to add a unit test involving most of the DQM modules (and services) running in the HLT and providing inputs to the online DQM. The test includes both DQM and harvesting steps, and it only requires that both run without errors (the unit test does not check the outputs).
Small changes are also made in the cpp implementation of a few plugins:
FolderName
ofPSMonitor
is renamedfolderName
as done forLumiMonitor
in giveOnlineLuminosityRecord
info to HLT'sLumiMonitor
plugin #39859;LumiMonitor
that don't currently have them;fillEveryLumiSection
is added toThroughputServiceClient
in analogy withFastTimeServiceClient
.There are two changes that require feedback (I'm not sure they are correct):
ThroughputService
to change the 'scope of the DQM outputs' toRUN
, otherwise I would not see theHLT/Throughput
folder in the harvesting output of the unit test; I copied this scope change fromFastTimerService
, and I figure that's what was needed. I'm not sure it is the correct change; clearly theThroughputService
outputs were already produced correctly in the online DQM (maybe in that case the default scope is somehow set differently compared to this unit test);PSMonitorClient
; it does not produce outputs, it can only issue a warning, and maybe this is not so useful, but also here feedback would be needed.This PR requires #40325.
Merely technical. No changes expected.
PR validation:
Manual tests with new unit test.
If this PR is a backport, please specify the original PR and why you need to backport that PR. If this PR will be backported, please specify to which release cycle the backport is meant for:
N/A