Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:54

0001 #include <cstdint>
0002 // Class for Block of Counters
0003 
0004 #ifndef __l1t_emtf_Counters_h__
0005 #define __l1t_emtf_Counters_h__
0006 
0007 namespace l1t {
0008   namespace emtf {
0009     class Counters {
0010     public:
0011       explicit Counters(uint64_t dataword);
0012 
0013       // TODO: rpc_counter not yet implemented in FW - AWB 31.01.16
0014       // TODO: gem_counter not yet implemented in FW - JS 01.07.20
0015       // Autogenerate this class?
0016       Counters()
0017           : me1a_1(-99),
0018             me1a_2(-99),
0019             me1a_3(-99),
0020             me1a_4(-99),
0021             me1a_5(-99),
0022             me1a_6(-99),
0023             me1a_7(-99),
0024             me1a_8(-99),
0025             me1a_9(-99),
0026             me1b_1(-99),
0027             me1b_2(-99),
0028             me1b_3(-99),
0029             me1b_4(-99),
0030             me1b_5(-99),
0031             me1b_6(-99),
0032             me1b_7(-99),
0033             me1b_8(-99),
0034             me1b_9(-99),
0035             me2_1(-99),
0036             me2_2(-99),
0037             me2_3(-99),
0038             me2_4(-99),
0039             me2_5(-99),
0040             me2_6(-99),
0041             me2_7(-99),
0042             me2_8(-99),
0043             me2_9(-99),
0044             me3_1(-99),
0045             me3_2(-99),
0046             me3_3(-99),
0047             me3_4(-99),
0048             me3_5(-99),
0049             me3_6(-99),
0050             me3_7(-99),
0051             me3_8(-99),
0052             me3_9(-99),
0053             me4_1(-99),
0054             me4_2(-99),
0055             me4_3(-99),
0056             me4_4(-99),
0057             me4_5(-99),
0058             me4_6(-99),
0059             me4_7(-99),
0060             me4_8(-99),
0061             me4_9(-99),
0062             me1n_3(-99),
0063             me1n_6(-99),
0064             me1n_9(-99),
0065             me2n_3(-99),
0066             me2n_9(-99),
0067             me3n_3(-99),
0068             me3n_9(-99),
0069             me4n_3(-99),
0070             me4n_9(-99),
0071             me1a_all(-99),
0072             me1b_all(-99),
0073             me2_all(-99),
0074             me3_all(-99),
0075             me4_all(-99),
0076             meN_all(-99),
0077             me_all(-99),
0078             format_errors(0),
0079             dataword(-99){};
0080 
0081       Counters(int int_me1a_all,
0082                int int_me1b_all,
0083                int int_me2_all,
0084                int int_me3_all,
0085                int int_me4_all,
0086                int int_meN_all,
0087                int int_me_all)
0088           : me1a_all(int_me1a_all),
0089             me1b_all(int_me1b_all),
0090             me2_all(int_me2_all),
0091             me3_all(int_me3_all),
0092             me4_all(int_me4_all),
0093             meN_all(int_meN_all),
0094             me_all(int_me_all),
0095             dataword(-99){};
0096 
0097       virtual ~Counters(){};
0098 
0099       void set_me1a_1(int bits) { me1a_1 = bits; }
0100       void set_me1a_2(int bits) { me1a_2 = bits; }
0101       void set_me1a_3(int bits) { me1a_3 = bits; }
0102       void set_me1a_4(int bits) { me1a_4 = bits; }
0103       void set_me1a_5(int bits) { me1a_5 = bits; }
0104       void set_me1a_6(int bits) { me1a_6 = bits; }
0105       void set_me1a_7(int bits) { me1a_7 = bits; }
0106       void set_me1a_8(int bits) { me1a_8 = bits; }
0107       void set_me1a_9(int bits) { me1a_9 = bits; }
0108       void set_me1b_1(int bits) { me1b_1 = bits; }
0109       void set_me1b_2(int bits) { me1b_2 = bits; }
0110       void set_me1b_3(int bits) { me1b_3 = bits; }
0111       void set_me1b_4(int bits) { me1b_4 = bits; }
0112       void set_me1b_5(int bits) { me1b_5 = bits; }
0113       void set_me1b_6(int bits) { me1b_6 = bits; }
0114       void set_me1b_7(int bits) { me1b_7 = bits; }
0115       void set_me1b_8(int bits) { me1b_8 = bits; }
0116       void set_me1b_9(int bits) { me1b_9 = bits; }
0117       void set_me2_1(int bits) { me2_1 = bits; }
0118       void set_me2_2(int bits) { me2_2 = bits; }
0119       void set_me2_3(int bits) { me2_3 = bits; }
0120       void set_me2_4(int bits) { me2_4 = bits; }
0121       void set_me2_5(int bits) { me2_5 = bits; }
0122       void set_me2_6(int bits) { me2_6 = bits; }
0123       void set_me2_7(int bits) { me2_7 = bits; }
0124       void set_me2_8(int bits) { me2_8 = bits; }
0125       void set_me2_9(int bits) { me2_9 = bits; }
0126       void set_me3_1(int bits) { me3_1 = bits; }
0127       void set_me3_2(int bits) { me3_2 = bits; }
0128       void set_me3_3(int bits) { me3_3 = bits; }
0129       void set_me3_4(int bits) { me3_4 = bits; }
0130       void set_me3_5(int bits) { me3_5 = bits; }
0131       void set_me3_6(int bits) { me3_6 = bits; }
0132       void set_me3_7(int bits) { me3_7 = bits; }
0133       void set_me3_8(int bits) { me3_8 = bits; }
0134       void set_me3_9(int bits) { me3_9 = bits; }
0135       void set_me4_1(int bits) { me4_1 = bits; }
0136       void set_me4_2(int bits) { me4_2 = bits; }
0137       void set_me4_3(int bits) { me4_3 = bits; }
0138       void set_me4_4(int bits) { me4_4 = bits; }
0139       void set_me4_5(int bits) { me4_5 = bits; }
0140       void set_me4_6(int bits) { me4_6 = bits; }
0141       void set_me4_7(int bits) { me4_7 = bits; }
0142       void set_me4_8(int bits) { me4_8 = bits; }
0143       void set_me4_9(int bits) { me4_9 = bits; }
0144       void set_me1n_3(int bits) { me1n_3 = bits; }
0145       void set_me1n_6(int bits) { me1n_6 = bits; }
0146       void set_me1n_9(int bits) { me1n_9 = bits; }
0147       void set_me2n_3(int bits) { me2n_3 = bits; }
0148       void set_me2n_9(int bits) { me2n_9 = bits; }
0149       void set_me3n_3(int bits) { me3n_3 = bits; }
0150       void set_me3n_9(int bits) { me3n_9 = bits; }
0151       void set_me4n_3(int bits) { me4n_3 = bits; }
0152       void set_me4n_9(int bits) { me4n_9 = bits; }
0153 
0154       void set_me1a_all(int bits) { me1a_all = bits; }
0155       void set_me1b_all(int bits) { me1b_all = bits; }
0156       void set_me2_all(int bits) { me2_all = bits; }
0157       void set_me3_all(int bits) { me3_all = bits; }
0158       void set_me4_all(int bits) { me4_all = bits; }
0159       void set_meN_all(int bits) { meN_all = bits; }
0160       void set_me_all(int bits) { me_all = bits; }
0161       void add_format_error() { format_errors += 1; }
0162       void set_dataword(uint64_t bits) { dataword = bits; }
0163 
0164       int ME1a_1() const { return me1a_1; }
0165       int ME1a_2() const { return me1a_2; }
0166       int ME1a_3() const { return me1a_3; }
0167       int ME1a_4() const { return me1a_4; }
0168       int ME1a_5() const { return me1a_5; }
0169       int ME1a_6() const { return me1a_6; }
0170       int ME1a_7() const { return me1a_7; }
0171       int ME1a_8() const { return me1a_8; }
0172       int ME1a_9() const { return me1a_9; }
0173       int ME1b_1() const { return me1b_1; }
0174       int ME1b_2() const { return me1b_2; }
0175       int ME1b_3() const { return me1b_3; }
0176       int ME1b_4() const { return me1b_4; }
0177       int ME1b_5() const { return me1b_5; }
0178       int ME1b_6() const { return me1b_6; }
0179       int ME1b_7() const { return me1b_7; }
0180       int ME1b_8() const { return me1b_8; }
0181       int ME1b_9() const { return me1b_9; }
0182       int ME2_1() const { return me2_1; }
0183       int ME2_2() const { return me2_2; }
0184       int ME2_3() const { return me2_3; }
0185       int ME2_4() const { return me2_4; }
0186       int ME2_5() const { return me2_5; }
0187       int ME2_6() const { return me2_6; }
0188       int ME2_7() const { return me2_7; }
0189       int ME2_8() const { return me2_8; }
0190       int ME2_9() const { return me2_9; }
0191       int ME3_1() const { return me3_1; }
0192       int ME3_2() const { return me3_2; }
0193       int ME3_3() const { return me3_3; }
0194       int ME3_4() const { return me3_4; }
0195       int ME3_5() const { return me3_5; }
0196       int ME3_6() const { return me3_6; }
0197       int ME3_7() const { return me3_7; }
0198       int ME3_8() const { return me3_8; }
0199       int ME3_9() const { return me3_9; }
0200       int ME4_1() const { return me4_1; }
0201       int ME4_2() const { return me4_2; }
0202       int ME4_3() const { return me4_3; }
0203       int ME4_4() const { return me4_4; }
0204       int ME4_5() const { return me4_5; }
0205       int ME4_6() const { return me4_6; }
0206       int ME4_7() const { return me4_7; }
0207       int ME4_8() const { return me4_8; }
0208       int ME4_9() const { return me4_9; }
0209       int ME1n_3() const { return me1n_3; }
0210       int ME1n_6() const { return me1n_6; }
0211       int ME1n_9() const { return me1n_9; }
0212       int ME2n_3() const { return me2n_3; }
0213       int ME2n_9() const { return me2n_9; }
0214       int ME3n_3() const { return me3n_3; }
0215       int ME3n_9() const { return me3n_9; }
0216       int ME4n_3() const { return me4n_3; }
0217       int ME4n_9() const { return me4n_9; }
0218 
0219       int ME1a_all() const { return me1a_all; }
0220       int ME1b_all() const { return me1b_all; }
0221       int ME2_all() const { return me2_all; }
0222       int ME3_all() const { return me3_all; }
0223       int ME4_all() const { return me4_all; }
0224       int MEN_all() const { return meN_all; }
0225       int ME_all() const { return me_all; }
0226       int Format_errors() const { return format_errors; }
0227       uint64_t Dataword() const { return dataword; }
0228 
0229     private:
0230       int me1a_1;
0231       int me1a_2;
0232       int me1a_3;
0233       int me1a_4;
0234       int me1a_5;
0235       int me1a_6;
0236       int me1a_7;
0237       int me1a_8;
0238       int me1a_9;
0239       int me1b_1;
0240       int me1b_2;
0241       int me1b_3;
0242       int me1b_4;
0243       int me1b_5;
0244       int me1b_6;
0245       int me1b_7;
0246       int me1b_8;
0247       int me1b_9;
0248       int me2_1;
0249       int me2_2;
0250       int me2_3;
0251       int me2_4;
0252       int me2_5;
0253       int me2_6;
0254       int me2_7;
0255       int me2_8;
0256       int me2_9;
0257       int me3_1;
0258       int me3_2;
0259       int me3_3;
0260       int me3_4;
0261       int me3_5;
0262       int me3_6;
0263       int me3_7;
0264       int me3_8;
0265       int me3_9;
0266       int me4_1;
0267       int me4_2;
0268       int me4_3;
0269       int me4_4;
0270       int me4_5;
0271       int me4_6;
0272       int me4_7;
0273       int me4_8;
0274       int me4_9;
0275       int me1n_3;
0276       int me1n_6;
0277       int me1n_9;
0278       int me2n_3;
0279       int me2n_9;
0280       int me3n_3;
0281       int me3n_9;
0282       int me4n_3;
0283       int me4n_9;
0284 
0285       int me1a_all;
0286       int me1b_all;
0287       int me2_all;
0288       int me3_all;
0289       int me4_all;
0290       int meN_all;
0291       int me_all;
0292       int format_errors;
0293       uint64_t dataword;
0294 
0295     };  // End of class Counters
0296 
0297   }  // End of namespace emtf
0298 }  // End of namespace l1t
0299 
0300 #endif /* define __l1t_emtf_Counters_h__ */