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
Phase2-hgx113 Mapping trigger ID to ROC #23357
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23357/4865 |
A new Pull Request was created by @bsunanda for master. It involves the following packages: DataFormats/ForwardDetId @cmsbuild, @civanch, @kpedro88, @mdhildreth can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild Please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
|
||
private: | ||
|
||
std::map<std::pair<int,int>,int> triggerIdToROC_; |
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.
depending on the size of the maps and how they will be used, unordered_map
may perform better
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.
Size of the map is not large. Let us optimize later
int v = start2[roc]; | ||
int u = start1[roc][i1]; | ||
for (int i2=0; i2<cellRows; ++i2) { | ||
cells.emplace_back(std::make_pair(u,v)); |
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.
make_pair
within emplace_back
is redundant; just do emplace_back(u,v)
(in the two cases below as well)
} | ||
|
||
// key = trigger cell U,V; value = roc # | ||
for (auto itr=triggerIdFromROC_.begin(); |
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.
range-based loop
|
||
void HGCSiliconDetIdToROC::print() const { | ||
|
||
for (auto itr=triggerIdFromROC_.begin(); itr!=triggerIdFromROC_.end(); |
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.
range-based loop
std::cout << " (" << cell.first << "," << cell.second << ")"; | ||
std::cout << std::endl; | ||
} | ||
for (auto itr=triggerIdToROC_.begin(); itr!=triggerIdToROC_.end(); ++itr) |
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.
range-based loop
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23357/4923 |
Pull request #23357 was updated. @cmsbuild, @civanch, @kpedro88, @mdhildreth can you please check and sign again. |
@cmsbuild Please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
@kpedro88 Please approve this PR |
+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, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
No description provided.