Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:25

0001 #ifndef L1CSCSPStatusDigi_h
0002 #define L1CSCSPStatusDigi_h
0003 
0004 #include <cstring>
0005 
0006 class CSCTFUnpacker;
0007 
0008 class L1CSCSPStatusDigi {
0009 private:
0010   unsigned short sp_slot;     //
0011   unsigned short l1a_bxn;     // Take from the SP header
0012   unsigned short fmm_status;  // Take from the SP header
0013 
0014   unsigned short se;  // Make logical OR of all tbins for each of 15(endcap) SE bits
0015   unsigned short sm;  // Make logical OR of all tbins for each of 15(endcap) SM bits
0016   unsigned long bx;   // Make logical OR of all tbins for each of 15(endcap)+2(barrel) BX bits
0017   unsigned long af;   // Make logical OR of all tbins for each of 15(endcap)+2(barrel) AF bits
0018   unsigned long vp;   // Make logical OR of all tbins for each of 15(endcap)+2(barrel) VP/VQ bits
0019   enum {
0020     IDLE = 1,
0021     CARRIER = 2,
0022     NORMAL = 4,
0023     ERROR = 8,
0024     FIFO = 16
0025   };                               // States of optical receivers + Alignment FIFO full OR empty status
0026   unsigned short link_status[15];  // Optical receiver status ORed for all tbins
0027   unsigned short mpc_link_id;      // MPC_id and link# from MEx Data Record ORed for all tbins
0028 
0029   unsigned long track_cnt;
0030   unsigned long orbit_cnt;
0031 
0032   friend class CSCTFUnpacker;
0033 
0034 public:
0035   unsigned short slot(void) const throw() { return sp_slot; }
0036   unsigned short BXN(void) const throw() { return l1a_bxn; }
0037   unsigned short FMM(void) const throw() { return fmm_status; }
0038   unsigned short SEs(void) const throw() { return se; }
0039   unsigned short SMs(void) const throw() { return sm; }
0040   unsigned long BXs(void) const throw() { return bx; }
0041   unsigned long AFs(void) const throw() { return af; }
0042   unsigned long VPs(void) const throw() { return vp; }
0043   unsigned short link(int link) const throw() { return link_status[link]; }
0044 
0045   unsigned long track_counter(void) const throw() { return track_cnt; }
0046   unsigned long orbit_counter(void) const throw() { return orbit_cnt; }
0047 
0048   L1CSCSPStatusDigi(void) { bzero(this, sizeof(L1CSCSPStatusDigi)); }
0049   ~L1CSCSPStatusDigi(void) {}
0050 };
0051 
0052 #endif