Skip to content

Commit 5f53407

Browse files
committed
Fix warning about implicitly-declared copy constructor
1 parent 24690bd commit 5f53407

File tree

2 files changed

+54
-73
lines changed

2 files changed

+54
-73
lines changed

DataFormats/METReco/interface/PhiWedge.h

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,65 @@
1-
#ifndef DATAFORMATS_METRECO_PHIWEDGE_H
2-
#define DATAFORMATS_METRECO_PHIWEDGE_H
1+
#ifndef DataFormats_METReco_interface_PhiWedge_h
2+
#define DataFormats_METReco_interface_PhiWedge_h
33
/*
44
[class]: PhiWedge
55
[authors]: R. Remington, The University of Florida
66
[description]: Simple class analogous to CaloTower but in z-direction. Stores basic information related to Hcal and Ecal rechits within constant 5-degree phi windows. The idea will be to match these reconstructed phi-wedges with csc tracks for BeamHalo identification.
77
[date]: October 15, 2009
88
*/
9-
#include "TMath.h"
9+
1010
#include <vector>
11+
12+
#include "TMath.h"
13+
1114
namespace reco {
1215

1316
class PhiWedge {
1417
public:
1518
// Constructors
16-
PhiWedge();
17-
PhiWedge(float E, int iphi, int constituents);
18-
PhiWedge(float E, int iphi, int constituents, float min_time, float max_time);
19-
PhiWedge(const PhiWedge&);
20-
// Destructors
19+
constexpr PhiWedge()
20+
: energy_{0.f},
21+
iphi_{0},
22+
constituents_{0},
23+
min_time_{0.f},
24+
max_time_{0.f},
25+
PlusZOriginConfidence_{0.f},
26+
OverlappingCSCTracks_{0},
27+
OverlappingCSCSegments_{0},
28+
OverlappingCSCRecHits_{0},
29+
OverlappingCSCHaloTriggers_{0} {}
30+
31+
constexpr PhiWedge(float E, int iphi, int constituents)
32+
: energy_{E},
33+
iphi_{iphi},
34+
constituents_{constituents},
35+
min_time_{0.f},
36+
max_time_{0.f},
37+
PlusZOriginConfidence_{0.f},
38+
OverlappingCSCTracks_{0},
39+
OverlappingCSCSegments_{0},
40+
OverlappingCSCRecHits_{0},
41+
OverlappingCSCHaloTriggers_{0} {}
2142

22-
~PhiWedge() {}
43+
constexpr PhiWedge(float E, int iphi, int constituents, float min_time, float max_time)
44+
: energy_{E},
45+
iphi_{iphi},
46+
constituents_{constituents},
47+
min_time_{min_time},
48+
max_time_{max_time},
49+
PlusZOriginConfidence_{0.f},
50+
OverlappingCSCTracks_{0},
51+
OverlappingCSCSegments_{0},
52+
OverlappingCSCRecHits_{0},
53+
OverlappingCSCHaloTriggers_{0} {}
54+
55+
constexpr PhiWedge(PhiWedge const &) = default;
56+
constexpr PhiWedge(PhiWedge &&) = default;
57+
58+
constexpr PhiWedge &operator=(PhiWedge const &) = default;
59+
constexpr PhiWedge &operator=(PhiWedge &&) = default;
60+
61+
// Destructor
62+
constexpr ~PhiWedge() = default;
2363

2464
// Energy sum of all rechits above threshold in this 5-degree window
2565
float Energy() const { return energy_; }
@@ -80,6 +120,9 @@ namespace reco {
80120
int OverlappingCSCRecHits_;
81121
int OverlappingCSCHaloTriggers_;
82122
};
83-
typedef std::vector<PhiWedge> PhiWedgeCollection;
123+
124+
using PhiWedgeCollection = std::vector<PhiWedge>;
125+
84126
} // namespace reco
85-
#endif
127+
128+
#endif // DataFormats_METReco_interface_PhiWedge_h

DataFormats/METReco/src/PhiWedge.cc

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)