-
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
Avoid code duplication in SiPixelRawToDigi ErrorChecker's #26731
Comments
A new Issue was created by @perrotta . @davidlange6, @Dr15Jones, @smuzaffar, @fabiocos, @kpedro88 can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
assign reconstruction |
cmsbuild
added
pending-signatures
reconstruction-pending
and removed
pending-assignment
labels
May 9, 2019
+reconstruction via #33884 |
This issue is fully signed and ready to be closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In PR #26679 the ErrorChecker class was differentiated for Phase0 and Phase1.
In it, from the previous single ErrorChecker two classes
were defined, both deriving from a common base class ErrorCheckerBase.
In the implementation of that PR, basically all methods in the base class are virtual, and the specializations are implemented separately for the two derived classes.
However, almost all those methods are identical in the two implementations, and they were just copy-pasted from one class to the other. The only exceptions are the two methods:
checkROC
errorDetId
Moreover,
errorDetId
is basically identical in the two derived classes: it could also be moved into the base class if one specializes a function which returns(DetId(detIdx.rawId).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel))
as a bool in Phase0, and justtrue
in Phase1In order to avoid a lot of (error prone during maintenance) copy/paste one should move all common methods in the base class, and only specialize in the derived ones the two different ones. In case some specialization in future will be required for the Phase1 code (as the Phase0 one is expected to remain frozen for the time being, excluding the adaptations that will be needed in case of some modification up-hill or in the framework), one could simply specialize that method in the derived class once again.
This should get fixed for the next cycle after the one for the UL release: it will be 11_0
The text was updated successfully, but these errors were encountered: