1 #ifndef ATLASFE4IINTERPRETER_H
2 #define ATLASFE4IINTERPRETER_H
5 typedef unsigned int uint;
23 static const uint dh_wrd = 0x00E90000;
24 static const uint dh_msk = 0xFFFF0000;
25 static const uint dh_flag_msk = 0x00008000;
27 inline bool is_dh(uint X)
const {
return (dh_msk & X) == dh_wrd; }
28 inline uint get_dh_flag(uint X)
const {
return (dh_flag_msk & X) >> 15; }
29 inline bool is_dh_flag_set(uint X)
const {
30 return (dh_flag_msk & X) == dh_flag_msk;
34 inline uint get_dh_lv1id(uint X)
const {
37 inline uint get_dh_bcid(uint X)
const {
return (dh_bcid_msk & X); }
42 static const uint dr_col_msk = 0x00FE0000;
43 static const uint dr_row_msk = 0x0001FF00;
44 static const uint dr_tot1_msk = 0x000000F0;
45 static const uint dr_tot2_msk = 0x0000000F;
48 static const uint rd_min_col = 1;
49 static const uint rd_max_col = 80;
50 static const uint rd_min_row = 1;
51 static const uint rd_max_row = 336;
54 static const uint dr_min_col = rd_min_col << 17;
55 static const uint dr_max_col = rd_max_col << 17;
56 static const uint dr_min_row = rd_min_row << 8;
57 static const uint dr_max_row = rd_max_row << 8;
59 inline bool is_dr(uint X)
const {
61 return (((dr_col_msk & X) <= dr_max_col) &&
62 ((dr_col_msk & X) >= dr_min_col) &&
63 ((dr_row_msk & X) <= dr_max_row) &&
64 ((dr_row_msk & X) >= dr_min_row));
67 inline uint get_dr_col1(uint X)
const {
return (dr_col_msk & X) >> 17; }
68 inline uint get_dr_row1(uint X)
const {
return (dr_row_msk & X) >> 8; }
69 inline uint get_dr_tot1(uint X)
const {
return (dr_tot1_msk & X) >> 4; }
70 inline uint get_dr_col2(uint X)
const {
return (dr_col_msk & X) >> 17; }
71 inline uint get_dr_row2(uint X)
const {
72 return ((dr_row_msk & X) >> 8) + 1;
74 inline uint get_dr_tot2(uint X)
const {
return (dr_tot2_msk & X); }
79 static const uint tr_wrd_hdr_v10 = 0x00FFFF00;
80 static const uint tr_wrd_hdr_msk_v10 = 0xFFFFFF00;
81 static const uint tr_wrd_hdr = 0x00F80000;
84 static const uint tr_wrd_hdr_msk = 0xFFFF0000;
86 static const uint tr_no_31_24_msk = 0x000000FF;
87 static const uint tr_no_23_0_msk = 0x00FFFFFF;
89 static const uint tr_data_msk = 0x0000FF00;
90 static const uint tr_mode_msk = 0x0000E000;
91 static const uint tr_err_msk = 0x00001F00;
95 inline bool is_tr(uint X)
const {
96 return ((tr_wrd_hdr_msk & X) == tr_wrd_hdr) ||
97 ((tr_wrd_hdr_msk_v10 & X) == tr_wrd_hdr_v10);
100 inline uint get_tr_no_2(uint X, uint Y)
const {
101 return ((tr_no_31_24_msk & X) << 24) | (tr_no_23_0_msk & Y);
103 inline bool get_tr_err_occurred(uint X)
const {
104 return (((tr_err_msk & X) >> 8) == 0x0) ||
105 ((tr_wrd_hdr_msk_v10 & X) == tr_wrd_hdr_v10);
108 inline uint get_tr_data(uint X)
const {
return (tr_data_msk & X) >> 8; }
109 inline uint get_tr_err(uint X)
const {
return (tr_err_msk & X) >> 8; }
110 inline uint get_tr_mode(uint X)
const {
return (tr_mode_msk & X) >> 13; }
126 static uint getShift() {
128 std::bitset<32> maskField(bitmask);
130 while (maskField[count] !=
true) {
136 enum { shiftValue = getShift() };
143 #endif // ATLASFE4IINTERPRETER_H
Definition: ATLASFE4IInterpreter.hh:125
Definition: ATLASFE4IInterpreter.hh:18