CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 (void) const throw ()
 
std::vector< CSCSP_MEblockLCTs (unsigned int mpc) 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 ( void  )
inline

Definition at line 94 of file CSCSPRecord.h.

94 {}

Member Function Documentation

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

Definition at line 86 of file CSCSPRecord.h.

References af_barrel_1, af_barrel_2, and af_bits.

Referenced by CSCTFUnpacker::produce().

86 { return af_bits|(af_barrel_1<<15)|(af_barrel_2<<16); }
unsigned af_barrel_1
Definition: CSCSPRecord.h:40
unsigned af_bits
Definition: CSCSPRecord.h:30
unsigned af_barrel_2
Definition: CSCSPRecord.h:41
unsigned int CSCSPRecord::BXs ( void  ) const
throw (
)
inline

Definition at line 87 of file CSCSPRecord.h.

References bx_barrel_1, bx_barrel_2, and bx_bits.

Referenced by CSCTFUnpacker::produce().

87 { return bx_bits|(bx_barrel_1<<15)|(bx_barrel_2<<16); }
unsigned bx_bits
Definition: CSCSPRecord.h:33
unsigned bx_barrel_1
Definition: CSCSPRecord.h:53
unsigned bx_barrel_2
Definition: CSCSPRecord.h:54
bool CSCSPRecord::check ( void  ) const
throw (
)
inline

Definition at line 69 of file CSCSPRecord.h.

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.

69  {
70  return zero_1 !=0 || zero_2 !=0 || zero_3 !=0 || zero_4 !=0
71  || zero_5 !=0 || zero_6 !=0 || zero_7 !=0 || zero_8 !=0 // || spare_1!=0
72  || spare_2!=0 || spare_3!=0 || spare_4!=0 || spare_8!=0
73  || spare_9!=0;
74  }
unsigned zero_5
Definition: CSCSPRecord.h:31
unsigned zero_6
Definition: CSCSPRecord.h:34
unsigned zero_7
Definition: CSCSPRecord.h:43
unsigned spare_9
Definition: CSCSPRecord.h:55
unsigned zero_3
Definition: CSCSPRecord.h:25
unsigned spare_2
Definition: CSCSPRecord.h:38
unsigned zero_2
Definition: CSCSPRecord.h:22
unsigned zero_1
Definition: CSCSPRecord.h:14
unsigned spare_4
Definition: CSCSPRecord.h:42
unsigned spare_8
Definition: CSCSPRecord.h:52
unsigned zero_4
Definition: CSCSPRecord.h:28
unsigned spare_3
Definition: CSCSPRecord.h:39
unsigned zero_8
Definition: CSCSPRecord.h:56
std::vector< CSCSP_MEblock > CSCSPRecord::LCT ( unsigned int  mpc,
unsigned int  link 
) const
throw (
)

Definition at line 85 of file CSCSPRecord.cc.

References MainPageGenerator::link, and query::result.

Referenced by CSCTFUnpacker::produce().

85  {
86  std::vector<CSCSP_MEblock> result;
87  if( mpc<5 && link<3)
88  if(meFilled[mpc][link]) result.push_back(me[mpc][link]);
89  return result;
90 }
bool meFilled[5][3]
Definition: CSCSPRecord.h:63
CSCSP_MEblock me[5][3]
Definition: CSCSPRecord.h:59
tuple result
Definition: query.py:137
std::vector< CSCSP_MEblock > CSCSPRecord::LCTs ( void  ) const
throw (
)

Definition at line 69 of file CSCSPRecord.cc.

References MainPageGenerator::link, me, meFilled, and query::result.

69  {
70  std::vector<CSCSP_MEblock> result;
71  for(int mpc=0; mpc<5; mpc++)
72  for(int link=0; link<3; link++)
73  if(meFilled[mpc][link]) result.push_back(me[mpc][link]);
74  return result;
75 }
bool meFilled[5][3]
Definition: CSCSPRecord.h:63
CSCSP_MEblock me[5][3]
Definition: CSCSPRecord.h:59
tuple result
Definition: query.py:137
std::vector< CSCSP_MEblock > CSCSPRecord::LCTs ( unsigned int  mpc) const
throw (
)

Definition at line 77 of file CSCSPRecord.cc.

References MainPageGenerator::link, and query::result.

77  {
78  std::vector<CSCSP_MEblock> result;
79  if( mpc<5 )
80  for(int link=0; link<3; link++)
81  if(meFilled[mpc][link]) result.push_back(me[mpc][link]);
82  return result;
83 }
bool meFilled[5][3]
Definition: CSCSPRecord.h:63
CSCSP_MEblock me[5][3]
Definition: CSCSPRecord.h:59
tuple result
Definition: query.py:137
std::vector< CSCSP_MBblock > CSCSPRecord::mbStubs ( void  ) const
throw (
)

Definition at line 100 of file CSCSPRecord.cc.

References mb, mbFilled, and query::result.

Referenced by CSCTFUnpacker::produce().

100  {
101  std::vector<CSCSP_MBblock> result;
102  if(mbFilled[0]) result.push_back(mb[0]);
103  if(mbFilled[1]) result.push_back(mb[1]);
104  return result;
105 }
tuple result
Definition: query.py:137
bool mbFilled[2]
Definition: CSCSPRecord.h:63
CSCSP_MBblock mb[2]
Definition: CSCSPRecord.h:60
unsigned int CSCSPRecord::ptSpy ( void  ) const
throw (
)
inline

Definition at line 89 of file CSCSPRecord.h.

References pt_high, and pt_low.

Referenced by CSCTFUnpacker::produce().

89 { return (pt_high<<8)|pt_low; }
unsigned pt_low
Definition: CSCSPRecord.h:36
unsigned pt_high
Definition: CSCSPRecord.h:45
unsigned int CSCSPRecord::ptSpyTrack ( void  ) const
throw (
)
inline

Definition at line 90 of file CSCSPRecord.h.

References pt_spy_point.

90 { return pt_spy_point; }
unsigned pt_spy_point
Definition: CSCSPRecord.h:37
unsigned int CSCSPRecord::SEs ( void  ) const
throw (
)
inline

Definition at line 84 of file CSCSPRecord.h.

References se_bits.

Referenced by CSCTFUnpacker::produce().

84 { return se_bits; }
unsigned se_bits
Definition: CSCSPRecord.h:24
unsigned int CSCSPRecord::SMs ( void  ) const
throw (
)
inline

Definition at line 85 of file CSCSPRecord.h.

References sm_bits.

Referenced by CSCTFUnpacker::produce().

85 { return sm_bits; }
unsigned sm_bits
Definition: CSCSPRecord.h:27
std::vector< CSCSP_SPblock > CSCSPRecord::tracks ( void  ) const
throw (
)

Definition at line 92 of file CSCSPRecord.cc.

References query::result, sp, and spFilled.

Referenced by CSCTFUnpacker::produce().

92  {
93  std::vector<CSCSP_SPblock> result;
94  if(spFilled[0]) result.push_back(sp[0]);
95  if(spFilled[1]) result.push_back(sp[1]);
96  if(spFilled[2]) result.push_back(sp[2]);
97  return result;
98 }
CSCSP_SPblock sp[3]
Definition: CSCSPRecord.h:61
bool spFilled[3]
Definition: CSCSPRecord.h:63
tuple result
Definition: query.py:137
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.

References createPayload::block, DDVectorGetter::check(), CSCSPHeader::DT, CSCSPHeader::F1, CSCSPHeader::F2, CSCSPHeader::F3, CSCSPHeader::F4, CSCSPHeader::F5, MainPageGenerator::link, and CSCSPHeader::SP.

5  {
6  memcpy((void*)this, buf, 8*sizeof(short));
7  buf += 8;
8 
9  bool unpackError = check();
10 
11  bzero(me,15*sizeof(CSCSP_MEblock));
12  bzero(mb, 2*sizeof(CSCSP_MBblock));
13  bzero(me, 3*sizeof(CSCSP_SPblock));
14 
15  bzero(meFilled,sizeof(meFilled));
16  bzero(mbFilled,sizeof(mbFilled));
17  bzero(spFilled,sizeof(spFilled));
18 
19  const CSCSPHeader::ACTIVE id[] = {
24  CSCSPHeader::F5, CSCSPHeader::F5, CSCSPHeader::F5
25  };
26 
27  // 15 ME data blocks
28  for(unsigned int block=0; block<15; block++)
29  if( nonmasked_data_blocks & id[block] &&
30  (!empty_blocks_suppressed || vp_bits&(1<<block)) ){
31  unsigned int mpc = block/3, link = block%3;
32  unpackError |= me[mpc][link].unpack(buf);
33  me[mpc][link].tbin_ = tbin;
34  me[mpc][link].valid_pattern = vp_bits&(1<<block);
35  me[mpc][link].sync_error = se_bits&(1<<block);
36  me[mpc][link].sync_modified = sm_bits&(1<<block);
37  me[mpc][link].alignment_fifo= af_bits&(1<<block);
38  me[mpc][link].bxBit = bx_bits&(1<<block);
39  me[mpc][link].spInput_ = block+1;
40  meFilled[mpc][link] = true;
41  }
42  // 2 MB data blocks
43  for(unsigned int block=0; block<2; block++)
44  if( nonmasked_data_blocks & CSCSPHeader::DT &&
45  (!empty_blocks_suppressed || (block?vq_b:vq_a) )){
46  unpackError |= mb[block].unpack(buf);
47  mb[block].tbin_ = tbin;
51  mb[block].id_ = block+1;
52  mbFilled[block] = true;
53  }
54 
55  // 3 SP data blocks
56  for(unsigned int block=0; block<3; block++)
57  if( nonmasked_data_blocks & CSCSPHeader::SP &&
58  (!empty_blocks_suppressed || (block==0?mode1:(block==1?mode2:mode3))) ){
59  unpackError |= sp[block].unpack(buf);
60  sp[block].tbin_ = tbin;
61  sp[block].mode_ = (block==0?mode1:(block==1?mode2:mode3));
62  sp[block].id_ = block+1;
63  spFilled[block] = true;
64  }
65 
66  return unpackError;
67 }
unsigned bx_bits
Definition: CSCSPRecord.h:33
unsigned int bxBit
Definition: CSCSP_MBblock.h:36
unsigned int bxBit
Definition: CSCSP_MEblock.h:50
bool meFilled[5][3]
Definition: CSCSPRecord.h:63
unsigned af_barrel_1
Definition: CSCSPRecord.h:40
unsigned int sync_modified
Definition: CSCSP_MEblock.h:48
unsigned int alignment_fifo
Definition: CSCSP_MBblock.h:35
unsigned bx_barrel_1
Definition: CSCSPRecord.h:53
CSCSP_SPblock sp[3]
Definition: CSCSPRecord.h:61
unsigned int tbin_
Definition: CSCSP_SPblock.h:54
unsigned af_bits
Definition: CSCSPRecord.h:30
unsigned mode2
Definition: CSCSPRecord.h:17
unsigned int spInput_
Definition: CSCSP_MEblock.h:51
bool spFilled[3]
Definition: CSCSPRecord.h:63
CSCSP_MEblock me[5][3]
Definition: CSCSPRecord.h:59
unsigned int sync_error
Definition: CSCSP_MEblock.h:47
unsigned int id_
Definition: CSCSP_MBblock.h:37
unsigned int tbin_
Definition: CSCSP_MBblock.h:33
unsigned int id_
Definition: CSCSP_SPblock.h:56
unsigned int alignment_fifo
Definition: CSCSP_MEblock.h:49
bool unpack(const unsigned short *&buf)
Definition: CSCSP_MBblock.h:58
bool mbFilled[2]
Definition: CSCSPRecord.h:63
unsigned mode3
Definition: CSCSPRecord.h:18
unsigned int tbin_
Definition: CSCSP_MEblock.h:45
unsigned int valid_quality
Definition: CSCSP_MBblock.h:34
bool unpack(const unsigned short *&buf)
unsigned mode1
Definition: CSCSPRecord.h:16
bool unpack(const unsigned short *&buf)
Definition: CSCSP_MEblock.h:87
bool check(void) const
Definition: CSCSPRecord.h:69
unsigned vq_a
Definition: CSCSPRecord.h:19
unsigned int mode_
Definition: CSCSP_SPblock.h:55
unsigned se_bits
Definition: CSCSPRecord.h:24
unsigned vq_b
Definition: CSCSPRecord.h:20
unsigned af_barrel_2
Definition: CSCSPRecord.h:41
unsigned int valid_pattern
Definition: CSCSP_MEblock.h:46
unsigned bx_barrel_2
Definition: CSCSPRecord.h:54
unsigned sm_bits
Definition: CSCSPRecord.h:27
CSCSP_MBblock mb[2]
Definition: CSCSPRecord.h:60
unsigned vp_bits
Definition: CSCSPRecord.h:13
unsigned int CSCSPRecord::VPs ( void  ) const
throw (
)
inline

Definition at line 83 of file CSCSPRecord.h.

References vp_bits, vq_a, and vq_b.

Referenced by CSCTFUnpacker::produce().

83 { return vp_bits|(vq_a<<15)|(vq_b<<16); }
unsigned vq_a
Definition: CSCSPRecord.h:19
unsigned vq_b
Definition: CSCSPRecord.h:20
unsigned vp_bits
Definition: CSCSPRecord.h:13

Friends And Related Function Documentation

friend class CSCSPEvent
friend

Definition at line 65 of file CSCSPRecord.h.

friend class CSCTFPacker
friend

Definition at line 66 of file CSCSPRecord.h.

Member Data Documentation

unsigned CSCSPRecord::af_barrel_1
private

Definition at line 40 of file CSCSPRecord.h.

Referenced by AFs().

unsigned CSCSPRecord::af_barrel_2
private

Definition at line 41 of file CSCSPRecord.h.

Referenced by AFs().

unsigned CSCSPRecord::af_bits
private

Definition at line 30 of file CSCSPRecord.h.

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

unsigned CSCSPRecord::bx_barrel_1
private

Definition at line 53 of file CSCSPRecord.h.

Referenced by BXs().

unsigned CSCSPRecord::bx_barrel_2
private

Definition at line 54 of file CSCSPRecord.h.

Referenced by BXs().

unsigned CSCSPRecord::bx_bits
private

Definition at line 33 of file CSCSPRecord.h.

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

CSCSP_MBblock CSCSPRecord::mb[2]
private

Definition at line 60 of file CSCSPRecord.h.

Referenced by mbStubs().

bool CSCSPRecord::mbFilled[2]
private

Definition at line 63 of file CSCSPRecord.h.

Referenced by mbStubs().

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

Definition at line 59 of file CSCSPRecord.h.

Referenced by LCTs().

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

Definition at line 63 of file CSCSPRecord.h.

Referenced by LCTs().

unsigned CSCSPRecord::mode1
private

Definition at line 16 of file CSCSPRecord.h.

Referenced by CSCTFPacker::produce().

unsigned CSCSPRecord::mode2
private

Definition at line 17 of file CSCSPRecord.h.

Referenced by CSCTFPacker::produce().

unsigned CSCSPRecord::mode3
private

Definition at line 18 of file CSCSPRecord.h.

Referenced by CSCTFPacker::produce().

unsigned CSCSPRecord::pt_high
private

Definition at line 45 of file CSCSPRecord.h.

Referenced by ptSpy().

unsigned CSCSPRecord::pt_low
private

Definition at line 36 of file CSCSPRecord.h.

Referenced by ptSpy().

unsigned CSCSPRecord::pt_spy_point
private

Definition at line 37 of file CSCSPRecord.h.

Referenced by ptSpyTrack().

unsigned CSCSPRecord::se_bits
private

Definition at line 24 of file CSCSPRecord.h.

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

unsigned CSCSPRecord::sm_bits
private

Definition at line 27 of file CSCSPRecord.h.

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

CSCSP_SPblock CSCSPRecord::sp[3]
private

Definition at line 61 of file CSCSPRecord.h.

Referenced by tracks().

unsigned CSCSPRecord::spare_1
private

Definition at line 21 of file CSCSPRecord.h.

Referenced by CSCTFPacker::produce().

unsigned CSCSPRecord::spare_2
private

Definition at line 38 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::spare_3
private

Definition at line 39 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::spare_4
private

Definition at line 42 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::spare_8
private

Definition at line 52 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::spare_9
private

Definition at line 55 of file CSCSPRecord.h.

Referenced by check().

bool CSCSPRecord::spFilled[3]
private

Definition at line 63 of file CSCSPRecord.h.

Referenced by tracks().

unsigned CSCSPRecord::time_bin
private

Definition at line 46 of file CSCSPRecord.h.

unsigned CSCSPRecord::vp_bits
private

Definition at line 13 of file CSCSPRecord.h.

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

unsigned CSCSPRecord::vq_a
private

Definition at line 19 of file CSCSPRecord.h.

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

unsigned CSCSPRecord::vq_b
private

Definition at line 20 of file CSCSPRecord.h.

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

unsigned CSCSPRecord::zero_1
private

Definition at line 14 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::zero_2
private

Definition at line 22 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::zero_3
private

Definition at line 25 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::zero_4
private

Definition at line 28 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::zero_5
private

Definition at line 31 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::zero_6
private

Definition at line 34 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::zero_7
private

Definition at line 43 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::zero_8
private

Definition at line 56 of file CSCSPRecord.h.

Referenced by check().