CMS 3D CMS Logo

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

#include <CSCSPRecord.h>

Public Member Functions

unsigned int AFs (void) const throw ()
 
unsigned int BXs (void) const throw ()
 
bool check (void) const throw ()
 
 CSCSPRecord (void)
 
std::vector< CSCSP_MEblockLCT (unsigned int mpc, unsigned int link) const throw ()
 
std::vector< CSCSP_MEblockLCTs (unsigned int mpc) const throw ()
 
std::vector< CSCSP_MEblockLCTs (void) const throw ()
 
std::vector< CSCSP_MBblockmbStubs (void) const throw ()
 
unsigned int ptSpy (void) const throw ()
 
unsigned int ptSpyTrack (void) const throw ()
 
unsigned int SEs (void) const throw ()
 
unsigned int SMs (void) const throw ()
 
std::vector< CSCSP_SPblocktracks (void) const throw ()
 
bool unpack (const unsigned short *&buf, unsigned int nonmasked_data_blocks, bool empty_blocks_suppressed, unsigned int tbin) throw ()
 
unsigned int VPs (void) const throw ()
 

Private Attributes

unsigned af_barrel_1: 1
 
unsigned af_barrel_2: 1
 
unsigned af_bits: 15
 
unsigned bx_barrel_1: 1
 
unsigned bx_barrel_2: 1
 
unsigned bx_bits: 15
 
CSCSP_MBblock mb [2]
 
bool mbFilled [2]
 
CSCSP_MEblock me [5][3]
 
bool meFilled [5][3]
 
unsigned mode1: 4
 
unsigned mode2: 4
 
unsigned mode3: 4
 
unsigned pt_high: 8
 
unsigned pt_low: 8
 
unsigned pt_spy_point: 2
 
unsigned se_bits: 15
 
unsigned sm_bits: 15
 
CSCSP_SPblock sp [3]
 
unsigned spare_1: 1
 
unsigned spare_2: 1
 
unsigned spare_3: 1
 
unsigned spare_4: 1
 
unsigned spare_8: 1
 
unsigned spare_9: 1
 
bool spFilled [3]
 
unsigned time_bin: 3
 
unsigned vp_bits: 15
 
unsigned vq_a: 1
 
unsigned vq_b: 1
 
unsigned zero_1: 1
 
unsigned zero_2: 1
 
unsigned zero_3: 1
 
unsigned zero_4: 1
 
unsigned zero_5: 1
 
unsigned zero_6: 1
 
unsigned zero_7: 1
 
unsigned zero_8: 1
 

Friends

class CSCSPEvent
 
class CSCTFPacker
 

Detailed Description

Definition at line 9 of file CSCSPRecord.h.

Constructor & Destructor Documentation

◆ CSCSPRecord()

CSCSPRecord::CSCSPRecord ( void  )
inline

Definition at line 97 of file CSCSPRecord.h.

97 {}

Member Function Documentation

◆ AFs()

unsigned int CSCSPRecord::AFs ( void  ) const
throw (
)
inline

Definition at line 86 of file CSCSPRecord.h.

86 { return af_bits | (af_barrel_1 << 15) | (af_barrel_2 << 16); }

References af_barrel_1, af_barrel_2, and af_bits.

Referenced by CSCTFUnpacker::produce().

◆ BXs()

unsigned int CSCSPRecord::BXs ( void  ) const
throw (
)
inline

Definition at line 87 of file CSCSPRecord.h.

87 { return bx_bits | (bx_barrel_1 << 15) | (bx_barrel_2 << 16); }

References bx_barrel_1, bx_barrel_2, and bx_bits.

Referenced by CSCTFUnpacker::produce().

◆ check()

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

Definition at line 70 of file CSCSPRecord.h.

70  {
71  return zero_1 != 0 || zero_2 != 0 || zero_3 != 0 || zero_4 != 0 || zero_5 != 0 || zero_6 != 0 || zero_7 != 0 ||
72  zero_8 != 0 // || spare_1!=0
73  || spare_2 != 0 || spare_3 != 0 || spare_4 != 0 || spare_8 != 0 || spare_9 != 0;
74  }

References spare_2, spare_3, spare_4, spare_8, spare_9, zero_1, zero_2, zero_3, zero_4, zero_5, zero_6, zero_7, and zero_8.

◆ LCT()

std::vector< CSCSP_MEblock > CSCSPRecord::LCT ( unsigned int  mpc,
unsigned int  link 
) const
throw (
)

Definition at line 96 of file CSCSPRecord.cc.

96  {
97  std::vector<CSCSP_MEblock> result;
98  if (mpc < 5 && link < 3)
99  if (meFilled[mpc][link])
100  result.push_back(me[mpc][link]);
101  return result;
102 }

References MainPageGenerator::link, hlt_dqm_clientPB-live_cfg::me, and mps_fire::result.

Referenced by CSCTFUnpacker::produce().

◆ LCTs() [1/2]

std::vector< CSCSP_MEblock > CSCSPRecord::LCTs ( unsigned int  mpc) const
throw (
)

Definition at line 87 of file CSCSPRecord.cc.

87  {
88  std::vector<CSCSP_MEblock> result;
89  if (mpc < 5)
90  for (int link = 0; link < 3; link++)
91  if (meFilled[mpc][link])
92  result.push_back(me[mpc][link]);
93  return result;
94 }

References MainPageGenerator::link, hlt_dqm_clientPB-live_cfg::me, and mps_fire::result.

◆ LCTs() [2/2]

std::vector< CSCSP_MEblock > CSCSPRecord::LCTs ( void  ) const
throw (
)

Definition at line 78 of file CSCSPRecord.cc.

78  {
79  std::vector<CSCSP_MEblock> result;
80  for (int mpc = 0; mpc < 5; mpc++)
81  for (int link = 0; link < 3; link++)
82  if (meFilled[mpc][link])
83  result.push_back(me[mpc][link]);
84  return result;
85 }

References MainPageGenerator::link, hlt_dqm_clientPB-live_cfg::me, and mps_fire::result.

◆ mbStubs()

std::vector< CSCSP_MBblock > CSCSPRecord::mbStubs ( void  ) const
throw (
)

Definition at line 115 of file CSCSPRecord.cc.

115  {
116  std::vector<CSCSP_MBblock> result;
117  if (mbFilled[0])
118  result.push_back(mb[0]);
119  if (mbFilled[1])
120  result.push_back(mb[1]);
121  return result;
122 }

References mps_fire::result.

Referenced by CSCTFUnpacker::produce().

◆ ptSpy()

unsigned int CSCSPRecord::ptSpy ( void  ) const
throw (
)
inline

Definition at line 89 of file CSCSPRecord.h.

89 { return (pt_high << 8) | pt_low; }

References pt_high, and pt_low.

Referenced by CSCTFUnpacker::produce().

◆ ptSpyTrack()

unsigned int CSCSPRecord::ptSpyTrack ( void  ) const
throw (
)
inline

Definition at line 90 of file CSCSPRecord.h.

90 { return pt_spy_point; }

References pt_spy_point.

◆ SEs()

unsigned int CSCSPRecord::SEs ( void  ) const
throw (
)
inline

Definition at line 84 of file CSCSPRecord.h.

84 { return se_bits; }

References se_bits.

Referenced by CSCTFUnpacker::produce().

◆ SMs()

unsigned int CSCSPRecord::SMs ( void  ) const
throw (
)
inline

Definition at line 85 of file CSCSPRecord.h.

85 { return sm_bits; }

References sm_bits.

Referenced by CSCTFUnpacker::produce().

◆ tracks()

std::vector< CSCSP_SPblock > CSCSPRecord::tracks ( void  ) const
throw (
)

Definition at line 104 of file CSCSPRecord.cc.

104  {
105  std::vector<CSCSP_SPblock> result;
106  if (spFilled[0])
107  result.push_back(sp[0]);
108  if (spFilled[1])
109  result.push_back(sp[1]);
110  if (spFilled[2])
111  result.push_back(sp[2]);
112  return result;
113 }

References mps_fire::result.

Referenced by CSCTFUnpacker::produce().

◆ unpack()

bool CSCSPRecord::unpack ( const unsigned short *&  buf,
unsigned int  nonmasked_data_blocks,
bool  empty_blocks_suppressed,
unsigned int  tbin 
)
throw (
)

Definition at line 5 of file CSCSPRecord.cc.

8  {
9  memcpy((void*)this, buf, 8 * sizeof(short));
10  buf += 8;
11 
12  bool unpackError = check();
13 
14  bzero(me, 15 * sizeof(CSCSP_MEblock));
15  bzero(mb, 2 * sizeof(CSCSP_MBblock));
16  bzero(me, 3 * sizeof(CSCSP_SPblock));
17 
18  bzero(meFilled, sizeof(meFilled));
19  bzero(mbFilled, sizeof(mbFilled));
20  bzero(spFilled, sizeof(spFilled));
21 
37 
38  // 15 ME data blocks
39  for (unsigned int block = 0; block < 15; block++)
40  if (nonmasked_data_blocks & id[block] && (!empty_blocks_suppressed || vp_bits & (1 << block))) {
41  unsigned int mpc = block / 3, link = block % 3;
42  unpackError |= me[mpc][link].unpack(buf);
43  me[mpc][link].tbin_ = tbin;
44  me[mpc][link].valid_pattern = vp_bits & (1 << block);
45  me[mpc][link].sync_error = se_bits & (1 << block);
46  me[mpc][link].sync_modified = sm_bits & (1 << block);
47  me[mpc][link].alignment_fifo = af_bits & (1 << block);
48  me[mpc][link].bxBit = bx_bits & (1 << block);
49  me[mpc][link].spInput_ = block + 1;
50  meFilled[mpc][link] = true;
51  }
52  // 2 MB data blocks
53  for (unsigned int block = 0; block < 2; block++)
54  if (nonmasked_data_blocks & CSCSPHeader::DT && (!empty_blocks_suppressed || (block ? vq_b : vq_a))) {
55  unpackError |= mb[block].unpack(buf);
56  mb[block].tbin_ = tbin;
60  mb[block].id_ = block + 1;
61  mbFilled[block] = true;
62  }
63 
64  // 3 SP data blocks
65  for (unsigned int block = 0; block < 3; block++)
66  if (nonmasked_data_blocks & CSCSPHeader::SP &&
67  (!empty_blocks_suppressed || (block == 0 ? mode1 : (block == 1 ? mode2 : mode3)))) {
68  unpackError |= sp[block].unpack(buf);
69  sp[block].tbin_ = tbin;
70  sp[block].mode_ = (block == 0 ? mode1 : (block == 1 ? mode2 : mode3));
71  sp[block].id_ = block + 1;
72  spFilled[block] = true;
73  }
74 
75  return unpackError;
76 }

References groupFilesInBlocks::block, visDQMUpload::buf, RPCNoise_example::check, CSCSPHeader::DT, CSCSPHeader::F1, CSCSPHeader::F2, CSCSPHeader::F3, CSCSPHeader::F4, CSCSPHeader::F5, MainPageGenerator::link, hlt_dqm_clientPB-live_cfg::me, and CSCSPHeader::SP.

◆ VPs()

unsigned int CSCSPRecord::VPs ( void  ) const
throw (
)
inline

Definition at line 83 of file CSCSPRecord.h.

83 { return vp_bits | (vq_a << 15) | (vq_b << 16); }

References vp_bits, vq_a, and vq_b.

Referenced by CSCTFUnpacker::produce().

Friends And Related Function Documentation

◆ CSCSPEvent

friend class CSCSPEvent
friend

Definition at line 66 of file CSCSPRecord.h.

◆ CSCTFPacker

friend class CSCTFPacker
friend

Definition at line 67 of file CSCSPRecord.h.

Member Data Documentation

◆ af_barrel_1

unsigned CSCSPRecord::af_barrel_1
private

Definition at line 41 of file CSCSPRecord.h.

Referenced by AFs().

◆ af_barrel_2

unsigned CSCSPRecord::af_barrel_2
private

Definition at line 42 of file CSCSPRecord.h.

Referenced by AFs().

◆ af_bits

unsigned CSCSPRecord::af_bits
private

Definition at line 31 of file CSCSPRecord.h.

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

◆ bx_barrel_1

unsigned CSCSPRecord::bx_barrel_1
private

Definition at line 54 of file CSCSPRecord.h.

Referenced by BXs().

◆ bx_barrel_2

unsigned CSCSPRecord::bx_barrel_2
private

Definition at line 55 of file CSCSPRecord.h.

Referenced by BXs().

◆ bx_bits

unsigned CSCSPRecord::bx_bits
private

Definition at line 34 of file CSCSPRecord.h.

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

◆ mb

CSCSP_MBblock CSCSPRecord::mb[2]
private

Definition at line 61 of file CSCSPRecord.h.

◆ mbFilled

bool CSCSPRecord::mbFilled[2]
private

Definition at line 64 of file CSCSPRecord.h.

◆ me

CSCSP_MEblock CSCSPRecord::me[5][3]
private

Definition at line 60 of file CSCSPRecord.h.

◆ meFilled

bool CSCSPRecord::meFilled[5][3]
private

Definition at line 64 of file CSCSPRecord.h.

◆ mode1

unsigned CSCSPRecord::mode1
private

Definition at line 16 of file CSCSPRecord.h.

Referenced by CSCTFPacker::produce().

◆ mode2

unsigned CSCSPRecord::mode2
private

Definition at line 17 of file CSCSPRecord.h.

Referenced by CSCTFPacker::produce().

◆ mode3

unsigned CSCSPRecord::mode3
private

Definition at line 18 of file CSCSPRecord.h.

Referenced by CSCTFPacker::produce().

◆ pt_high

unsigned CSCSPRecord::pt_high
private

Definition at line 46 of file CSCSPRecord.h.

Referenced by ptSpy().

◆ pt_low

unsigned CSCSPRecord::pt_low
private

Definition at line 37 of file CSCSPRecord.h.

Referenced by ptSpy().

◆ pt_spy_point

unsigned CSCSPRecord::pt_spy_point
private

Definition at line 38 of file CSCSPRecord.h.

Referenced by ptSpyTrack().

◆ se_bits

unsigned CSCSPRecord::se_bits
private

Definition at line 24 of file CSCSPRecord.h.

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

◆ sm_bits

unsigned CSCSPRecord::sm_bits
private

Definition at line 28 of file CSCSPRecord.h.

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

◆ sp

CSCSP_SPblock CSCSPRecord::sp[3]
private

Definition at line 62 of file CSCSPRecord.h.

◆ spare_1

unsigned CSCSPRecord::spare_1
private

Definition at line 21 of file CSCSPRecord.h.

Referenced by CSCTFPacker::produce().

◆ spare_2

unsigned CSCSPRecord::spare_2
private

Definition at line 39 of file CSCSPRecord.h.

Referenced by check().

◆ spare_3

unsigned CSCSPRecord::spare_3
private

Definition at line 40 of file CSCSPRecord.h.

Referenced by check().

◆ spare_4

unsigned CSCSPRecord::spare_4
private

Definition at line 43 of file CSCSPRecord.h.

Referenced by check().

◆ spare_8

unsigned CSCSPRecord::spare_8
private

Definition at line 53 of file CSCSPRecord.h.

Referenced by check().

◆ spare_9

unsigned CSCSPRecord::spare_9
private

Definition at line 56 of file CSCSPRecord.h.

Referenced by check().

◆ spFilled

bool CSCSPRecord::spFilled[3]
private

Definition at line 64 of file CSCSPRecord.h.

◆ time_bin

unsigned CSCSPRecord::time_bin
private

Definition at line 47 of file CSCSPRecord.h.

◆ vp_bits

unsigned CSCSPRecord::vp_bits
private

Definition at line 13 of file CSCSPRecord.h.

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

◆ vq_a

unsigned CSCSPRecord::vq_a
private

Definition at line 19 of file CSCSPRecord.h.

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

◆ vq_b

unsigned CSCSPRecord::vq_b
private

Definition at line 20 of file CSCSPRecord.h.

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

◆ zero_1

unsigned CSCSPRecord::zero_1
private

Definition at line 14 of file CSCSPRecord.h.

Referenced by check().

◆ zero_2

unsigned CSCSPRecord::zero_2
private

Definition at line 22 of file CSCSPRecord.h.

Referenced by check().

◆ zero_3

unsigned CSCSPRecord::zero_3
private

Definition at line 25 of file CSCSPRecord.h.

Referenced by check().

◆ zero_4

unsigned CSCSPRecord::zero_4
private

Definition at line 29 of file CSCSPRecord.h.

Referenced by check().

◆ zero_5

unsigned CSCSPRecord::zero_5
private

Definition at line 32 of file CSCSPRecord.h.

Referenced by check().

◆ zero_6

unsigned CSCSPRecord::zero_6
private

Definition at line 35 of file CSCSPRecord.h.

Referenced by check().

◆ zero_7

unsigned CSCSPRecord::zero_7
private

Definition at line 44 of file CSCSPRecord.h.

Referenced by check().

◆ zero_8

unsigned CSCSPRecord::zero_8
private

Definition at line 57 of file CSCSPRecord.h.

Referenced by check().

CSCSPRecord::zero_6
unsigned zero_6
Definition: CSCSPRecord.h:35
CSCSPRecord::sm_bits
unsigned sm_bits
Definition: CSCSPRecord.h:28
CSCSPRecord::bx_barrel_2
unsigned bx_barrel_2
Definition: CSCSPRecord.h:55
CSCSPRecord::bx_barrel_1
unsigned bx_barrel_1
Definition: CSCSPRecord.h:54
CSCSP_MEblock::sync_error
unsigned int sync_error
Definition: CSCSP_MEblock.h:53
CSCSP_MBblock
Definition: CSCSP_MBblock.h:6
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
CSCSPRecord::sp
CSCSP_SPblock sp[3]
Definition: CSCSPRecord.h:62
CSCSPRecord::af_bits
unsigned af_bits
Definition: CSCSPRecord.h:31
CSCSPHeader::F3
Definition: CSCSPHeader.h:101
CSCSPHeader::ACTIVE
ACTIVE
Definition: CSCSPHeader.h:101
CSCSPRecord::af_barrel_1
unsigned af_barrel_1
Definition: CSCSPRecord.h:41
CSCSP_SPblock::tbin_
unsigned int tbin_
Definition: CSCSP_SPblock.h:55
CSCSP_SPblock::mode_
unsigned int mode_
Definition: CSCSP_SPblock.h:56
CSCSP_MBblock::bxBit
unsigned int bxBit
Definition: CSCSP_MBblock.h:38
CSCSP_MEblock::unpack
bool unpack(const unsigned short *&buf)
Definition: CSCSP_MEblock.h:93
CSCSPHeader::F4
Definition: CSCSPHeader.h:101
CSCSP_MBblock::valid_quality
unsigned int valid_quality
Definition: CSCSP_MBblock.h:36
CSCSPHeader::SP
Definition: CSCSPHeader.h:101
CSCSP_MBblock::tbin_
unsigned int tbin_
Definition: CSCSP_MBblock.h:35
CSCSPRecord::zero_7
unsigned zero_7
Definition: CSCSPRecord.h:44
CSCSPRecord::spare_9
unsigned spare_9
Definition: CSCSPRecord.h:56
CSCSPRecord::mode2
unsigned mode2
Definition: CSCSPRecord.h:17
CSCSP_MBblock::unpack
bool unpack(const unsigned short *&buf)
Definition: CSCSP_MBblock.h:63
CSCSP_MEblock
Definition: CSCSP_MEblock.h:6
CSCSP_SPblock::unpack
bool unpack(const unsigned short *&buf)
Definition: CSCSP_SPblock.h:113
CSCSPRecord::pt_spy_point
unsigned pt_spy_point
Definition: CSCSPRecord.h:38
CSCSPRecord::zero_3
unsigned zero_3
Definition: CSCSPRecord.h:25
CSCSPRecord::zero_1
unsigned zero_1
Definition: CSCSPRecord.h:14
CSCSPRecord::me
CSCSP_MEblock me[5][3]
Definition: CSCSPRecord.h:60
CSCSPRecord::spare_2
unsigned spare_2
Definition: CSCSPRecord.h:39
CSCSPRecord::mbFilled
bool mbFilled[2]
Definition: CSCSPRecord.h:64
CSCSPHeader::F2
Definition: CSCSPHeader.h:101
CSCSP_SPblock
Definition: CSCSP_SPblock.h:8
CSCSPHeader::F1
Definition: CSCSPHeader.h:101
CSCSPRecord::zero_2
unsigned zero_2
Definition: CSCSPRecord.h:22
CSCSP_MEblock::spInput_
unsigned int spInput_
Definition: CSCSP_MEblock.h:57
CSCSP_MBblock::alignment_fifo
unsigned int alignment_fifo
Definition: CSCSP_MBblock.h:37
CSCSPRecord::spFilled
bool spFilled[3]
Definition: CSCSPRecord.h:64
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCSP_SPblock::id_
unsigned int id_
Definition: CSCSP_SPblock.h:57
CSCSPRecord::spare_4
unsigned spare_4
Definition: CSCSPRecord.h:43
CSCSPRecord::pt_low
unsigned pt_low
Definition: CSCSPRecord.h:37
CSCSPRecord::mode3
unsigned mode3
Definition: CSCSPRecord.h:18
CSCSP_MEblock::valid_pattern
unsigned int valid_pattern
Definition: CSCSP_MEblock.h:52
CSCSPRecord::pt_high
unsigned pt_high
Definition: CSCSPRecord.h:46
CSCSPRecord::check
bool check(void) const
Definition: CSCSPRecord.h:70
CSCSPHeader::DT
Definition: CSCSPHeader.h:101
CSCSPRecord::vp_bits
unsigned vp_bits
Definition: CSCSPRecord.h:13
CSCSPRecord::se_bits
unsigned se_bits
Definition: CSCSPRecord.h:24
CSCSPRecord::mode1
unsigned mode1
Definition: CSCSPRecord.h:16
CSCSP_MEblock::alignment_fifo
unsigned int alignment_fifo
Definition: CSCSP_MEblock.h:55
CSCSPRecord::zero_4
unsigned zero_4
Definition: CSCSPRecord.h:29
CSCSPHeader::F5
Definition: CSCSPHeader.h:101
CSCSP_MEblock::tbin_
unsigned int tbin_
Definition: CSCSP_MEblock.h:51
CSCSPRecord::bx_bits
unsigned bx_bits
Definition: CSCSPRecord.h:34
mps_fire.result
result
Definition: mps_fire.py:311
CSCSPRecord::vq_a
unsigned vq_a
Definition: CSCSPRecord.h:19
CSCSPRecord::zero_8
unsigned zero_8
Definition: CSCSPRecord.h:57
CSCSPRecord::mb
CSCSP_MBblock mb[2]
Definition: CSCSPRecord.h:61
CSCSP_MEblock::bxBit
unsigned int bxBit
Definition: CSCSP_MEblock.h:56
CSCSPRecord::vq_b
unsigned vq_b
Definition: CSCSPRecord.h:20
CSCSPRecord::spare_3
unsigned spare_3
Definition: CSCSPRecord.h:40
CSCSPRecord::zero_5
unsigned zero_5
Definition: CSCSPRecord.h:32
CSCSP_MEblock::sync_modified
unsigned int sync_modified
Definition: CSCSP_MEblock.h:54
CSCSPRecord::meFilled
bool meFilled[5][3]
Definition: CSCSPRecord.h:64
CSCSPRecord::af_barrel_2
unsigned af_barrel_2
Definition: CSCSPRecord.h:42
CSCSP_MBblock::id_
unsigned int id_
Definition: CSCSP_MBblock.h:39
CSCSPRecord::spare_8
unsigned spare_8
Definition: CSCSPRecord.h:53