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.

◆ FMM

Enumerator
WOF 
OSY 
BUZY 
READY 
FA_OSY 
SP_OSY 

Definition at line 94 of file CSCSPHeader.h.

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.

References csr_dfc.

102 { return csr_dfc >> 4; }
unsigned csr_dfc
Definition: CSCSPHeader.h:62

◆ BXN()

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

Definition at line 75 of file CSCSPHeader.h.

References sp_bxn.

Referenced by CSCTFUnpacker::produce().

75 { return sp_bxn; }
unsigned sp_bxn
Definition: CSCSPHeader.h:18

◆ check()

bool CSCSPHeader::check ( void  ) const
inline

Definition at line 69 of file CSCSPHeader.h.

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().

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  }
unsigned header_mark_8
Definition: CSCSPHeader.h:64
unsigned zero_3
Definition: CSCSPHeader.h:44
unsigned zero_1
Definition: CSCSPHeader.h:15
unsigned header_mark_7
Definition: CSCSPHeader.h:45
unsigned header_mark_6
Definition: CSCSPHeader.h:30
unsigned header_mark_1
Definition: CSCSPHeader.h:10
unsigned header_mark_2
Definition: CSCSPHeader.h:13
unsigned header_mark_4
Definition: CSCSPHeader.h:19
unsigned header_mark_5
Definition: CSCSPHeader.h:23
unsigned zero_2
Definition: CSCSPHeader.h:22
unsigned header_mark_3
Definition: CSCSPHeader.h:16

◆ ddu_readout()

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

Definition at line 107 of file CSCSPHeader.h.

References ddm.

107 { return ddm; }
unsigned ddm
Definition: CSCSPHeader.h:43

◆ empty()

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

Definition at line 104 of file CSCSPHeader.h.

References skip.

104 { return skip; }
unsigned skip
Definition: CSCSPHeader.h:63

◆ endcap()

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

Definition at line 87 of file CSCSPHeader.h.

References sp_ersv, and sp_trigger_sector.

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

87  {
88  if (sp_ersv < 2)
89  return sp_trigger_sector & 0x8;
90  else
91  return (sp_trigger_sector <= 6 ? 1 : 0);
92  }
unsigned sp_trigger_sector
Definition: CSCSPHeader.h:28
unsigned sp_ersv
Definition: CSCSPHeader.h:26

◆ format_version()

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

Definition at line 106 of file CSCSPHeader.h.

References sp_ersv.

106 { return sp_ersv; }
unsigned sp_ersv
Definition: CSCSPHeader.h:26

◆ L1A()

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

Definition at line 76 of file CSCSPHeader.h.

References sp_l1a_high, and sp_l1a_low.

Referenced by CSCTFUnpacker::produce().

76 { return (sp_l1a_high << 12) | sp_l1a_low; }
unsigned sp_l1a_low
Definition: CSCSPHeader.h:9
unsigned sp_l1a_high
Definition: CSCSPHeader.h:12

◆ nTBINs()

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

Definition at line 97 of file CSCSPHeader.h.

References csr_dfc.

Referenced by CSCTFUnpacker::produce().

97 { return csr_dfc & 0x7; }
unsigned csr_dfc
Definition: CSCSPHeader.h:62

◆ sector()

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

Definition at line 81 of file CSCSPHeader.h.

References sp_ersv, and sp_trigger_sector.

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

81  {
82  if (sp_ersv < 2)
83  return sp_trigger_sector & 0x7;
84  else
86  }
unsigned sp_trigger_sector
Definition: CSCSPHeader.h:28
unsigned sp_ersv
Definition: CSCSPHeader.h:26

◆ slot()

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

Definition at line 78 of file CSCSPHeader.h.

References sp_slot_number.

Referenced by CSCTFUnpacker::produce().

78 { return sp_slot_number; }
unsigned sp_slot_number
Definition: CSCSPHeader.h:25

◆ status()

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

Definition at line 95 of file CSCSPHeader.h.

References fmm_status.

Referenced by CSCTFUnpacker::produce().

95 { return fmm_status; }
unsigned fmm_status
Definition: CSCSPHeader.h:42

◆ suppression()

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

Definition at line 99 of file CSCSPHeader.h.

References csr_dfc.

99 { return csr_dfc & 0x8; }
unsigned csr_dfc
Definition: CSCSPHeader.h:62

◆ trigger_sector()

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

Definition at line 79 of file CSCSPHeader.h.

References sp_trigger_sector.

79 { return sp_trigger_sector; }
unsigned sp_trigger_sector
Definition: CSCSPHeader.h:28

◆ unpack()

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

Definition at line 109 of file CSCSPHeader.h.

References visDQMUpload::buf, and check().

109  {
110  memcpy((void *)this, buf, 8 * sizeof(short));
111  buf += 8;
112  return check();
113  }
bool check(void) const
Definition: CSCSPHeader.h:69

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().