Skip to content

Commit

Permalink
initialize variables to 0 (comments cms-sw#42246)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbsauvan committed Jul 19, 2023
1 parent 5bcce8c commit 3ef388c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions L1Trigger/L1THGCal/src/HGCalTriggerTowerGeometryHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ HGCalTriggerTowerGeometryHelper::HGCalTriggerTowerGeometryHelper(const edm::Para
"file.\n"
<< "The incorrect line is:" << line << std::endl;
}
int subdet;
int layer;
int moduleU;
int moduleV;
int numTowers;
int subdet = 0;
int layer = 0;
int moduleU = 0;
int moduleV = 0;
int numTowers = 0;
std::stringstream ss(line);
ss >> subdet >> layer >> moduleU >> moduleV >> numTowers;
if (numOfWordsInThisRow != (numTowers * numOfWordsPerTower + minNumOfWordsPerRow)) {
Expand All @@ -132,9 +132,9 @@ HGCalTriggerTowerGeometryHelper::HGCalTriggerTowerGeometryHelper(const edm::Para
unsigned packed_modID = packLayerSubdetWaferId(subdet, layer, moduleU, moduleV);
std::vector<unsigned> towers;
for (int itr_tower = 0; itr_tower < numTowers; itr_tower++) {
int iEta_raw;
int iPhi_raw;
int towerShare;
int iEta_raw = 0;
int iPhi_raw = 0;
int towerShare = 0;
ss >> iEta_raw >> iPhi_raw >> towerShare;
int splitDivisor = (subdet == 2) ? splitDivisorScint_ : splitDivisorSilic_;
if ((towerShare > splitDivisor) || (towerShare < 1)) {
Expand Down

0 comments on commit 3ef388c

Please sign in to comment.