Skip to content
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

Merged
merged 18 commits into from Jun 22, 2017
Merged

CSC Upgrade TMB base classes and improved LUT generator code #18560

merged 18 commits into from Jun 22, 2017

Conversation

dildick
Copy link
Contributor

@dildick dildick commented May 4, 2017

This PR is a follow up of #17843 where I introduced a first working version of a LUT generator class.

  • This PR extends and improves that class (CSCUpgradeMotherboardLUTGenerator). The actual LUTs are stored in CSCUpgradeMotherboardLUT. Most LUTs are currently empty but will be filled soon.
  • This PR also introduces base classes for the upgrade TMBs: (1) CSCUpgradeMotherboard which is a common class for all upgrade CSC-GEM and CSC-RPC TMBs and (2) CSCGEMMotherboard which is derived from CSCUpgradeMotherboard. The latter will form the base class for the specific classes CSCGEMMotherboardME11, CSCGEMMotherboardME21.
  • In a follow up pull request I will change the names of CSCMotherboardME11GEM and CSCMotherboardME21GEM to CSCGEMMotherboardME11 and CSCGEMMotherboardME21 respectively, and I will let them derive from CSCGEMMotherboard. CSCMotherboardME3141RPC will be renamed to CSCRPCMotherboard and will derive from CSCUpgradeMotherboard.
  • No changes with respect to the run-2 or phase-2 work flows are expected, since none of this code is enabled yet.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 4, 2017

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.
@valuev, @ptcox, @kreczko, @Martin-Grunewald this is something you requested to watch as well.
@davidlange6 you are the release manager for this.

cms-bot commands are listed here

@dildick
Copy link
Contributor Author

dildick commented May 4, 2017

@kpedro88

@smuzaffar smuzaffar modified the milestones: CMSSW_9_2_X, CMSSW_9_1_X May 4, 2017
@kpedro88
Copy link
Contributor

kpedro88 commented May 4, 2017

assign upgrade

@cmsbuild
Copy link
Contributor

cmsbuild commented May 4, 2017

New categories assigned: upgrade

@kpedro88 you have been requested to review this Pull request/Issue and eventually sign? Thanks

Copy link
Contributor

@kpedro88 kpedro88 left a 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");
Copy link
Contributor

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

Copy link
Contributor Author

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()) {
Copy link
Contributor

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)

Copy link
Contributor Author

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){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, const auto&

Copy link
Contributor Author

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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const auto&

Copy link
Contributor Author

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])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out code

Copy link
Contributor Author

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_) {
Copy link
Contributor

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()) {
Copy link
Contributor

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()) {
Copy link
Contributor

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) {
Copy link
Contributor

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const auto&

@kpedro88
Copy link
Contributor

kpedro88 commented May 4, 2017

@dildick no need to reply to comments individually unless you have an objection

@cmsbuild
Copy link
Contributor

cmsbuild commented May 8, 2017

@dildick
Copy link
Contributor Author

dildick commented May 8, 2017

I will rebase.

@kpedro88
Copy link
Contributor

kpedro88 commented May 8, 2017

-1
merge is not rebase

@cmsbuild
Copy link
Contributor

cmsbuild commented May 8, 2017

@kpedro88
Copy link
Contributor

kpedro88 commented May 8, 2017

-1
maybe the base is wrong? master = 9_2_X, not 9_1_X

@cmsbuild
Copy link
Contributor

Pull request #18560 was updated. @cmsbuild, @rekovic, @mulhearn, @kpedro88, @davidlange6 can you please check and sign again.

@dildick
Copy link
Contributor Author

dildick commented Jun 19, 2017

@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.

@cmsbuild
Copy link
Contributor

Pull request #18560 was updated. @cmsbuild, @rekovic, @mulhearn, @kpedro88, @davidlange6 can you please check and sign again.

@kpedro88
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 19, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/20770/console Started: 2017/06/19 23:43

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-18560/20770/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 61 differences found in the comparisons
  • DQMHistoTests: Total files compared: 22
  • DQMHistoTests: Total histograms compared: 1802826
  • DQMHistoTests: Total failures: 29662
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1772998
  • DQMHistoTests: Total skipped: 166
  • DQMHistoTests: Total Missing objects: 0
  • Checked 90 log files, 14 edm output root files, 22 DQM output files

@kpedro88
Copy link
Contributor

+1

@davidlange6
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit 4bfcf97 into cms-sw:master Jun 22, 2017
@smuzaffar
Copy link
Contributor

@dildick
Copy link
Contributor Author

dildick commented Jun 22, 2017

@smuzaffar No problem. That will be resolved in a next PR.

@mrodozov
Copy link
Contributor

@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
would you please fix this for the next IB ?

@dildick
Copy link
Contributor Author

dildick commented Jun 23, 2017

@smuzaffar @mrodozov #19418

@dildick dildick deleted the from-CMSSW_9_1_X_2017-04-28-1100-add-tmb-base-class branch June 23, 2017 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants