Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 // Class for AMC to AMC13 Header
0002 
0003 #ifndef __l1t_emtf_MTF7Header_h__
0004 #define __l1t_emtf_MTF7Header_h__
0005 
0006 #include <vector>
0007 #include <cstdint>
0008 
0009 namespace l1t {
0010   namespace emtf {
0011     class MTF7Header {
0012     public:
0013       explicit MTF7Header(uint64_t dataword);
0014 
0015       MTF7Header()
0016           : amc_number(-99),
0017             bx_id(-99),
0018             orbit_number(-99),
0019             board_id(-99),
0020             lv1_id(-99),
0021             data_length(-99),
0022             user_id(-99),
0023             format_errors(0),
0024             dataword(-99){};
0025 
0026       virtual ~MTF7Header(){};
0027 
0028       void set_amc_number(int bits) { amc_number = bits; }
0029       void set_bx_id(int bits) { bx_id = bits; }
0030       void set_orbit_number(int bits) { orbit_number = bits; }
0031       void set_board_id(int bits) { board_id = bits; }
0032       void set_lv1_id(int bits) { lv1_id = bits; }
0033       void set_data_length(int bits) { data_length = bits; }
0034       void set_user_id(int bits) { user_id = bits; }
0035       void add_format_error() { format_errors += 1; }
0036       void set_dataword(uint64_t bits) { dataword = bits; }
0037 
0038       int AMC_number() const { return amc_number; }
0039       int BX_id() const { return bx_id; }
0040       int Orbit_number() const { return orbit_number; }
0041       int Board_id() const { return board_id; }
0042       int LV1_id() const { return lv1_id; }
0043       int Data_length() const { return data_length; }
0044       int User_id() const { return user_id; }
0045       int Format_errors() const { return format_errors; }
0046       uint64_t Dataword() const { return dataword; }
0047 
0048     private:
0049       int amc_number;
0050       int bx_id;
0051       int orbit_number;
0052       int board_id;
0053       int lv1_id;
0054       int data_length;
0055       int user_id;
0056       int format_errors;
0057       uint64_t dataword;
0058 
0059     };  // End class MTF7Header
0060   }     // End namespace emtf
0061 }  // End namespace l1t
0062 
0063 #endif /* define __l1t_emtf_MTF7Header_h__ */