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
Modernized AlcaBeamMonitor #31354
Modernized AlcaBeamMonitor #31354
Conversation
This avoids a segmentation fault under that condition.
Test case where no LuminosityBlocks are processed. Before fix, this would lead to segmentation faults.
- added esConsumes - removed unused parameter BeamSpotLabel
The code-checks are being triggered in jenkins. |
@smuzaffar @makortel this should fix the seg faults seen in the ASAN IBs. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31354/18137
|
A new Pull Request was created by @Dr15Jones (Chris Jones) for master. It involves the following packages: DQM/BeamMonitor @perrotta, @andrius-k, @kmaeshima, @slava77, @christopheralanwest, @tocheng, @cmsbuild, @jfernan2, @fioriNTU, @tlampen, @jpata, @pohsun can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins.
|
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
You can see more details here: |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
Comparison job queued. |
Comparison is ready Comparison Summary:
|
Just a reminder, this will avoid the 350 segmentation faults seen in the ASAN IB. |
|
||
beamFitter.addUntracked<bool>("Debug"); | ||
beamFitter.addUntracked<edm::InputTag>("TrackCollection"); | ||
iDesc.addUntracked<edm::InputTag>("primaryVertex", edm::InputTag("offlinePrimaryVertices")); |
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.
If the default values for these parameters are defined here, would it make sense to remove them from the constructor:
iConfig.getUntrackedParameter<edm::InputTag>("primaryVertex", edm::InputTag("offlinePrimaryVertices"))); |
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.
It seems like the main python definition of BeamFitter is here [1] (with some alternate defitions in neighboring files) - do we want to reduce the duplication of the default parameters somewhat between the fillDescriptions and the cff?
[1]
BeamFitter = cms.PSet( |
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.
I’d prefer to have that done in a separate pull request so we can get the bug fix in.
+1 |
type bug |
@Dr15Jones what do you mean by the type bug? |
This pull request gets marked as a bug fix. Right now we are getting segmentation faults in the ASAN IB. This pull request fixes that. (I admit I did more than the bare minimum to fix the bug). |
trackLabel_(consumes<reco::TrackCollection>(parameters_.getUntrackedParameter<InputTag>("TrackLabel"))), | ||
scalerLabel_(consumes<BeamSpot>(parameters_.getUntrackedParameter<InputTag>("ScalerLabel"))), | ||
beamSpotLabel_(parameters_.getUntrackedParameter<InputTag>("BeamSpotLabel")), | ||
: monitorName_(ps.getUntrackedParameter<string>("MonitorName")), |
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.
Could you explain why you have removed the second parameter "YourSubsystemName"
here but not in AlcaBeamMonitor::fillDescriptions
?
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.
Having it in both the getUntrackedParameter
call and in fillDescriptions
would be redundant. If the parameter is missing, the fillDescriptions
call will inject the "MonitorName"
string parameter into the module's PSet using the default "YourSubsystemName"
. Therefore during the constructor call the parameter "MonitorName"
is guaranteed to exist so no default value is needed for the getUntrackedParameter
. So the change I made has exactly the same ultimate behavior as the original code.
In general, the framework group highly encourages everyone to stop specifying default values in getUntrackedParameter
and instead use fillDescriptions
.
+reconstruction
|
+alca |
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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
PR validation:
Code compiles and the new unit test passes.