CMS 3D CMS Logo

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

#include <CSCSPTrailer.h>

Public Member Functions

unsigned int board_id (void) const throw ()
 
bool check (void) const throw ()
 
unsigned int configuration (void) const throw ()
 
unsigned int crc (void) const throw ()
 
 CSCSPTrailer (void)
 
unsigned int day (void) const throw ()
 
unsigned int l1a_7bits (void) const throw ()
 
bool l1a_fifo_full (void) const throw ()
 
unsigned int l1a_queue_size (void) const throw ()
 
unsigned int month (void) const throw ()
 
bool unpack (const unsigned short *&buf) throw ()
 
unsigned int year (void) const throw ()
 

Private Attributes

unsigned bb_: 1
 
unsigned board_id_: 12
 
unsigned core_configuraton: 12
 
unsigned crc_high: 11
 
unsigned crc_high_parity: 1
 
unsigned crc_low: 11
 
unsigned crc_low_parity: 1
 
unsigned day_: 5
 
unsigned l1a_: 8
 
unsigned l1a_fifo_full_: 1
 
unsigned month_: 4
 
unsigned spare_1: 1
 
unsigned spare_2: 1
 
unsigned trailer_mark_1: 4
 
unsigned trailer_mark_10: 4
 
unsigned trailer_mark_2: 4
 
unsigned trailer_mark_3: 3
 
unsigned trailer_mark_4: 4
 
unsigned trailer_mark_5: 4
 
unsigned trailer_mark_6: 4
 
unsigned trailer_mark_7: 4
 
unsigned trailer_mark_8: 4
 
unsigned trailer_mark_9: 4
 
unsigned word_count_high: 4
 
unsigned word_count_low: 4
 
unsigned year_: 4
 
unsigned zero_1: 1
 
unsigned zero_2: 7
 

Friends

class CSCTFPacker
 

Detailed Description

Definition at line 6 of file CSCSPTrailer.h.

Constructor & Destructor Documentation

◆ CSCSPTrailer()

CSCSPTrailer::CSCSPTrailer ( void  )
inline

Definition at line 78 of file CSCSPTrailer.h.

78 {}

Member Function Documentation

◆ board_id()

unsigned int CSCSPTrailer::board_id ( void  ) const
throw (
)
inline

Definition at line 68 of file CSCSPTrailer.h.

68 { return board_id_; }

References board_id_.

◆ check()

bool CSCSPTrailer::check ( void  ) const
throw (
)
inline

Definition at line 48 of file CSCSPTrailer.h.

48  {
49  return spare_1 != 0 || spare_2 != 0 || zero_1 != 0 || zero_2 != 0 || trailer_mark_1 != 0xF ||
50  trailer_mark_2 != 0xF || trailer_mark_3 != 0x7 || trailer_mark_4 != 0xF || trailer_mark_5 != 0xF ||
51  trailer_mark_6 != 0xF || trailer_mark_7 != 0xE || trailer_mark_8 != 0xE || trailer_mark_9 != 0xE ||
52  trailer_mark_10 != 0xE;
53  }

References spare_1, spare_2, trailer_mark_1, trailer_mark_10, trailer_mark_2, trailer_mark_3, trailer_mark_4, trailer_mark_5, trailer_mark_6, trailer_mark_7, trailer_mark_8, trailer_mark_9, zero_1, and zero_2.

Referenced by unpack().

◆ configuration()

unsigned int CSCSPTrailer::configuration ( void  ) const
throw (
)
inline

Definition at line 62 of file CSCSPTrailer.h.

62 { return core_configuraton; }

References core_configuraton.

◆ crc()

unsigned int CSCSPTrailer::crc ( void  ) const
throw (
)
inline

Definition at line 70 of file CSCSPTrailer.h.

70 { return crc_low | (crc_high << 11); }

References crc_high, and crc_low.

◆ day()

unsigned int CSCSPTrailer::day ( void  ) const
throw (
)
inline

Definition at line 61 of file CSCSPTrailer.h.

61 { return day_; }

References day_.

◆ l1a_7bits()

unsigned int CSCSPTrailer::l1a_7bits ( void  ) const
throw (
)
inline

Definition at line 55 of file CSCSPTrailer.h.

55 { return l1a_; }

References l1a_.

◆ l1a_fifo_full()

bool CSCSPTrailer::l1a_fifo_full ( void  ) const
throw (
)
inline

Definition at line 57 of file CSCSPTrailer.h.

57 { return l1a_fifo_full_; }

References l1a_fifo_full_.

◆ l1a_queue_size()

unsigned int CSCSPTrailer::l1a_queue_size ( void  ) const
throw (
)
inline

Definition at line 56 of file CSCSPTrailer.h.

56 { return (word_count_high << 4) | word_count_low; }

References word_count_high, and word_count_low.

◆ month()

unsigned int CSCSPTrailer::month ( void  ) const
throw (
)
inline

Definition at line 60 of file CSCSPTrailer.h.

60 { return month_; }

References month_.

◆ unpack()

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

Definition at line 72 of file CSCSPTrailer.h.

72  {
73  std::memcpy(this, buf, 8 * sizeof(short));
74  buf += 8;
75  return check();
76  }

References visDQMUpload::buf, and check().

◆ year()

unsigned int CSCSPTrailer::year ( void  ) const
throw (
)
inline

Definition at line 59 of file CSCSPTrailer.h.

59 { return 2000 + 16 * bb_ + year_; }

References bb_, and year_.

Friends And Related Function Documentation

◆ CSCTFPacker

friend class CSCTFPacker
friend

Definition at line 45 of file CSCSPTrailer.h.

Member Data Documentation

◆ bb_

unsigned CSCSPTrailer::bb_
private

Definition at line 21 of file CSCSPTrailer.h.

Referenced by year().

◆ board_id_

unsigned CSCSPTrailer::board_id_
private

Definition at line 34 of file CSCSPTrailer.h.

Referenced by board_id().

◆ core_configuraton

unsigned CSCSPTrailer::core_configuraton
private

Definition at line 27 of file CSCSPTrailer.h.

Referenced by configuration().

◆ crc_high

unsigned CSCSPTrailer::crc_high
private

Definition at line 41 of file CSCSPTrailer.h.

Referenced by crc().

◆ crc_high_parity

unsigned CSCSPTrailer::crc_high_parity
private

Definition at line 42 of file CSCSPTrailer.h.

◆ crc_low

unsigned CSCSPTrailer::crc_low
private

Definition at line 37 of file CSCSPTrailer.h.

Referenced by crc().

◆ crc_low_parity

unsigned CSCSPTrailer::crc_low_parity
private

Definition at line 38 of file CSCSPTrailer.h.

◆ day_

unsigned CSCSPTrailer::day_
private

Definition at line 30 of file CSCSPTrailer.h.

Referenced by day().

◆ l1a_

unsigned CSCSPTrailer::l1a_
private

Definition at line 9 of file CSCSPTrailer.h.

Referenced by l1a_7bits().

◆ l1a_fifo_full_

unsigned CSCSPTrailer::l1a_fifo_full_
private

Definition at line 15 of file CSCSPTrailer.h.

Referenced by l1a_fifo_full().

◆ month_

unsigned CSCSPTrailer::month_
private

Definition at line 19 of file CSCSPTrailer.h.

Referenced by month().

◆ spare_1

unsigned CSCSPTrailer::spare_1
private

Definition at line 22 of file CSCSPTrailer.h.

Referenced by check().

◆ spare_2

unsigned CSCSPTrailer::spare_2
private

Definition at line 23 of file CSCSPTrailer.h.

Referenced by check().

◆ trailer_mark_1

unsigned CSCSPTrailer::trailer_mark_1
private

Definition at line 11 of file CSCSPTrailer.h.

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

◆ trailer_mark_10

unsigned CSCSPTrailer::trailer_mark_10
private

Definition at line 43 of file CSCSPTrailer.h.

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

◆ trailer_mark_2

unsigned CSCSPTrailer::trailer_mark_2
private

Definition at line 13 of file CSCSPTrailer.h.

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

◆ trailer_mark_3

unsigned CSCSPTrailer::trailer_mark_3
private

Definition at line 14 of file CSCSPTrailer.h.

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

◆ trailer_mark_4

unsigned CSCSPTrailer::trailer_mark_4
private

Definition at line 17 of file CSCSPTrailer.h.

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

◆ trailer_mark_5

unsigned CSCSPTrailer::trailer_mark_5
private

Definition at line 25 of file CSCSPTrailer.h.

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

◆ trailer_mark_6

unsigned CSCSPTrailer::trailer_mark_6
private

Definition at line 28 of file CSCSPTrailer.h.

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

◆ trailer_mark_7

unsigned CSCSPTrailer::trailer_mark_7
private

Definition at line 32 of file CSCSPTrailer.h.

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

◆ trailer_mark_8

unsigned CSCSPTrailer::trailer_mark_8
private

Definition at line 35 of file CSCSPTrailer.h.

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

◆ trailer_mark_9

unsigned CSCSPTrailer::trailer_mark_9
private

Definition at line 39 of file CSCSPTrailer.h.

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

◆ word_count_high

unsigned CSCSPTrailer::word_count_high
private

Definition at line 16 of file CSCSPTrailer.h.

Referenced by l1a_queue_size().

◆ word_count_low

unsigned CSCSPTrailer::word_count_low
private

Definition at line 10 of file CSCSPTrailer.h.

Referenced by l1a_queue_size().

◆ year_

unsigned CSCSPTrailer::year_
private

Definition at line 20 of file CSCSPTrailer.h.

Referenced by year().

◆ zero_1

unsigned CSCSPTrailer::zero_1
private

Definition at line 24 of file CSCSPTrailer.h.

Referenced by check().

◆ zero_2

unsigned CSCSPTrailer::zero_2
private

Definition at line 31 of file CSCSPTrailer.h.

Referenced by check().

CSCSPTrailer::trailer_mark_6
unsigned trailer_mark_6
Definition: CSCSPTrailer.h:28
CSCSPTrailer::bb_
unsigned bb_
Definition: CSCSPTrailer.h:21
CSCSPTrailer::trailer_mark_9
unsigned trailer_mark_9
Definition: CSCSPTrailer.h:39
CSCSPTrailer::board_id_
unsigned board_id_
Definition: CSCSPTrailer.h:34
CSCSPTrailer::l1a_
unsigned l1a_
Definition: CSCSPTrailer.h:9
CSCSPTrailer::crc_low
unsigned crc_low
Definition: CSCSPTrailer.h:37
CSCSPTrailer::word_count_low
unsigned word_count_low
Definition: CSCSPTrailer.h:10
CSCSPTrailer::trailer_mark_1
unsigned trailer_mark_1
Definition: CSCSPTrailer.h:11
CSCSPTrailer::zero_1
unsigned zero_1
Definition: CSCSPTrailer.h:24
CSCSPTrailer::trailer_mark_8
unsigned trailer_mark_8
Definition: CSCSPTrailer.h:35
CSCSPTrailer::trailer_mark_3
unsigned trailer_mark_3
Definition: CSCSPTrailer.h:14
CSCSPTrailer::trailer_mark_7
unsigned trailer_mark_7
Definition: CSCSPTrailer.h:32
CSCSPTrailer::year_
unsigned year_
Definition: CSCSPTrailer.h:20
CSCSPTrailer::trailer_mark_5
unsigned trailer_mark_5
Definition: CSCSPTrailer.h:25
CSCSPTrailer::month_
unsigned month_
Definition: CSCSPTrailer.h:19
CSCSPTrailer::check
bool check(void) const
Definition: CSCSPTrailer.h:48
CSCSPTrailer::day_
unsigned day_
Definition: CSCSPTrailer.h:30
CSCSPTrailer::spare_1
unsigned spare_1
Definition: CSCSPTrailer.h:22
CSCSPTrailer::spare_2
unsigned spare_2
Definition: CSCSPTrailer.h:23
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCSPTrailer::l1a_fifo_full_
unsigned l1a_fifo_full_
Definition: CSCSPTrailer.h:15
CSCSPTrailer::zero_2
unsigned zero_2
Definition: CSCSPTrailer.h:31
CSCSPTrailer::crc_high
unsigned crc_high
Definition: CSCSPTrailer.h:41
CSCSPTrailer::core_configuraton
unsigned core_configuraton
Definition: CSCSPTrailer.h:27
CSCSPTrailer::trailer_mark_2
unsigned trailer_mark_2
Definition: CSCSPTrailer.h:13
CSCSPTrailer::trailer_mark_10
unsigned trailer_mark_10
Definition: CSCSPTrailer.h:43
CSCSPTrailer::trailer_mark_4
unsigned trailer_mark_4
Definition: CSCSPTrailer.h:17
CSCSPTrailer::word_count_high
unsigned word_count_high
Definition: CSCSPTrailer.h:16