CMS 3D CMS Logo

L1CSCSPStatusDigi.h
Go to the documentation of this file.
1 #ifndef L1CSCSPStatusDigi_h
2 #define L1CSCSPStatusDigi_h
3 
4 #include <cstring>
5 
6 class CSCTFUnpacker;
7 
9 private:
10  unsigned short sp_slot; //
11  unsigned short l1a_bxn; // Take from the SP header
12  unsigned short fmm_status; // Take from the SP header
13 
14  unsigned short se; // Make logical OR of all tbins for each of 15(endcap) SE bits
15  unsigned short sm; // Make logical OR of all tbins for each of 15(endcap) SM bits
16  unsigned long bx; // Make logical OR of all tbins for each of 15(endcap)+2(barrel) BX bits
17  unsigned long af; // Make logical OR of all tbins for each of 15(endcap)+2(barrel) AF bits
18  unsigned long vp; // Make logical OR of all tbins for each of 15(endcap)+2(barrel) VP/VQ bits
19  enum {
20  IDLE = 1,
21  CARRIER = 2,
22  NORMAL = 4,
23  ERROR = 8,
24  FIFO = 16
25  }; // States of optical receivers + Alignment FIFO full OR empty status
26  unsigned short link_status[15]; // Optical receiver status ORed for all tbins
27  unsigned short mpc_link_id; // MPC_id and link# from MEx Data Record ORed for all tbins
28 
29  unsigned long track_cnt;
30  unsigned long orbit_cnt;
31 
32  friend class CSCTFUnpacker;
33 
34 public:
35  unsigned short slot(void) const throw() { return sp_slot; }
36  unsigned short BXN(void) const throw() { return l1a_bxn; }
37  unsigned short FMM(void) const throw() { return fmm_status; }
38  unsigned short SEs(void) const throw() { return se; }
39  unsigned short SMs(void) const throw() { return sm; }
40  unsigned long BXs(void) const throw() { return bx; }
41  unsigned long AFs(void) const throw() { return af; }
42  unsigned long VPs(void) const throw() { return vp; }
43  unsigned short link(int link) const throw() { return link_status[link]; }
44 
45  unsigned long track_counter(void) const throw() { return track_cnt; }
46  unsigned long orbit_counter(void) const throw() { return orbit_cnt; }
47 
48  L1CSCSPStatusDigi(void) { bzero(this, sizeof(L1CSCSPStatusDigi)); }
50 };
51 
52 #endif
L1CSCSPStatusDigi::orbit_counter
unsigned long orbit_counter(void) const
Definition: L1CSCSPStatusDigi.h:46
L1CSCSPStatusDigi::L1CSCSPStatusDigi
L1CSCSPStatusDigi(void)
Definition: L1CSCSPStatusDigi.h:48
L1CSCSPStatusDigi::mpc_link_id
unsigned short mpc_link_id
Definition: L1CSCSPStatusDigi.h:27
L1CSCSPStatusDigi::FIFO
Definition: L1CSCSPStatusDigi.h:24
L1CSCSPStatusDigi::orbit_cnt
unsigned long orbit_cnt
Definition: L1CSCSPStatusDigi.h:30
L1CSCSPStatusDigi::track_cnt
unsigned long track_cnt
Definition: L1CSCSPStatusDigi.h:29
L1CSCSPStatusDigi::CARRIER
Definition: L1CSCSPStatusDigi.h:21
L1CSCSPStatusDigi::slot
unsigned short slot(void) const
Definition: L1CSCSPStatusDigi.h:35
L1CSCSPStatusDigi::l1a_bxn
unsigned short l1a_bxn
Definition: L1CSCSPStatusDigi.h:11
CSCTFUnpacker
Definition: CSCTFUnpacker.h:22
L1CSCSPStatusDigi::link
unsigned short link(int link) const
Definition: L1CSCSPStatusDigi.h:43
L1CSCSPStatusDigi::bx
unsigned long bx
Definition: L1CSCSPStatusDigi.h:16
L1CSCSPStatusDigi::FMM
unsigned short FMM(void) const
Definition: L1CSCSPStatusDigi.h:37
L1CSCSPStatusDigi::ERROR
Definition: L1CSCSPStatusDigi.h:23
L1CSCSPStatusDigi::VPs
unsigned long VPs(void) const
Definition: L1CSCSPStatusDigi.h:42
L1CSCSPStatusDigi::sp_slot
unsigned short sp_slot
Definition: L1CSCSPStatusDigi.h:10
L1CSCSPStatusDigi::track_counter
unsigned long track_counter(void) const
Definition: L1CSCSPStatusDigi.h:45
L1CSCSPStatusDigi::fmm_status
unsigned short fmm_status
Definition: L1CSCSPStatusDigi.h:12
L1CSCSPStatusDigi::sm
unsigned short sm
Definition: L1CSCSPStatusDigi.h:15
L1CSCSPStatusDigi::IDLE
Definition: L1CSCSPStatusDigi.h:20
L1CSCSPStatusDigi::SEs
unsigned short SEs(void) const
Definition: L1CSCSPStatusDigi.h:38
L1CSCSPStatusDigi::AFs
unsigned long AFs(void) const
Definition: L1CSCSPStatusDigi.h:41
L1CSCSPStatusDigi::BXN
unsigned short BXN(void) const
Definition: L1CSCSPStatusDigi.h:36
L1CSCSPStatusDigi::BXs
unsigned long BXs(void) const
Definition: L1CSCSPStatusDigi.h:40
L1CSCSPStatusDigi::se
unsigned short se
Definition: L1CSCSPStatusDigi.h:14
L1CSCSPStatusDigi::vp
unsigned long vp
Definition: L1CSCSPStatusDigi.h:18
L1CSCSPStatusDigi::SMs
unsigned short SMs(void) const
Definition: L1CSCSPStatusDigi.h:39
L1CSCSPStatusDigi::link_status
unsigned short link_status[15]
Definition: L1CSCSPStatusDigi.h:26
L1CSCSPStatusDigi::NORMAL
Definition: L1CSCSPStatusDigi.h:22
L1CSCSPStatusDigi::af
unsigned long af
Definition: L1CSCSPStatusDigi.h:17
L1CSCSPStatusDigi::~L1CSCSPStatusDigi
~L1CSCSPStatusDigi(void)
Definition: L1CSCSPStatusDigi.h:49
L1CSCSPStatusDigi
Definition: L1CSCSPStatusDigi.h:8