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
RecoLocalTracker/SiStripRecHitConverter: Fix bug found by clang warningand fix clang warnings: #22533
Merged
cmsbuild
merged 1 commit into
cms-sw:master
from
gartung:RecoLocalTracker-SiStripRecHitConverter-fix-clangwarned-bug
Mar 10, 2018
Merged
RecoLocalTracker/SiStripRecHitConverter: Fix bug found by clang warningand fix clang warnings: #22533
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 fix, while due, seems to possible affect the normal workflow of the code: when k was (erroneously) incremented, the wrong k entered the following checks inside the outer loop
@OlivierBondu : whenever there are no issues with what stored in the the db probably the previous bug didn't show up, Do you expect situations in which there is any effect of this fix? Where should we look at to possibly see one?
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.
there is NOT such a thing as a StripTemplate in the database....
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.
Do you mean that this part of the code was never hit, and therefore while the fix is due we cannot see any effect out of it?
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.
Naively thought the effect of the bug should be an infinite loop (likely leading to a segfault at some point).
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.
Indeed... That's correct @makortel: this demonstrates that this code was never run!
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 had a quick look, and it seems there are two reasons why this did not give problems:
bool SiStripTemplate::pushfile(int filenum, std::vector< SiStripTemplateStore > & theStripTemp_)
) - I verified by removing it and recompiling (aftergit cms-checkdeps -a
), which showed no problems.According to git this has not been touched since the migration from CVS. I think it has been copied/adapted from the corresponding code for the pixel detector here at some point.
Question (also to @mmusich @echabert @boudoul ): since this is not used (and apparently never has been), and it can be revived from git history or the pixel version in case it is needed some day, should we just remove this method?
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.
Hello, @pieterdavid, @perrotta,
as you correctly point out Strip template reconstruction was never developed (same people working on the pixel one were involved here) up to a point where it could be used in production and certainly we don't even have
CondFormat
to be able to store in DB. While we need to support thefromTrackAngle
and, up to a certain degree thegeometric
CPE algorithm, I personally see no reason to keep in repository the template code at all if all it does is to create maintenance overhead.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 second @mmusich 's comment
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.
@pieterdavid @mmusich @echabert @boudoul: will any of you take care of preparing a PR which removes from the release whatever is not used (in this package)? Thanks!
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 @mmusich and @boudoul , I was only talking about this specific method, but I'm not against removing it completely either... @perrotta : submitted as #22546