Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:35:54

0001 // Class for Sector Processor (SP) Output Data Record
0002 
0003 #ifndef __l1t_emtf_SP_h__
0004 #define __l1t_emtf_SP_h__
0005 
0006 #include <vector>
0007 #include <cstdint>
0008 
0009 namespace l1t {
0010   namespace emtf {
0011     class SP {
0012     public:
0013       explicit SP(uint64_t dataword);
0014 
0015       SP()
0016           : hl(-99),
0017             c(-99),
0018             phi_full(-99),
0019             vc(-99),
0020             vt(-99),
0021             se(-99),
0022             bc0(-99),
0023             quality_GMT(-99),
0024             phi_GMT(-99),
0025             bx(-99),
0026             mus(-99),
0027             mode(-99),
0028             eta_GMT(-99),
0029             pt_GMT(-99),
0030             pt_dxy_GMT(-99),
0031             dxy_GMT(-99),
0032             me1_subsector(-99),
0033             me1_CSC_ID(-99),
0034             me1_stub_num(-99),
0035             me2_CSC_ID(-99),
0036             me2_stub_num(-99),
0037             me3_CSC_ID(-99),
0038             me3_stub_num(-99),
0039             me4_CSC_ID(-99),
0040             me4_stub_num(-99),
0041             tbin(-99),
0042             me1_delay(-99),
0043             me2_delay(-99),
0044             me3_delay(-99),
0045             me4_delay(-99),
0046             nn_pt_valid(-99),
0047             pt_LUT_addr(-99),
0048             format_errors(0),
0049             dataword(-99) {}
0050 
0051       virtual ~SP() {}
0052 
0053       void set_hl(int bits) { hl = bits; }
0054       void set_c(int bits) { c = bits; }
0055       void set_phi_full(int bits) { phi_full = bits; }
0056       void set_vc(int bits) { vc = bits; }
0057       void set_vt(int bits) { vt = bits; }
0058       void set_se(int bits) { se = bits; }
0059       void set_bc0(int bits) { bc0 = bits; }
0060       void set_quality_GMT(int bits) { quality_GMT = bits; }
0061       void set_phi_GMT(int bits) { phi_GMT = bits; }
0062       void set_bx(int bits) { bx = bits; }
0063       void set_mus(int bits) { mus = bits; }
0064       void set_mode(int bits) { mode = bits; }
0065       void set_eta_GMT(int bits) { eta_GMT = bits; }
0066       void set_pt_GMT(int bits) { pt_GMT = bits; }
0067       void set_pt_dxy_GMT(int bits) { pt_dxy_GMT = bits; }
0068       void set_dxy_GMT(int bits) { dxy_GMT = bits; }
0069       void set_me1_subsector(int bits) { me1_subsector = bits; }
0070       void set_me1_CSC_ID(int bits) { me1_CSC_ID = bits; }
0071       void set_me1_stub_num(int bits) { me1_stub_num = bits; }
0072       void set_me2_CSC_ID(int bits) { me2_CSC_ID = bits; }
0073       void set_me2_stub_num(int bits) { me2_stub_num = bits; }
0074       void set_me3_CSC_ID(int bits) { me3_CSC_ID = bits; }
0075       void set_me3_stub_num(int bits) { me3_stub_num = bits; }
0076       void set_me4_CSC_ID(int bits) { me4_CSC_ID = bits; }
0077       void set_me4_stub_num(int bits) { me4_stub_num = bits; }
0078       void set_tbin(int bits) { tbin = bits; }
0079       void set_me1_delay(int bits) { me1_delay = bits; }
0080       void set_me2_delay(int bits) { me2_delay = bits; }
0081       void set_me3_delay(int bits) { me3_delay = bits; }
0082       void set_me4_delay(int bits) { me4_delay = bits; }
0083       void set_nn_pt_valid(int bits) { nn_pt_valid = bits; }
0084       void set_pt_LUT_addr(unsigned long bits) { pt_LUT_addr = bits; }
0085       void add_format_error() { format_errors += 1; }
0086       void set_dataword(uint64_t bits) { dataword = bits; }
0087 
0088       int HL() const { return hl; }
0089       int C() const { return c; }
0090       int Phi_full() const { return phi_full; }
0091       int VC() const { return vc; }
0092       int VT() const { return vt; }
0093       int SE() const { return se; }
0094       int BC0() const { return bc0; }
0095       int Quality_GMT() const { return quality_GMT; }
0096       int Phi_GMT() const { return phi_GMT; }
0097       int BX() const { return bx; }
0098       int Mode() const { return mode; }
0099       int Eta_GMT() const { return eta_GMT; }
0100       int Pt_GMT() const { return pt_GMT; }
0101       int Pt_dxy_GMT() const { return pt_dxy_GMT; }
0102       int Dxy_GMT() const { return dxy_GMT; }
0103       int ME1_subsector() const { return me1_subsector; }
0104       int ME1_CSC_ID() const { return me1_CSC_ID; }
0105       int ME1_stub_num() const { return me1_stub_num; }
0106       int ME2_CSC_ID() const { return me2_CSC_ID; }
0107       int ME2_stub_num() const { return me2_stub_num; }
0108       int ME3_CSC_ID() const { return me3_CSC_ID; }
0109       int ME3_stub_num() const { return me3_stub_num; }
0110       int ME4_CSC_ID() const { return me4_CSC_ID; }
0111       int ME4_stub_num() const { return me4_stub_num; }
0112       int TBIN() const { return tbin; }
0113       int ME1_delay() const { return me1_delay; }
0114       int ME2_delay() const { return me2_delay; }
0115       int ME3_delay() const { return me3_delay; }
0116       int ME4_delay() const { return me4_delay; }
0117       int NN_pt_valid() const { return nn_pt_valid; }
0118       unsigned long Pt_LUT_addr() const { return pt_LUT_addr; }
0119       int Format_errors() const { return format_errors; }
0120       uint64_t Dataword() const { return dataword; }
0121       int MUS() const { return mus; }
0122 
0123     private:
0124       int hl;
0125       int c;
0126       int phi_full;
0127       int vc;
0128       int vt;
0129       int se;
0130       int bc0;
0131       int quality_GMT;
0132       int phi_GMT;
0133       int bx;
0134       int mus;
0135       int mode;
0136       int eta_GMT;
0137       int pt_GMT;
0138       int pt_dxy_GMT;
0139       int dxy_GMT;
0140       int me1_subsector;
0141       int me1_CSC_ID;
0142       int me1_stub_num;
0143       int me2_CSC_ID;
0144       int me2_stub_num;
0145       int me3_CSC_ID;
0146       int me3_stub_num;
0147       int me4_CSC_ID;
0148       int me4_stub_num;
0149       int tbin;
0150       int me1_delay;
0151       int me2_delay;
0152       int me3_delay;
0153       int me4_delay;
0154       int nn_pt_valid;
0155       unsigned long pt_LUT_addr;
0156       int format_errors;
0157       uint64_t dataword;
0158 
0159     };  // End of class SP
0160 
0161     // Define a vector of SP
0162     typedef std::vector<SP> SPCollection;
0163 
0164   }  // End of namespace emtf
0165 }  // End of namespace l1t
0166 
0167 #endif /* define __l1t_emtf_SP_h__ */