Skip to content

Commit

Permalink
Merge pull request #38417 from perrotta/removeDuplicateInitializations
Browse files Browse the repository at this point in the history
Remove duplicate initializations in two  DQM/HcalTasks plugins
  • Loading branch information
cmsbuild authored Jun 22, 2022
2 parents ce9cb79 + 5223dc7 commit 09e775d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions DQM/HcalTasks/plugins/RecHitTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ RecHitTask::RecHitTask(edm::ParameterSet const& ps)

// To fill histograms outside of the loop, you need to determine if there were
// any valid det ids first
uint32_t rawidValid = 0;
uint32_t rawidHBValid = 0;
uint32_t rawidHEValid = 0;

Expand Down Expand Up @@ -479,7 +478,6 @@ RecHitTask::RecHitTask(edm::ParameterSet const& ps)
//{meUnknownIds1LS->Fill(1); _unknownIdsPresent=true;continue;}

HcalElectronicsId const& eid(rawid);
rawidValid = did.rawId();
if (did.subdet() == HcalBarrel)
rawidHBValid = did.rawId();
else if (did.subdet() == HcalEndcap)
Expand Down Expand Up @@ -580,8 +578,9 @@ RecHitTask::RecHitTask(edm::ParameterSet const& ps)
// ^^^ONLINE ONLY!
}

// reset
rawidValid = 0;
// To fill histograms outside of the loop, you need to determine if there were
// any valid det ids first
uint32_t rawidValid = 0;

int nChsHO = 0;
int nChsHOCut = 0;
Expand Down
2 changes: 0 additions & 2 deletions DQM/HcalTasks/plugins/TPTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,6 @@ TPTask::TPTask(edm::ParameterSet const& ps)

numHBHE = 0;
numHF = 0;
numCutHBHE = 0;
numCutHF = 0;
numMsnHBHE = 0;
numMsnHF = 0;
numCutHBHE = 0;
Expand Down

0 comments on commit 09e775d

Please sign in to comment.