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
create and clear vector of vertex index per-muon, not per event. #20480
Conversation
The code-checks are being triggered in jenkins. |
+code-checks |
A new Pull Request was created by @swagata87 (Swagata Mukherjee) for master. It involves the following packages: HLTrigger/Muon @Martin-Grunewald, @silviodonato, @cmsbuild, @fwyzard can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
I would suggest to
|
As a separate optimisation, you could modify the constructor of the ScoutingMuon data format to
|
Need a 92 PR as well. |
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: |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
Pull request #20480 was updated. @smuzaffar, @cmsbuild, @silviodonato, @Martin-Grunewald, @Dr15Jones, @fwyzard can you please check and sign again. |
please test |
The tests are being triggered in jenkins. |
+1 |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+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. @davidlange6, @slava77, @smuzaffar (and backports should be raised in the release meeting by the corresponding L2) |
@swagata87 |
@@ -145,7 +145,8 @@ void HLTScoutingMuonProducer::produce(edm::StreamID sid, edm::Event & iEvent, | |||
|
|||
double hcalisopf=-1.0; | |||
if ( HcalPFClusterIsoMap.isValid()) { hcalisopf = (*HcalPFClusterIsoMap)[muonRef]; } | |||
|
|||
|
|||
vtxInd.reserve(vtxMuPair.size()); |
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.
hi @swagata87 - please move the vtxInd declaration to here - then the clear/reserve calls are not needed
I'm reading this on my phone, so I may be mistaken, but - why should the
vector be declared inside the loop ?
That would cause additional memory churn.
Calling clear() does not release the memory, so the same buffer can be
reused.
Anyway, even if the vector of declared inside the loop, the reserve is a
good idea, to avoid possible reallocations.
.A
|
+1 |
No description provided.