Skip to content

Commit db86a8b

Browse files
authored
Merge pull request #49174 from iarspider/patch-11
L1CSCSPStatusDigi: replace bzero with explicit initialization
2 parents 63f91c4 + 0bec683 commit db86a8b

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed
Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
#ifndef L1CSCSPStatusDigi_h
22
#define L1CSCSPStatusDigi_h
33

4-
#include <cstring>
5-
64
class CSCTFUnpacker;
75

86
class L1CSCSPStatusDigi {
97
private:
10-
unsigned short sp_slot; //
11-
unsigned short l1a_bxn; // Take from the SP header
12-
unsigned short fmm_status; // Take from the SP header
13-
14-
unsigned short se; // Make logical OR of all tbins for each of 15(endcap) SE bits
15-
unsigned short sm; // Make logical OR of all tbins for each of 15(endcap) SM bits
16-
unsigned long bx; // Make logical OR of all tbins for each of 15(endcap)+2(barrel) BX bits
17-
unsigned long af; // Make logical OR of all tbins for each of 15(endcap)+2(barrel) AF bits
18-
unsigned long vp; // Make logical OR of all tbins for each of 15(endcap)+2(barrel) VP/VQ bits
8+
unsigned short sp_slot{}; //
9+
unsigned short l1a_bxn{}; // Take from the SP header
10+
unsigned short fmm_status{}; // Take from the SP header
11+
12+
unsigned short se{}; // Make logical OR of all tbins for each of 15(endcap) SE bits
13+
unsigned short sm{}; // Make logical OR of all tbins for each of 15(endcap) SM bits
14+
unsigned long bx{}; // Make logical OR of all tbins for each of 15(endcap)+2(barrel) BX bits
15+
unsigned long af{}; // Make logical OR of all tbins for each of 15(endcap)+2(barrel) AF bits
16+
unsigned long vp{}; // Make logical OR of all tbins for each of 15(endcap)+2(barrel) VP/VQ bits
1917
enum {
2018
IDLE = 1,
2119
CARRIER = 2,
2220
NORMAL = 4,
2321
ERROR = 8,
2422
FIFO = 16
2523
}; // States of optical receivers + Alignment FIFO full OR empty status
26-
unsigned short link_status[15]; // Optical receiver status ORed for all tbins
27-
unsigned short mpc_link_id; // MPC_id and link# from MEx Data Record ORed for all tbins
24+
unsigned short link_status[15]{}; // Optical receiver status ORed for all tbins
25+
unsigned short mpc_link_id{}; // MPC_id and link# from MEx Data Record ORed for all tbins
2826

29-
unsigned long track_cnt;
30-
unsigned long orbit_cnt;
27+
unsigned long track_cnt{};
28+
unsigned long orbit_cnt{};
3129

3230
friend class CSCTFUnpacker;
3331

@@ -45,8 +43,8 @@ class L1CSCSPStatusDigi {
4543
unsigned long track_counter(void) const throw() { return track_cnt; }
4644
unsigned long orbit_counter(void) const throw() { return orbit_cnt; }
4745

48-
L1CSCSPStatusDigi(void) { bzero(this, sizeof(L1CSCSPStatusDigi)); }
49-
~L1CSCSPStatusDigi(void) {}
46+
L1CSCSPStatusDigi(void) = default;
47+
~L1CSCSPStatusDigi(void) = default;
5048
};
5149

5250
#endif

0 commit comments

Comments
 (0)