Skip to content

Commit 477108c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6f2a51c commit 477108c

File tree

3 files changed

+57
-57
lines changed

3 files changed

+57
-57
lines changed

inc/TRestRawFEUDreamToSignalProcess.h

+18-18
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,25 @@ class TRestRawFEUDreamToSignalProcess : public TRestRawToSignalProcess {
6161
DataLineDream() { data = 0; }
6262
~DataLineDream() {}
6363
void ntohs_() { data = ntohs(data); };
64-
bool is_final_trailer() const { return (((data)&0x7000) >> 12) == 7; } // X111
65-
bool is_end_of_event() const { return (((data)&0x7800) >> 11) == 0xF; } // X1111
66-
bool is_data_trailer() const { return (((data)&0x6000) >> 13) == 2; } // X10X
67-
bool is_first_line() const { return (((data)&0x7000) >> 12) == 3; } // X011
68-
bool is_data() const { return (((data)&0x7000) >> 12) == 0; } // X000
69-
bool is_data_zs() const { return (((data)&0x6000) >> 13) == 0; } // X00X
70-
bool is_channel_ID() const { return (((data)&0x7000) >> 12) == 1; } // X001
71-
bool is_Feu_header() const { return (((data)&0x7000) >> 12) == 6; } // X110
72-
bool is_data_header() const { return (((data)&0x6000) >> 13) == 1; } // X01X
73-
bool get_zs_mode() const { return (((data)&0x400) >> 10); }
74-
int get_Feu_ID() const { return (((data)&0xFF)); }
75-
long int get_finetstp() const { return (((data)&0x0007)); }
64+
bool is_final_trailer() const { return (((data) & 0x7000) >> 12) == 7; } // X111
65+
bool is_end_of_event() const { return (((data) & 0x7800) >> 11) == 0xF; } // X1111
66+
bool is_data_trailer() const { return (((data) & 0x6000) >> 13) == 2; } // X10X
67+
bool is_first_line() const { return (((data) & 0x7000) >> 12) == 3; } // X011
68+
bool is_data() const { return (((data) & 0x7000) >> 12) == 0; } // X000
69+
bool is_data_zs() const { return (((data) & 0x6000) >> 13) == 0; } // X00X
70+
bool is_channel_ID() const { return (((data) & 0x7000) >> 12) == 1; } // X001
71+
bool is_Feu_header() const { return (((data) & 0x7000) >> 12) == 6; } // X110
72+
bool is_data_header() const { return (((data) & 0x6000) >> 13) == 1; } // X01X
73+
bool get_zs_mode() const { return (((data) & 0x400) >> 10); }
74+
int get_Feu_ID() const { return (((data) & 0xFF)); }
75+
long int get_finetstp() const { return (((data) & 0x0007)); }
7676
// #define GET_FINETSTP(word) (word & 0x0007)
77-
int get_sample_ID() const { return (((data)&0xFF8) >> 3); }
78-
int get_channel_ID() const { return (((data)&0x3F)); }
79-
int get_dream_ID() const { return (((data)&0xE00) >> 9); } // non-zS mode
80-
int get_dream_ID_ZS() const { return (((data)&0xE00) >> 6); } // zS mode
81-
int get_TimeStamp_Op() const { return (((data)&0x1FF)); }
82-
int get_data() const { return (((data)&0xFFF)); }
77+
int get_sample_ID() const { return (((data) & 0xFF8) >> 3); }
78+
int get_channel_ID() const { return (((data) & 0x3F)); }
79+
int get_dream_ID() const { return (((data) & 0xE00) >> 9); } // non-zS mode
80+
int get_dream_ID_ZS() const { return (((data) & 0xE00) >> 6); } // zS mode
81+
int get_TimeStamp_Op() const { return (((data) & 0x1FF)); }
82+
int get_data() const { return (((data) & 0xFFF)); }
8383
unsigned short int data;
8484
};
8585

inc/mygblink.h

+18-18
Original file line numberDiff line numberDiff line change
@@ -52,43 +52,43 @@ typedef struct _DataPacket {
5252
#define ACT_RQ_ACK 0x40
5353
#define ACT_SET_REQ 0x80
5454
#define ACT_MASK 0xF0
55-
#define PACKTX_PUT_ACT(act, ix) (((act)&ACT_MASK) | ((ix)&PACKTX_MAX_IX))
55+
#define PACKTX_PUT_ACT(act, ix) (((act) & ACT_MASK) | ((ix) & PACKTX_MAX_IX))
5656
// Supplementary actions not written in header
5757
#define ACT_RD_LB 0x100
5858
#define ACT_RD_UB 0x200
5959
#define ACT_RD_BB 0x300
6060

6161
// Response Packet Header Decode Macros
62-
#define GET_REQ_INDEX(word) ((word)&0x000F)
63-
#define GET_WR_ACK(word) ((word)&0x0030)
64-
#define GET_RD_ACK(word) ((word)&0x0040)
65-
#define GET_TR_OK(word) ((word)&0x0080)
66-
#define GET_TYPE(word) ((word)&0xF000)
62+
#define GET_REQ_INDEX(word) ((word) & 0x000F)
63+
#define GET_WR_ACK(word) ((word) & 0x0030)
64+
#define GET_RD_ACK(word) ((word) & 0x0040)
65+
#define GET_TR_OK(word) ((word) & 0x0080)
66+
#define GET_TYPE(word) ((word) & 0xF000)
6767

6868
// Response Packet Types (see t2k_pkg.vhd for coherence)
6969
#define RESP_TYPE_ADC_DATA 0x0000
7070
#define RESP_TYPE_SLOW_CTRL 0x1000
71-
#define GET_RESP_TYPE(word) (((word)&0xF000) >> 12)
72-
#define GET_RESP_INDEX(word) ((word)&0x000F)
71+
#define GET_RESP_TYPE(word) (((word) & 0xF000) >> 12)
72+
#define GET_RESP_INDEX(word) ((word) & 0x000F)
7373

7474
// Macros to interpret DataPacket header
75-
#define GET_FEC_ERROR(word) (((word)&0x03F0) >> 4)
76-
#define GET_LOS_FLAG(word) (((word)&0x0400) >> 10)
77-
#define GET_SYNCH_FAIL(word) (((word)&0x0800) >> 11)
75+
#define GET_FEC_ERROR(word) (((word) & 0x03F0) >> 4)
76+
#define GET_LOS_FLAG(word) (((word) & 0x0400) >> 10)
77+
#define GET_SYNCH_FAIL(word) (((word) & 0x0800) >> 11)
7878

7979
// Macros to interpret DataPacket read back arguments
80-
#define GET_RB_MODE(word) (((word)&0x4000) >> 14)
81-
#define GET_RB_COMPRESS(word) (((word)&0x2000) >> 13)
82-
#define GET_RB_ARG2(word) (((word)&0x1E00) >> 9)
83-
#define GET_RB_ARG1(word) (((word)&0x01FF))
80+
#define GET_RB_MODE(word) (((word) & 0x4000) >> 14)
81+
#define GET_RB_COMPRESS(word) (((word) & 0x2000) >> 13)
82+
#define GET_RB_ARG2(word) (((word) & 0x1E00) >> 9)
83+
#define GET_RB_ARG1(word) (((word) & 0x01FF))
8484

8585
// Macros to interpret DataPacket event type / count
86-
#define GET_EVENT_TYPE(word) (((word)&0xC000) >> 14)
87-
#define GET_EVENT_COUNT(word) (((word)&0x3FFF))
86+
#define GET_EVENT_TYPE(word) (((word) & 0xC000) >> 14)
87+
#define GET_EVENT_COUNT(word) (((word) & 0x3FFF))
8888

8989
// Macros to interpret DataPacket Samples
9090
#define CELL_INDEX_FLAG 0x1000
91-
#define GET_CELL_INDEX(word) (((word)&0x0FFF))
91+
#define GET_CELL_INDEX(word) (((word) & 0x0FFF))
9292

9393
// Function prototypes
9494
/*

src/TRestRawMultiFEMINOSToSignalProcess.cxx

+21-21
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
//
8181
// Macros to act on 8-bit data content
8282
//
83-
#define GET_ASCII_LEN(w) (((w)&0x00FF) >> 0)
84-
#define PUT_ASCII_LEN(w) (PFX_ASCII_MSG_LEN | ((w)&0x00FF))
83+
#define GET_ASCII_LEN(w) (((w) & 0x00FF) >> 0)
84+
#define PUT_ASCII_LEN(w) (PFX_ASCII_MSG_LEN | ((w) & 0x00FF))
8585
//
8686
// Prefix Codes for 0-bit data content
8787
//
@@ -121,37 +121,37 @@
121121
//
122122
// Macros to act on 4-bit data content
123123
//
124-
#define GET_EVENT_TYPE(w) (((w)&0x0007) >> 0)
125-
#define GET_EOE_SIZE(w) (((w)&0x000F) >> 0)
124+
#define GET_EVENT_TYPE(w) (((w) & 0x0007) >> 0)
125+
#define GET_EOE_SIZE(w) (((w) & 0x000F) >> 0)
126126

127127
//
128128
// Macros to extract 14-bit data content
129129
//
130-
#define GET_CARD_IX(w) (((w)&0x3E00) >> 9)
131-
#define GET_CHIP_IX(w) (((w)&0x0180) >> 7)
132-
#define GET_CHAN_IX(w) (((w)&0x007F) >> 0)
130+
#define GET_CARD_IX(w) (((w) & 0x3E00) >> 9)
131+
#define GET_CHIP_IX(w) (((w) & 0x0180) >> 7)
132+
#define GET_CHAN_IX(w) (((w) & 0x007F) >> 0)
133133

134134
//
135135
// Macros to extract 12-bit data content
136136
//
137-
#define GET_ADC_DATA(w) (((w)&0x0FFF) >> 0)
138-
#define GET_LAT_HISTO_BIN(w) (((w)&0x0FFF) >> 0)
139-
#define PUT_LAT_HISTO_BIN(w) (PFX_LAT_HISTO_BIN | (((w)&0x0FFF) >> 0))
140-
#define GET_LST_READ_CELL(w) (((w)&0x03FF) >> 0)
141-
#define GET_LST_READ_CELL_CHIP_IX(w) (((w)&0x0C00) >> 10)
137+
#define GET_ADC_DATA(w) (((w) & 0x0FFF) >> 0)
138+
#define GET_LAT_HISTO_BIN(w) (((w) & 0x0FFF) >> 0)
139+
#define PUT_LAT_HISTO_BIN(w) (PFX_LAT_HISTO_BIN | (((w) & 0x0FFF) >> 0))
140+
#define GET_LST_READ_CELL(w) (((w) & 0x03FF) >> 0)
141+
#define GET_LST_READ_CELL_CHIP_IX(w) (((w) & 0x0C00) >> 10)
142142

143143
//
144144
// Macros to extract 9-bit data content
145145
//
146-
#define GET_TIME_BIN(w) (((w)&0x01FF) >> 0)
147-
#define GET_HISTO_BIN(w) (((w)&0x01FF) >> 0)
148-
#define GET_PEDTHR_LIST_FEM(w) (((w)&0x01F0) >> 4)
149-
#define GET_PEDTHR_LIST_ASIC(w) (((w)&0x000C) >> 2)
150-
#define GET_PEDTHR_LIST_MODE(w) (((w)&0x0002) >> 1)
151-
#define GET_PEDTHR_LIST_TYPE(w) (((w)&0x0001) >> 0)
152-
#define PUT_FVERSION_FEMID(w, fv, id) (((w)&0xFE00) | (((fv)&0x0003) << 7) | (((id)&0x001F) << 0))
153-
#define GET_FRAMING_VERSION(w) (((w)&0x0180) >> 7)
154-
#define GET_FEMID(w) (((w)&0x001F) >> 0)
146+
#define GET_TIME_BIN(w) (((w) & 0x01FF) >> 0)
147+
#define GET_HISTO_BIN(w) (((w) & 0x01FF) >> 0)
148+
#define GET_PEDTHR_LIST_FEM(w) (((w) & 0x01F0) >> 4)
149+
#define GET_PEDTHR_LIST_ASIC(w) (((w) & 0x000C) >> 2)
150+
#define GET_PEDTHR_LIST_MODE(w) (((w) & 0x0002) >> 1)
151+
#define GET_PEDTHR_LIST_TYPE(w) (((w) & 0x0001) >> 0)
152+
#define PUT_FVERSION_FEMID(w, fv, id) (((w) & 0xFE00) | (((fv) & 0x0003) << 7) | (((id) & 0x001F) << 0))
153+
#define GET_FRAMING_VERSION(w) (((w) & 0x0180) >> 7)
154+
#define GET_FEMID(w) (((w) & 0x001F) >> 0)
155155

156156
// Definition of verboseness flags used by MFrame_Print
157157
#define FRAME_PRINT_ALL 0x00000001

0 commit comments

Comments
 (0)