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

TkDQM: fix reset counter logic in SiPixelDigiSource #32875

Closed
wants to merge 1 commit into from

Conversation

sroychow
Copy link
Contributor

PR description:

A follow up to #32805 fixing the logic of counter reset after 10 lumis. @makortel I have tried to implement what you had suggested in the earlier PR. Please have a look.

PR validation:

Test with : runTheMatrix.py -t 4 -l 4.53

if this PR is a backport please specify the original PR and why you need to backport that PR:

NA

@cmsbuild cmsbuild added this to the CMSSW_11_3_X milestone Feb 11, 2021
@sroychow sroychow changed the title fix reset counter logic TkDQM: fix reset counter logic in SiPixelDigiSource Feb 11, 2021
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32875/21105

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @sroychow (Suvankar Roy Chowdhury) for master.

It involves the following packages:

DQM/SiPixelMonitorDigi

@andrius-k, @kmaeshima, @ErnestaP, @ahmad3213, @cmsbuild, @jfernan2, @rvenditti can you please review it and eventually sign? Thanks.
@arossi83, @hdelanno, @sroychow, @fioriNTU, @jandrea, @idebruyn, @threus this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

unsigned int currentLS = lumi.id().luminosityBlock();
bool resetCounters = (currentLS % 10 == 0) ? true : false;
return std::make_shared<bool>(resetCounters);
auto lsc = std::make_shared<SiPixelDigiCounter>();
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect this is not what you want. Now a new SiPixelDigiCounter is created for every lumi, and in principle the "reset" logic below is unnecessary (except it sets the booleans to true while the constructor sets them to false).

What I tried to suggest in #32805 (comment) would be to have a member variable e.g. std::shared_ptr<SiPixelDigiCounter> latestCounters_, and then here

if (not modOn or resetCounters) {
  latestCounters_ = std::make_shared<SiPixelDigiCounter>();
}

and have all the resetting logic in the constructor of SiPixelDigiCounter.

return std::make_shared<bool>(resetCounters);
auto lsc = std::make_shared<SiPixelDigiCounter>();

if (modOn && resetCounters && averageDigiOccupancy) {
Copy link
Contributor

Choose a reason for hiding this comment

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

When can the averageDigiOccupancy part evaluate to false?

(I didn't see how it could be, but if I missed something, the SiPixelDigiCounter would likely have to split into two classes, one for counters being reset when averageDigiOccupancy == true and another being reset independently of averageDigiOccupancy)

@jfernan2
Copy link
Contributor

jfernan2 commented Apr 5, 2021

please test

@jfernan2
Copy link
Contributor

jfernan2 commented Apr 5, 2021

please abort

@smuzaffar smuzaffar modified the milestones: CMSSW_12_2_X, CMSSW_12_3_X Dec 6, 2021
@jfernan2
Copy link
Contributor

@sroychow what are your plans for this PR?

@jfernan2
Copy link
Contributor

jfernan2 commented Feb 1, 2022

ping @sroychow

@smuzaffar smuzaffar modified the milestones: CMSSW_12_3_X, CMSSW_12_4_X Mar 11, 2022
@emanueleusai
Copy link
Member

@sroychow can we close this if this is not active?

@emanueleusai
Copy link
Member

-1
to remove from DQM queue, will resign when it becomes active again

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.

6 participants