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
CSC Upgrade TMB base classes and improved LUT generator code #18560
CSC Upgrade TMB base classes and improved LUT generator code #18560
Conversation
A new Pull Request was created by @dildick (Sven Dildick) for master. It involves the following packages: L1Trigger/CSCTriggerPrimitives @cmsbuild, @rekovic, @mulhearn, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
assign upgrade |
New categories assigned: upgrade @kpedro88 you have been requested to review this Pull request/Issue and eventually sign? 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.
Main issues are proper use of const references with auto
and smart pointers instead of bare pointers
coPadProcessor.reset( new GEMCoPadProcessor(endcap, station, 1, chamber, coPadParams) ); | ||
|
||
// use "old" or "new" dataformat for integrated LCTs? | ||
useOldLCTDataFormat_ = tmbParams_.getParameter<bool>("useOldLCTDataFormat"); |
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.
Most of these member variable assignments could go in the constructor initialization list
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.
ok. will do
void CSCGEMMotherboard::retrieveGEMPads(const GEMPadDigiCollection* gemPads, unsigned id) | ||
{ | ||
auto superChamber(gem_g->superChamber(id)); | ||
for (auto ch : superChamber->chambers()) { |
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.
All of these loop variables should be const auto&
(unless there's a good reason to make it non-const or a copy)
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.
ok. will do
|
||
void CSCGEMMotherboard::retrieveGEMCoPads() | ||
{ | ||
for (auto copad: gemCoPadV){ |
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.
again, const auto&
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.
ok. will do
enum CSCPart part, | ||
int trknmb) | ||
{ | ||
auto mymap = (*getLUT()->get_gem_pad_to_csc_hs(par, part)); |
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.
const auto&
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.
ok. will do
// get wiregroup from ALCT | ||
int wg = alct.getKeyWG(); | ||
|
||
// if (keyStrip>wgvshs[wg][0] && keyStrip<wgvshs[wg][1]) |
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.
Remove commented-out code
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.
ok. will do
int CSCUpgradeMotherboardLUTGenerator::assignRoll(const std::vector<std::pair<double,double> >& lut_, double eta) const | ||
{ | ||
int result = -99; | ||
for(auto p : lut_) { |
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.
const auto&
CSCUpgradeMotherboardLUTGenerator::gemRollToEtaLimitsLUT(const GEMChamber* gemChamber) const | ||
{ | ||
std::vector<std::pair<double,double> > lut; | ||
for(auto roll : gemChamber->etaPartitions()) { |
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.
const auto&
CSCUpgradeMotherboardLUTGenerator::rpcRollToEtaLimitsLUT(const RPCChamber* rpcChamber) const | ||
{ | ||
std::vector<std::pair<double,double> > lut; | ||
for(auto roll : rpcChamber->rolls()) { |
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.
const auto&
{ | ||
int i = 0; | ||
os << "{" << std::endl; | ||
for(auto p : 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.
const auto&
{ | ||
int i = 0; | ||
os << "{" << std::endl; | ||
for(auto p : 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.
const auto&
@dildick no need to reply to comments individually unless you have an objection |
Pull request #18560 was updated. @perrotta, @cmsbuild, @civanch, @ghellwig, @silviodonato, @arunhep, @mdhildreth, @Martin-Grunewald, @rekovic, @franzoni, @kpedro88, @cerminar, @slava77, @ggovi, @fwyzard, @mmusich, @mulhearn, @davidlange6 can you please check and sign again. |
I will rebase. |
-1 |
Pull request #18560 was updated. @perrotta, @cmsbuild, @civanch, @ghellwig, @silviodonato, @arunhep, @mdhildreth, @Martin-Grunewald, @rekovic, @franzoni, @kpedro88, @cerminar, @slava77, @ggovi, @fwyzard, @mmusich, @mulhearn, @davidlange6 can you please check and sign again. |
-1 |
@kpedro88 I made template specializations where possible. For other occurrences of "is_same" I implemented different solutions. In any case, the is_same constructs have been removed. |
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:
|
+1 |
merge |
@dildick , can you please provide a fix to avoid these compilation warnings |
@smuzaffar No problem. That will be resolved in a next PR. |
@dildick compile warnings are still there https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/slc7_amd64_gcc630/CMSSW_9_2_X_2017-06-23-1100/L1Trigger/CSCTriggerPrimitives |
This PR is a follow up of #17843 where I introduced a first working version of a LUT generator class.