Skip to content

Commit

Permalink
Merge pull request #43771 from iarspider/fix-deprecated-copy-L1CaloTr…
Browse files Browse the repository at this point in the history
…igger

Fix deprecated-copy warnings in L1CaloTrigger
  • Loading branch information
cmsbuild authored Jan 23, 2024
2 parents 84d1607 + fea46e7 commit bb52510
Showing 1 changed file with 6 additions and 42 deletions.
48 changes: 6 additions & 42 deletions L1Trigger/L1CaloTrigger/interface/Phase2L1CaloEGammaUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,6 @@ namespace p2eg {
fb = 0;
};

// copy constructor
towerHCAL(const towerHCAL& other) {
et = other.et;
fb = other.fb;
};

// set members
inline void zeroOut() {
et = 0;
Expand Down Expand Up @@ -486,6 +480,12 @@ namespace p2eg {
};
};

// overload operator= to use copy constructor
towers3x4 operator=(const towers3x4& other) {
const towers3x4& newTowers3x4(other);
return newTowers3x4;
};

// set members
inline void zeroOut() {
for (int i = 0; i < TOWER_IN_ETA; i++) {
Expand Down Expand Up @@ -606,13 +606,6 @@ namespace p2eg {
phiMax = 0;
etaMax = 0;
}

crystalMax& operator=(const crystalMax& rhs) {
energy = rhs.energy;
phiMax = rhs.phiMax;
etaMax = rhs.etaMax;
return *this;
}
};

class ecaltp_t {
Expand Down Expand Up @@ -689,10 +682,6 @@ namespace p2eg {
ap_uint<16> data;

tower_t() { data = 0; }
tower_t& operator=(const tower_t& rhs) {
data = rhs.data;
return *this;
}

tower_t(ap_uint<12> et, ap_uint<4> hoe) { data = (et) | (((ap_uint<16>)hoe) << 12); }

Expand Down Expand Up @@ -780,17 +769,6 @@ namespace p2eg {
etaMax = 0;
brems = 0;
}

clusterInfo& operator=(const clusterInfo& rhs) {
seedEnergy = rhs.seedEnergy;
energy = rhs.energy;
et5x5 = rhs.et5x5;
et2x5 = rhs.et2x5;
phiMax = rhs.phiMax;
etaMax = rhs.etaMax;
brems = rhs.brems;
return *this;
}
};

//--------------------------------------------------------//
Expand Down Expand Up @@ -851,20 +829,6 @@ namespace p2eg {
is_looseTkiso = cluster_is_looseTkiso;
}

Cluster& operator=(const Cluster& rhs) {
data = rhs.data;
regionIdx = rhs.regionIdx;
calib = rhs.calib;
brems = rhs.brems;
et5x5 = rhs.et5x5;
et2x5 = rhs.et2x5;
is_ss = rhs.is_ss;
is_looseTkss = rhs.is_looseTkss;
is_iso = rhs.is_iso;
is_looseTkiso = rhs.is_looseTkiso;
return *this;
}

void setRegionIdx(int regIdx) { regionIdx = regIdx; } // Newly added

ap_uint<12> clusterEnergy() const { return (data & 0xFFF); }
Expand Down

0 comments on commit bb52510

Please sign in to comment.