CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes | Friends
CSCSPHeader Class Reference

#include <CSCSPHeader.h>

Public Types

enum  ACTIVE {
  F1 = 1, F2 = 2, F3 = 4, F4 = 8,
  F5 = 16, DT = 32, SP = 64
}
 
enum  FMM {
  WOF = 1, OSY = 2, BUZY = 4, READY = 8,
  FA_OSY = 16, SP_OSY = 32
}
 

Public Member Functions

unsigned int active (void) const throw ()
 
unsigned int BXN (void) const throw ()
 
bool check (void) const
 
 CSCSPHeader (void)
 
bool ddu_readout (void) const throw ()
 
bool empty (void) const throw ()
 
unsigned int endcap (void) const throw ()
 
int format_version (void) const throw ()
 
unsigned int L1A (void) const throw ()
 
unsigned int nTBINs (void) const throw ()
 
unsigned int sector (void) const throw ()
 
unsigned int slot (void) const throw ()
 
unsigned int status (void) const throw ()
 
bool suppression (void) const throw ()
 
unsigned int trigger_sector (void) const throw ()
 
bool unpack (const unsigned short *&buf) throw ()
 

Private Attributes

unsigned csr_dfc: 11
 
unsigned ddm: 1
 
unsigned fmm_status: 6
 
unsigned header_mark_1: 4
 
unsigned header_mark_2: 4
 
unsigned header_mark_3: 4
 
unsigned header_mark_4: 4
 
unsigned header_mark_5: 4
 
unsigned header_mark_6: 4
 
unsigned header_mark_7: 4
 
unsigned header_mark_8: 4
 
unsigned skip: 1
 
unsigned sp_bxn: 12
 
unsigned sp_ersv: 3
 
unsigned sp_l1a_high: 12
 
unsigned sp_l1a_low: 12
 
unsigned sp_slot_number: 5
 
unsigned sp_trigger_sector: 4
 
unsigned zero_1: 12
 
unsigned zero_2: 12
 
unsigned zero_3: 5
 

Friends

class CSCTFPacker
 

Detailed Description

Definition at line 6 of file CSCSPHeader.h.

Member Enumeration Documentation

◆ ACTIVE

Enumerator
F1 
F2 
F3 
F4 
F5 
DT 
SP 

Definition at line 101 of file CSCSPHeader.h.

101 { F1 = 1, F2 = 2, F3 = 4, F4 = 8, F5 = 16, DT = 32, SP = 64 };

◆ FMM

Enumerator
WOF 
OSY 
BUZY 
READY 
FA_OSY 
SP_OSY 

Definition at line 94 of file CSCSPHeader.h.

94 { WOF = 1, OSY = 2, BUZY = 4, READY = 8, FA_OSY = 16, SP_OSY = 32 };

Constructor & Destructor Documentation

◆ CSCSPHeader()

CSCSPHeader::CSCSPHeader ( void  )
inline

Definition at line 115 of file CSCSPHeader.h.

115 {}

Member Function Documentation

◆ active()

unsigned int CSCSPHeader::active ( void  ) const
throw (
)
inline

Definition at line 102 of file CSCSPHeader.h.

102 { return csr_dfc >> 4; }

References csr_dfc.

◆ BXN()

unsigned int CSCSPHeader::BXN ( void  ) const
throw (
)
inline

Definition at line 75 of file CSCSPHeader.h.

75 { return sp_bxn; }

References sp_bxn.

Referenced by CSCTFUnpacker::produce().

◆ check()

bool CSCSPHeader::check ( void  ) const
inline

Definition at line 69 of file CSCSPHeader.h.

69  {
70  return header_mark_1 != 0x9 || header_mark_2 != 0x9 || header_mark_3 != 0x9 || header_mark_4 != 0x9 ||
71  header_mark_5 != 0xA || header_mark_6 != 0xA || header_mark_7 != 0xA || header_mark_8 != 0xA ||
72  zero_1 != 0 || zero_2 != 0 || zero_3 != 0;
73  }

References header_mark_1, header_mark_2, header_mark_3, header_mark_4, header_mark_5, header_mark_6, header_mark_7, header_mark_8, zero_1, zero_2, and zero_3.

Referenced by unpack().

◆ ddu_readout()

bool CSCSPHeader::ddu_readout ( void  ) const
throw (
)
inline

Definition at line 107 of file CSCSPHeader.h.

107 { return ddm; }

References ddm.

◆ empty()

bool CSCSPHeader::empty ( void  ) const
throw (
)
inline

Definition at line 104 of file CSCSPHeader.h.

104 { return skip; }

References skip.

◆ endcap()

unsigned int CSCSPHeader::endcap ( void  ) const
throw (
)
inline

Definition at line 87 of file CSCSPHeader.h.

87  {
88  if (sp_ersv < 2)
89  return sp_trigger_sector & 0x8;
90  else
91  return (sp_trigger_sector <= 6 ? 1 : 0);
92  }

References sp_ersv, and sp_trigger_sector.

Referenced by geometryXMLparser.CSCAlignable::index(), and CSCTFUnpacker::produce().

◆ format_version()

int CSCSPHeader::format_version ( void  ) const
throw (
)
inline

Definition at line 106 of file CSCSPHeader.h.

106 { return sp_ersv; }

References sp_ersv.

◆ L1A()

unsigned int CSCSPHeader::L1A ( void  ) const
throw (
)
inline

Definition at line 76 of file CSCSPHeader.h.

76 { return (sp_l1a_high << 12) | sp_l1a_low; }

References sp_l1a_high, and sp_l1a_low.

Referenced by CSCTFUnpacker::produce().

◆ nTBINs()

unsigned int CSCSPHeader::nTBINs ( void  ) const
throw (
)
inline

Definition at line 97 of file CSCSPHeader.h.

97 { return csr_dfc & 0x7; }

References csr_dfc.

Referenced by CSCTFUnpacker::produce().

◆ sector()

unsigned int CSCSPHeader::sector ( void  ) const
throw (
)
inline

Definition at line 81 of file CSCSPHeader.h.

81  {
82  if (sp_ersv < 2)
83  return sp_trigger_sector & 0x7;
84  else
86  }

References sp_ersv, and sp_trigger_sector.

Referenced by geometryXMLparser.DTAlignable::index(), and CSCTFUnpacker::produce().

◆ slot()

unsigned int CSCSPHeader::slot ( void  ) const
throw (
)
inline

Definition at line 78 of file CSCSPHeader.h.

78 { return sp_slot_number; }

References sp_slot_number.

Referenced by CSCTFUnpacker::produce().

◆ status()

unsigned int CSCSPHeader::status ( void  ) const
throw (
)
inline

Definition at line 95 of file CSCSPHeader.h.

95 { return fmm_status; }

References fmm_status.

Referenced by CSCTFUnpacker::produce().

◆ suppression()

bool CSCSPHeader::suppression ( void  ) const
throw (
)
inline

Definition at line 99 of file CSCSPHeader.h.

99 { return csr_dfc & 0x8; }

References csr_dfc.

◆ trigger_sector()

unsigned int CSCSPHeader::trigger_sector ( void  ) const
throw (
)
inline

Definition at line 79 of file CSCSPHeader.h.

79 { return sp_trigger_sector; }

References sp_trigger_sector.

◆ unpack()

bool CSCSPHeader::unpack ( const unsigned short *&  buf)
throw (
)
inline

Definition at line 109 of file CSCSPHeader.h.

109  {
110  memcpy((void *)this, buf, 8 * sizeof(short));
111  buf += 8;
112  return check();
113  }

References visDQMUpload::buf, and check().

Friends And Related Function Documentation

◆ CSCTFPacker

friend class CSCTFPacker
friend

Definition at line 66 of file CSCSPHeader.h.

Member Data Documentation

◆ csr_dfc

unsigned CSCSPHeader::csr_dfc
private

Definition at line 62 of file CSCSPHeader.h.

Referenced by active(), nTBINs(), and suppression().

◆ ddm

unsigned CSCSPHeader::ddm
private

Definition at line 43 of file CSCSPHeader.h.

Referenced by ddu_readout().

◆ fmm_status

unsigned CSCSPHeader::fmm_status
private

Definition at line 42 of file CSCSPHeader.h.

Referenced by status().

◆ header_mark_1

unsigned CSCSPHeader::header_mark_1
private

Definition at line 10 of file CSCSPHeader.h.

Referenced by check().

◆ header_mark_2

unsigned CSCSPHeader::header_mark_2
private

Definition at line 13 of file CSCSPHeader.h.

Referenced by check().

◆ header_mark_3

unsigned CSCSPHeader::header_mark_3
private

Definition at line 16 of file CSCSPHeader.h.

Referenced by check().

◆ header_mark_4

unsigned CSCSPHeader::header_mark_4
private

Definition at line 19 of file CSCSPHeader.h.

Referenced by check().

◆ header_mark_5

unsigned CSCSPHeader::header_mark_5
private

Definition at line 23 of file CSCSPHeader.h.

Referenced by check().

◆ header_mark_6

unsigned CSCSPHeader::header_mark_6
private

Definition at line 30 of file CSCSPHeader.h.

Referenced by check().

◆ header_mark_7

unsigned CSCSPHeader::header_mark_7
private

Definition at line 45 of file CSCSPHeader.h.

Referenced by check().

◆ header_mark_8

unsigned CSCSPHeader::header_mark_8
private

Definition at line 64 of file CSCSPHeader.h.

Referenced by check().

◆ skip

unsigned CSCSPHeader::skip
private

Definition at line 63 of file CSCSPHeader.h.

Referenced by empty().

◆ sp_bxn

unsigned CSCSPHeader::sp_bxn
private

Definition at line 18 of file CSCSPHeader.h.

Referenced by BXN().

◆ sp_ersv

unsigned CSCSPHeader::sp_ersv
private

Definition at line 26 of file CSCSPHeader.h.

Referenced by endcap(), format_version(), and sector().

◆ sp_l1a_high

unsigned CSCSPHeader::sp_l1a_high
private

Definition at line 12 of file CSCSPHeader.h.

Referenced by L1A().

◆ sp_l1a_low

unsigned CSCSPHeader::sp_l1a_low
private

Definition at line 9 of file CSCSPHeader.h.

Referenced by L1A().

◆ sp_slot_number

unsigned CSCSPHeader::sp_slot_number
private

Definition at line 25 of file CSCSPHeader.h.

Referenced by slot().

◆ sp_trigger_sector

unsigned CSCSPHeader::sp_trigger_sector
private

Definition at line 28 of file CSCSPHeader.h.

Referenced by endcap(), sector(), and trigger_sector().

◆ zero_1

unsigned CSCSPHeader::zero_1
private

Definition at line 15 of file CSCSPHeader.h.

Referenced by check().

◆ zero_2

unsigned CSCSPHeader::zero_2
private

Definition at line 22 of file CSCSPHeader.h.

Referenced by check().

◆ zero_3

unsigned CSCSPHeader::zero_3
private

Definition at line 44 of file CSCSPHeader.h.

Referenced by check().

CSCSPHeader::zero_1
unsigned zero_1
Definition: CSCSPHeader.h:15
CSCSPHeader::header_mark_8
unsigned header_mark_8
Definition: CSCSPHeader.h:64
CSCSPHeader::sp_trigger_sector
unsigned sp_trigger_sector
Definition: CSCSPHeader.h:28
CSCSPHeader::sp_bxn
unsigned sp_bxn
Definition: CSCSPHeader.h:18
CSCSPHeader::F3
Definition: CSCSPHeader.h:101
CSCSPHeader::WOF
Definition: CSCSPHeader.h:94
CSCSPHeader::zero_3
unsigned zero_3
Definition: CSCSPHeader.h:44
CSCSPHeader::header_mark_1
unsigned header_mark_1
Definition: CSCSPHeader.h:10
CSCSPHeader::F4
Definition: CSCSPHeader.h:101
CSCSPHeader::SP
Definition: CSCSPHeader.h:101
CSCSPHeader::sp_l1a_low
unsigned sp_l1a_low
Definition: CSCSPHeader.h:9
CSCSPHeader::header_mark_6
unsigned header_mark_6
Definition: CSCSPHeader.h:30
CSCSPHeader::header_mark_5
unsigned header_mark_5
Definition: CSCSPHeader.h:23
CSCSPHeader::header_mark_7
unsigned header_mark_7
Definition: CSCSPHeader.h:45
CSCSPHeader::check
bool check(void) const
Definition: CSCSPHeader.h:69
CSCSPHeader::sp_slot_number
unsigned sp_slot_number
Definition: CSCSPHeader.h:25
CSCSPHeader::F2
Definition: CSCSPHeader.h:101
CSCSPHeader::FA_OSY
Definition: CSCSPHeader.h:94
CSCSPHeader::sp_ersv
unsigned sp_ersv
Definition: CSCSPHeader.h:26
CSCSPHeader::zero_2
unsigned zero_2
Definition: CSCSPHeader.h:22
CSCSPHeader::F1
Definition: CSCSPHeader.h:101
CSCSPHeader::header_mark_2
unsigned header_mark_2
Definition: CSCSPHeader.h:13
CSCSPHeader::SP_OSY
Definition: CSCSPHeader.h:94
CSCSPHeader::header_mark_3
unsigned header_mark_3
Definition: CSCSPHeader.h:16
CSCSPHeader::OSY
Definition: CSCSPHeader.h:94
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCSPHeader::ddm
unsigned ddm
Definition: CSCSPHeader.h:43
CSCSPHeader::header_mark_4
unsigned header_mark_4
Definition: CSCSPHeader.h:19
CSCSPHeader::csr_dfc
unsigned csr_dfc
Definition: CSCSPHeader.h:62
CSCSPHeader::sp_l1a_high
unsigned sp_l1a_high
Definition: CSCSPHeader.h:12
CSCSPHeader::DT
Definition: CSCSPHeader.h:101
CSCSPHeader::F5
Definition: CSCSPHeader.h:101
CSCSPHeader::fmm_status
unsigned fmm_status
Definition: CSCSPHeader.h:42
CSCSPHeader::READY
Definition: CSCSPHeader.h:94
CSCSPHeader::BUZY
Definition: CSCSPHeader.h:94
CSCSPHeader::skip
unsigned skip
Definition: CSCSPHeader.h:63