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 Event Record Header
0003 
0004 #ifndef __l1t_emtf_EventHeader_h__
0005 #define __l1t_emtf_EventHeader_h__
0006 
0007 namespace l1t {
0008   namespace emtf {
0009     class EventHeader {
0010     public:
0011       explicit EventHeader(uint64_t dataword);
0012 
0013       EventHeader()
0014           : l1a(-99),
0015             l1a_BXN(-99),
0016             sp_TS(-99),
0017             endcap(-99),
0018             sector(-99),
0019             sp_ersv(-99),
0020             sp_addr(-99),
0021             tbin(-99),
0022             ddm(-99),
0023             spa(-99),
0024             rpca(-99),
0025             skip(-99),
0026             rdy(-99),
0027             bsy(-99),
0028             osy(-99),
0029             wof(-99),
0030             me1a(-99),
0031             me1b(-99),
0032             me2(-99),
0033             me3(-99),
0034             me4(-99),
0035             cppf(-99),
0036             cppf_crc(-99),
0037             gem(-99),
0038             gem_crc(-99),
0039             format_errors(0),
0040             dataword(-99){};
0041 
0042       virtual ~EventHeader(){};
0043 
0044       void set_l1a(int bits) { l1a = bits; }
0045       void set_l1a_BXN(int bits) { l1a_BXN = bits; }
0046       void set_sp_TS(int bits) { sp_TS = bits; }
0047       void set_endcap(int bits) { endcap = bits; }
0048       void set_sector(int bits) { sector = bits; }
0049       void set_sp_ersv(int bits) { sp_ersv = bits; }
0050       void set_sp_addr(int bits) { sp_addr = bits; }
0051       void set_tbin(int bits) { tbin = bits; }
0052       void set_ddm(int bits) { ddm = bits; }
0053       void set_spa(int bits) { spa = bits; }
0054       void set_rpca(int bits) { rpca = bits; }
0055       void set_skip(int bits) { skip = bits; }
0056       void set_rdy(int bits) { rdy = bits; }
0057       void set_bsy(int bits) { bsy = bits; }
0058       void set_osy(int bits) { osy = bits; }
0059       void set_wof(int bits) { wof = bits; }
0060       void set_me1a(int bits) { me1a = bits; }
0061       void set_me1b(int bits) { me1b = bits; }
0062       void set_me2(int bits) { me2 = bits; }
0063       void set_me3(int bits) { me3 = bits; }
0064       void set_me4(int bits) { me4 = bits; }
0065       void set_cppf(int bits) { cppf = bits; }
0066       void set_cppf_crc(int bits) { cppf_crc = bits; }
0067       void set_gem(int bits) { gem = bits; }
0068       void set_gem_crc(int bits) { gem_crc = bits; }
0069       void add_format_error() { format_errors += 1; }
0070       void set_dataword(uint64_t bits) { dataword = bits; }
0071 
0072       int L1A() const { return l1a; }
0073       int L1A_BXN() const { return l1a_BXN; }
0074       int SP_TS() const { return sp_TS; }
0075       int Endcap() const { return endcap; }
0076       int Sector() const { return sector; }
0077       int SP_ersv() const { return sp_ersv; }
0078       int SP_addr() const { return sp_addr; }
0079       int TBIN() const { return tbin; }
0080       int DDM() const { return ddm; }
0081       int SPa() const { return spa; }
0082       int RPCa() const { return rpca; }
0083       int Skip() const { return skip; }
0084       int Rdy() const { return rdy; }
0085       int BSY() const { return bsy; }
0086       int OSY() const { return osy; }
0087       int WOF() const { return wof; }
0088       int ME1a() const { return me1a; }
0089       int ME1b() const { return me1b; }
0090       int ME2() const { return me2; }
0091       int ME3() const { return me3; }
0092       int ME4() const { return me4; }
0093       int CPPF() const { return cppf; }
0094       int CPPF_CRC() const { return cppf_crc; }
0095       int GEM() const { return gem; }
0096       int GEM_CRC() const { return gem_crc; }
0097       int Format_errors() const { return format_errors; }
0098       uint64_t Dataword() const { return dataword; }
0099 
0100     private:
0101       int l1a;
0102       int l1a_BXN;
0103       int sp_TS;
0104       int endcap;
0105       int sector;
0106       int sp_ersv;
0107       int sp_addr;
0108       int tbin;
0109       int ddm;
0110       int spa;
0111       int rpca;
0112       int skip;
0113       int rdy;
0114       int bsy;
0115       int osy;
0116       int wof;
0117       int me1a;
0118       int me1b;
0119       int me2;
0120       int me3;
0121       int me4;
0122       int cppf;
0123       int cppf_crc;
0124       int gem;
0125       int gem_crc;
0126       int format_errors;
0127       uint64_t dataword;
0128 
0129     };  // End of class EventHeader
0130   }     // End of namespace emtf
0131 }  // End of namespace l1t
0132 
0133 #endif /* define __l1t_emtf_EventHeader_h__ */