Skip to content

Commit bb52510

Browse files
authored
Merge pull request #43771 from iarspider/fix-deprecated-copy-L1CaloTrigger
Fix deprecated-copy warnings in L1CaloTrigger
2 parents 84d1607 + fea46e7 commit bb52510

File tree

1 file changed

+6
-42
lines changed

1 file changed

+6
-42
lines changed

L1Trigger/L1CaloTrigger/interface/Phase2L1CaloEGammaUtils.h

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -444,12 +444,6 @@ namespace p2eg {
444444
fb = 0;
445445
};
446446

447-
// copy constructor
448-
towerHCAL(const towerHCAL& other) {
449-
et = other.et;
450-
fb = other.fb;
451-
};
452-
453447
// set members
454448
inline void zeroOut() {
455449
et = 0;
@@ -486,6 +480,12 @@ namespace p2eg {
486480
};
487481
};
488482

483+
// overload operator= to use copy constructor
484+
towers3x4 operator=(const towers3x4& other) {
485+
const towers3x4& newTowers3x4(other);
486+
return newTowers3x4;
487+
};
488+
489489
// set members
490490
inline void zeroOut() {
491491
for (int i = 0; i < TOWER_IN_ETA; i++) {
@@ -606,13 +606,6 @@ namespace p2eg {
606606
phiMax = 0;
607607
etaMax = 0;
608608
}
609-
610-
crystalMax& operator=(const crystalMax& rhs) {
611-
energy = rhs.energy;
612-
phiMax = rhs.phiMax;
613-
etaMax = rhs.etaMax;
614-
return *this;
615-
}
616609
};
617610

618611
class ecaltp_t {
@@ -689,10 +682,6 @@ namespace p2eg {
689682
ap_uint<16> data;
690683

691684
tower_t() { data = 0; }
692-
tower_t& operator=(const tower_t& rhs) {
693-
data = rhs.data;
694-
return *this;
695-
}
696685

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

@@ -780,17 +769,6 @@ namespace p2eg {
780769
etaMax = 0;
781770
brems = 0;
782771
}
783-
784-
clusterInfo& operator=(const clusterInfo& rhs) {
785-
seedEnergy = rhs.seedEnergy;
786-
energy = rhs.energy;
787-
et5x5 = rhs.et5x5;
788-
et2x5 = rhs.et2x5;
789-
phiMax = rhs.phiMax;
790-
etaMax = rhs.etaMax;
791-
brems = rhs.brems;
792-
return *this;
793-
}
794772
};
795773

796774
//--------------------------------------------------------//
@@ -851,20 +829,6 @@ namespace p2eg {
851829
is_looseTkiso = cluster_is_looseTkiso;
852830
}
853831

854-
Cluster& operator=(const Cluster& rhs) {
855-
data = rhs.data;
856-
regionIdx = rhs.regionIdx;
857-
calib = rhs.calib;
858-
brems = rhs.brems;
859-
et5x5 = rhs.et5x5;
860-
et2x5 = rhs.et2x5;
861-
is_ss = rhs.is_ss;
862-
is_looseTkss = rhs.is_looseTkss;
863-
is_iso = rhs.is_iso;
864-
is_looseTkiso = rhs.is_looseTkiso;
865-
return *this;
866-
}
867-
868832
void setRegionIdx(int regIdx) { regionIdx = regIdx; } // Newly added
869833

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

0 commit comments

Comments
 (0)