CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

Enumerator
F1 
F2 
F3 
F4 
F5 
DT 
SP 

Definition at line 96 of file CSCSPHeader.h.

Enumerator
WOF 
OSY 
BUZY 
READY 
FA_OSY 
SP_OSY 

Definition at line 89 of file CSCSPHeader.h.

Constructor & Destructor Documentation

CSCSPHeader::CSCSPHeader ( void  )
inline

Definition at line 106 of file CSCSPHeader.h.

106 {}

Member Function Documentation

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

Definition at line 97 of file CSCSPHeader.h.

References csr_dfc.

Referenced by CSCTFEvent::unpack().

97 { return csr_dfc>>4; }
unsigned csr_dfc
Definition: CSCSPHeader.h:61
unsigned int CSCSPHeader::BXN ( void  ) const
throw (
)
inline

Definition at line 74 of file CSCSPHeader.h.

References sp_bxn.

Referenced by CSCTFUnpacker::produce().

74 { return sp_bxn; }
unsigned sp_bxn
Definition: CSCSPHeader.h:18
bool CSCSPHeader::check ( void  ) const
inline

Definition at line 68 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().

68  {
69  return header_mark_1!=0x9 || header_mark_2!=0x9 || header_mark_3!=0x9 || header_mark_4!=0x9
70  || header_mark_5!=0xA || header_mark_6!=0xA || header_mark_7!=0xA || header_mark_8!=0xA
71  || zero_1!=0 || zero_2!=0 || zero_3!=0;
72  }
unsigned header_mark_8
Definition: CSCSPHeader.h:63
unsigned zero_3
Definition: CSCSPHeader.h:43
unsigned zero_1
Definition: CSCSPHeader.h:15
unsigned header_mark_7
Definition: CSCSPHeader.h:44
unsigned header_mark_6
Definition: CSCSPHeader.h:29
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
bool CSCSPHeader::ddu_readout ( void  ) const
throw (
)
inline

Definition at line 102 of file CSCSPHeader.h.

References ddm.

102 { return ddm; }
unsigned ddm
Definition: CSCSPHeader.h:42
bool CSCSPHeader::empty ( void  ) const
throw (
)
inline
unsigned int CSCSPHeader::endcap ( void  ) const
throw (
)
inline

Definition at line 84 of file CSCSPHeader.h.

References sp_ersv, and sp_trigger_sector.

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

84  {
85  if(sp_ersv<2) return sp_trigger_sector&0x8;
86  else return (sp_trigger_sector<=6?1:0);
87  }
unsigned sp_trigger_sector
Definition: CSCSPHeader.h:27
unsigned sp_ersv
Definition: CSCSPHeader.h:26
int CSCSPHeader::format_version ( void  ) const
throw (
)
inline
unsigned int CSCSPHeader::L1A ( void  ) const
throw (
)
inline

Definition at line 75 of file CSCSPHeader.h.

References sp_l1a_high, and sp_l1a_low.

Referenced by CSCTFUnpacker::produce().

75 { return (sp_l1a_high<<12)|sp_l1a_low; }
unsigned sp_l1a_low
Definition: CSCSPHeader.h:9
unsigned sp_l1a_high
Definition: CSCSPHeader.h:12
unsigned int CSCSPHeader::nTBINs ( void  ) const
throw (
)
inline

Definition at line 92 of file CSCSPHeader.h.

References csr_dfc.

Referenced by CSCTFUnpacker::produce(), and CSCTFEvent::unpack().

92 { return csr_dfc&0x7; }
unsigned csr_dfc
Definition: CSCSPHeader.h:61
unsigned int CSCSPHeader::sector ( void  ) const
throw (
)
inline

Definition at line 80 of file CSCSPHeader.h.

References sp_ersv, and sp_trigger_sector.

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

80  {
81  if(sp_ersv<2) return sp_trigger_sector&0x7;
83  }
unsigned sp_trigger_sector
Definition: CSCSPHeader.h:27
unsigned sp_ersv
Definition: CSCSPHeader.h:26
unsigned int CSCSPHeader::slot ( void  ) const
throw (
)
inline

Definition at line 77 of file CSCSPHeader.h.

References sp_slot_number.

Referenced by CSCTFUnpacker::produce().

77 { return sp_slot_number; }
unsigned sp_slot_number
Definition: CSCSPHeader.h:25
unsigned int CSCSPHeader::status ( void  ) const
throw (
)
inline

Definition at line 90 of file CSCSPHeader.h.

References fmm_status.

Referenced by CSCTFUnpacker::produce().

90 { return fmm_status; }
unsigned fmm_status
Definition: CSCSPHeader.h:41
bool CSCSPHeader::suppression ( void  ) const
throw (
)
inline

Definition at line 94 of file CSCSPHeader.h.

References csr_dfc.

Referenced by CSCTFEvent::unpack().

94 { return csr_dfc&0x8; }
unsigned csr_dfc
Definition: CSCSPHeader.h:61
unsigned int CSCSPHeader::trigger_sector ( void  ) const
throw (
)
inline

Definition at line 78 of file CSCSPHeader.h.

References sp_trigger_sector.

78 { return sp_trigger_sector; }
unsigned sp_trigger_sector
Definition: CSCSPHeader.h:27
bool CSCSPHeader::unpack ( const unsigned short *&  buf)
throw (
)
inline

Definition at line 104 of file CSCSPHeader.h.

References check().

Referenced by CSCTFEvent::unpack().

104 { memcpy((void*)this,buf,8*sizeof(short)); buf+=8; return check(); }
bool check(void) const
Definition: CSCSPHeader.h:68

Friends And Related Function Documentation

friend class CSCTFPacker
friend

Definition at line 65 of file CSCSPHeader.h.

Member Data Documentation

unsigned CSCSPHeader::csr_dfc
private

Definition at line 61 of file CSCSPHeader.h.

Referenced by active(), nTBINs(), CSCTFPacker::produce(), and suppression().

unsigned CSCSPHeader::ddm
private

Definition at line 42 of file CSCSPHeader.h.

Referenced by ddu_readout().

unsigned CSCSPHeader::fmm_status
private

Definition at line 41 of file CSCSPHeader.h.

Referenced by status().

unsigned CSCSPHeader::header_mark_1
private

Definition at line 10 of file CSCSPHeader.h.

Referenced by check(), and CSCTFPacker::produce().

unsigned CSCSPHeader::header_mark_2
private

Definition at line 13 of file CSCSPHeader.h.

Referenced by check(), and CSCTFPacker::produce().

unsigned CSCSPHeader::header_mark_3
private

Definition at line 16 of file CSCSPHeader.h.

Referenced by check(), and CSCTFPacker::produce().

unsigned CSCSPHeader::header_mark_4
private

Definition at line 19 of file CSCSPHeader.h.

Referenced by check(), and CSCTFPacker::produce().

unsigned CSCSPHeader::header_mark_5
private

Definition at line 23 of file CSCSPHeader.h.

Referenced by check(), and CSCTFPacker::produce().

unsigned CSCSPHeader::header_mark_6
private

Definition at line 29 of file CSCSPHeader.h.

Referenced by check(), and CSCTFPacker::produce().

unsigned CSCSPHeader::header_mark_7
private

Definition at line 44 of file CSCSPHeader.h.

Referenced by check(), and CSCTFPacker::produce().

unsigned CSCSPHeader::header_mark_8
private

Definition at line 63 of file CSCSPHeader.h.

Referenced by check(), and CSCTFPacker::produce().

unsigned CSCSPHeader::skip
private

Definition at line 62 of file CSCSPHeader.h.

Referenced by empty(), and CSCTFPacker::produce().

unsigned CSCSPHeader::sp_bxn
private

Definition at line 18 of file CSCSPHeader.h.

Referenced by BXN().

unsigned CSCSPHeader::sp_ersv
private

Definition at line 26 of file CSCSPHeader.h.

Referenced by endcap(), format_version(), CSCTFPacker::produce(), and sector().

unsigned CSCSPHeader::sp_l1a_high
private

Definition at line 12 of file CSCSPHeader.h.

Referenced by L1A().

unsigned CSCSPHeader::sp_l1a_low
private

Definition at line 9 of file CSCSPHeader.h.

Referenced by L1A().

unsigned CSCSPHeader::sp_slot_number
private

Definition at line 25 of file CSCSPHeader.h.

Referenced by slot().

unsigned CSCSPHeader::sp_trigger_sector
private

Definition at line 27 of file CSCSPHeader.h.

Referenced by endcap(), CSCTFPacker::produce(), sector(), and trigger_sector().

unsigned CSCSPHeader::zero_1
private

Definition at line 15 of file CSCSPHeader.h.

Referenced by check().

unsigned CSCSPHeader::zero_2
private

Definition at line 22 of file CSCSPHeader.h.

Referenced by check().

unsigned CSCSPHeader::zero_3
private

Definition at line 43 of file CSCSPHeader.h.

Referenced by check().