-
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
Modernize some EGamma Reco modules #35021
Conversation
Users now pass in the required data products to the constructor.
- used esConsumes - avoid doing large numbers of string constructions and comparisons.
This avoids having to keep all the model results in memory at one time.
Some code-formatting also snuck in.
const std::string version_; | ||
const std::string versionName_; | ||
enum class Version { V0, V1 }; | ||
Version version_; |
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 addition avoid doing a string comparison for each module*electron on the version name.
std::ostringstream os; | ||
os << "Problem accessing rho collection for low-pT electrons" << std::endl; | ||
throw cms::Exception("InvalidHandle", os.str()); | ||
} | ||
|
||
double rho = *hRho; |
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.
Handles have condition logic when dereferencing so best not do dereference in tight loop.
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35021/24881
|
A new Pull Request was created by @Dr15Jones (Chris Jones) for master. It involves the following packages:
@jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
-1 Failed Tests: RelVals AddOn CMS StaticAnalyzer warnings: There are 2 EventSetupRecord::get warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9ff3a4/18041/llvm-analysis/esrget-sa.txt for details. RelVals
Expand to see more relval errors ...AddOn Tests
Expand to see more addon errors ... |
Looks like there is some overlap with PR #35019 |
…ducer::beginRun() It is called unconditionally from GEDPhotonProducer::produce(), I can not see how the call from beginRun() could do anything additional except it would require different set ESGetTokens wihtin PhotonEnergyCorrector etc compared to other users.
please test |
abort test 30hrs since the last request doesn't look healthy |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9ff3a4/18122/summary.html Comparison SummarySummary:
|
Ping @cms-sw/reconstruction-l2 |
+reconstruction for #35021 d73e61c
|
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, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
PR validation:
Code compiles. None of the changes are meant to change behavior.