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 Trailer
0003 
0004 #ifndef __l1t_emtf_EventTrailer_h__
0005 #define __l1t_emtf_EventTrailer_h__
0006 
0007 namespace l1t {
0008   namespace emtf {
0009     class EventTrailer {
0010     public:
0011       explicit EventTrailer(uint64_t dataword);
0012 
0013       EventTrailer()
0014           : crc22(-99),
0015             lp(-99),
0016             hp(-99),
0017             ddcsr_bid(-99),
0018             ddcsr_lf(-99),
0019             spcsr_scc(-99),
0020             l1a(-99),
0021             yy(-99),
0022             mm(-99),
0023             dd(-99),
0024             sp_ladr(-99),
0025             sp_ersv(-99),
0026             sp_padr(-99),
0027             lfff(-99),
0028             bb(-99),
0029             format_errors(0),
0030             dataword(-99){};
0031 
0032       virtual ~EventTrailer(){};
0033 
0034       void set_crc22(int bits) { crc22 = bits; }
0035       void set_lp(int bits) { lp = bits; }
0036       void set_hp(int bits) { hp = bits; }
0037       void set_ddcsr_bid(int bits) { ddcsr_bid = bits; }
0038       void set_ddcsr_lf(int bits) { ddcsr_lf = bits; }
0039       void set_spcsr_scc(int bits) { spcsr_scc = bits; }
0040       void set_l1a(int bits) { l1a = bits; }
0041       void set_yy(int bits) { yy = bits; }
0042       void set_mm(int bits) { mm = bits; }
0043       void set_dd(int bits) { dd = bits; }
0044       void set_sp_ladr(int bits) { sp_ladr = bits; }
0045       void set_sp_ersv(int bits) { sp_ersv = bits; }
0046       void set_sp_padr(int bits) { sp_padr = bits; }
0047       void set_lfff(int bits) { lfff = bits; }
0048       void set_bb(int bits) { bb = bits; }
0049       void add_format_error() { format_errors += 1; }
0050       void set_dataword(uint64_t bits) { dataword = bits; }
0051 
0052       int CRC22() const { return crc22; }
0053       int LP() const { return lp; }
0054       int HP() const { return hp; }
0055       int DDCRC_bid() const { return ddcsr_bid; }
0056       int DDCRC_lf() const { return ddcsr_lf; }
0057       int SPCSR_scc() const { return spcsr_scc; }
0058       int L1a() const { return l1a; }
0059       int YY() const { return yy; }
0060       int MM() const { return mm; }
0061       int DD() const { return dd; }
0062       int SP_ladr() const { return sp_ladr; }
0063       int SP_ersv() const { return sp_ersv; }
0064       int SP_padr() const { return sp_padr; }
0065       int LFFF() const { return lfff; }
0066       int BB() const { return bb; }
0067       int Format_errors() const { return format_errors; }
0068       uint64_t Dataword() const { return dataword; }
0069 
0070     private:
0071       int crc22;
0072       int lp;
0073       int hp;
0074       int ddcsr_bid;
0075       int ddcsr_lf;
0076       int spcsr_scc;
0077       int l1a;
0078       int yy;
0079       int mm;
0080       int dd;
0081       int sp_ladr;
0082       int sp_ersv;
0083       int sp_padr;
0084       int lfff;
0085       int bb;
0086       int format_errors;
0087       uint64_t dataword;
0088 
0089     };  // End of class EventTrailer
0090   }     // End of namespace emtf
0091 }  // End of namespace l1t
0092 
0093 #endif /* define __l1t_emtf_EventTrailer_h__ */