CMS 3D CMS Logo

CSCSPRecord Class Reference

#include <EventFilter/CSCTFRawToDigi/src/CSCSPRecord.h>

List of all members.

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_5: 1
unsigned spare_6: 1
unsigned spare_7: 1
unsigned spare_8: 1
unsigned spare_9: 1
bool spFilled [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 91 of file CSCSPRecord.h.

00091 {}


Member Function Documentation

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

Definition at line 83 of file CSCSPRecord.h.

References af_barrel_1, af_barrel_2, and af_bits.

Referenced by CSCTFUnpacker::produce().

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

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

Definition at line 84 of file CSCSPRecord.h.

References bx_barrel_1, bx_barrel_2, and bx_bits.

Referenced by CSCTFUnpacker::produce().

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

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

Definition at line 66 of file CSCSPRecord.h.

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

00066                                        {
00067                 return zero_1 !=0 || zero_2 !=0 || zero_3 !=0 || zero_4 !=0
00068                         || zero_5 !=0 || zero_6 !=0 || zero_7 !=0 || zero_8 !=0
00069                         || spare_1!=0 || spare_2!=0 || spare_3!=0 || spare_4!=0
00070                         || spare_5!=0 || spare_6!=0 || spare_7!=0 || spare_8!=0 || spare_9!=0;
00071         }

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

Definition at line 85 of file CSCSPRecord.cc.

References link(), me, meFilled, and HLT_VtxMuL3::result.

Referenced by CSCTFUnpacker::produce().

00085                                                                                           {
00086         std::vector<CSCSP_MEblock> result;
00087         if( mpc<5 && link<3)
00088                 if(meFilled[mpc][link]) result.push_back(me[mpc][link]);
00089         return result;
00090 }

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

Definition at line 77 of file CSCSPRecord.cc.

References link(), me, meFilled, and HLT_VtxMuL3::result.

00077                                                                          {
00078         std::vector<CSCSP_MEblock> result;
00079         if( mpc<5 )
00080                 for(int link=0; link<3; link++)
00081                         if(meFilled[mpc][link]) result.push_back(me[mpc][link]);
00082         return result;
00083 }

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

Definition at line 69 of file CSCSPRecord.cc.

References link(), me, meFilled, and HLT_VtxMuL3::result.

00069                                                              {
00070         std::vector<CSCSP_MEblock> result;
00071         for(int mpc=0; mpc<5; mpc++)
00072                 for(int link=0; link<3; link++)
00073                         if(meFilled[mpc][link]) result.push_back(me[mpc][link]);
00074         return result;
00075 }

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

Definition at line 100 of file CSCSPRecord.cc.

References mb, mbFilled, and HLT_VtxMuL3::result.

00100                                                                 {
00101         std::vector<CSCSP_MBblock> result;
00102         if(mbFilled[0]) result.push_back(mb[0]);
00103         if(mbFilled[1]) result.push_back(mb[1]);
00104         return result;
00105 }

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

Definition at line 86 of file CSCSPRecord.h.

References pt_high, and pt_low.

Referenced by CSCTFUnpacker::produce().

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

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

Definition at line 87 of file CSCSPRecord.h.

References pt_spy_point.

Referenced by CSCTFUnpacker::produce().

00087 { return pt_spy_point;        }

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

Definition at line 81 of file CSCSPRecord.h.

References se_bits.

Referenced by CSCTFUnpacker::produce().

00081 { return se_bits; }

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

Definition at line 82 of file CSCSPRecord.h.

References sm_bits.

Referenced by CSCTFUnpacker::produce().

00082 { return sm_bits; }

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

Definition at line 92 of file CSCSPRecord.cc.

References HLT_VtxMuL3::result, sp, and spFilled.

Referenced by CSCTFUnpacker::produce().

00092                                                                {
00093         std::vector<CSCSP_SPblock> result;
00094         if(spFilled[0]) result.push_back(sp[0]);
00095         if(spFilled[1]) result.push_back(sp[1]);
00096         if(spFilled[2]) result.push_back(sp[2]);
00097         return result;
00098 }

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 parseConfig::block, HcalDataFrameFilter_impl::check(), CSCSPHeader::DT, CSCSPHeader::F1, CSCSPHeader::F2, CSCSPHeader::F3, CSCSPHeader::F4, CSCSPHeader::F5, link(), me, and CSCSPHeader::SP.

00005                                                                                                                                                {
00006         memcpy((void*)this, buf, 8*sizeof(short));
00007         buf += 8;
00008 
00009         bool unpackError = check();
00010 
00011         bzero(me,15*sizeof(CSCSP_MEblock));
00012         bzero(mb, 2*sizeof(CSCSP_MBblock));
00013         bzero(me, 3*sizeof(CSCSP_SPblock));
00014 
00015         bzero(meFilled,sizeof(meFilled));
00016         bzero(mbFilled,sizeof(mbFilled));
00017         bzero(spFilled,sizeof(spFilled));
00018 
00019         const CSCSPHeader::ACTIVE id[] = {
00020                 CSCSPHeader::F1, CSCSPHeader::F1, CSCSPHeader::F1,
00021                 CSCSPHeader::F2, CSCSPHeader::F2, CSCSPHeader::F2,
00022                 CSCSPHeader::F3, CSCSPHeader::F3, CSCSPHeader::F3,
00023                 CSCSPHeader::F4, CSCSPHeader::F4, CSCSPHeader::F4,
00024                 CSCSPHeader::F5, CSCSPHeader::F5, CSCSPHeader::F5
00025         };
00026 
00027         // 15 ME data blocks
00028         for(unsigned int block=0; block<15; block++)
00029                 if( nonmasked_data_blocks & id[block] &&
00030                         (!empty_blocks_suppressed || vp_bits&(1<<block)) ){
00031                         unsigned int mpc = block/3, link = block%3;
00032                         unpackError |= me[mpc][link].unpack(buf);
00033                         me[mpc][link].tbin_         = tbin;
00034                         me[mpc][link].valid_pattern = vp_bits&(1<<block);
00035                         me[mpc][link].sync_error    = se_bits&(1<<block);
00036                         me[mpc][link].sync_modified = sm_bits&(1<<block);
00037                         me[mpc][link].alignment_fifo= af_bits&(1<<block);
00038                         me[mpc][link].bxBit         = bx_bits&(1<<block);
00039                         me[mpc][link].spInput_      = block+1;
00040                         meFilled[mpc][link]         = true;
00041                 }
00042         // 2 MB data blocks
00043         for(unsigned int block=0; block<2; block++)
00044                 if( nonmasked_data_blocks & CSCSPHeader::DT &&
00045                         (!empty_blocks_suppressed || (block?vq_b:vq_a) )){
00046                         unpackError |= mb[block].unpack(buf);
00047                         mb[block].tbin_         = tbin;
00048                         mb[block].valid_quality = (block?vq_b:vq_a);
00049                         mb[block].alignment_fifo= (block?af_barrel_2:af_barrel_1);
00050                         mb[block].bxBit         = (block?bx_barrel_2:bx_barrel_1);
00051                         mb[block].id_           =  block+1;
00052                         mbFilled[block]         = true;
00053                 }
00054 
00055         // 3 SP data blocks
00056         for(unsigned int block=0; block<3; block++)
00057                 if( nonmasked_data_blocks & CSCSPHeader::SP &&
00058                         (!empty_blocks_suppressed || (block==0?mode1:(block==1?mode2:mode3))) ){
00059                         unpackError |= sp[block].unpack(buf);
00060                         sp[block].tbin_ = tbin;
00061                         sp[block].mode_ = (block==0?mode1:(block==1?mode2:mode3));
00062                         sp[block].id_   = block+1;
00063                         spFilled[block] = true;
00064                 }
00065 
00066         return unpackError;
00067 }

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

Definition at line 80 of file CSCSPRecord.h.

References vp_bits, vq_a, and vq_b.

Referenced by CSCTFUnpacker::produce().

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


Friends And Related Function Documentation

friend class CSCSPEvent [friend]

Definition at line 62 of file CSCSPRecord.h.

friend class CSCTFPacker [friend]

Definition at line 63 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 50 of file CSCSPRecord.h.

Referenced by BXs().

unsigned CSCSPRecord::bx_barrel_2 [private]

Definition at line 51 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 57 of file CSCSPRecord.h.

Referenced by mbStubs().

bool CSCSPRecord::mbFilled[2] [private]

Definition at line 60 of file CSCSPRecord.h.

Referenced by mbStubs().

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

Definition at line 56 of file CSCSPRecord.h.

Referenced by LCT(), and LCTs().

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

Definition at line 60 of file CSCSPRecord.h.

Referenced by LCT(), and 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 58 of file CSCSPRecord.h.

Referenced by tracks().

unsigned CSCSPRecord::spare_1 [private]

Definition at line 21 of file CSCSPRecord.h.

Referenced by check(), and 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_5 [private]

Definition at line 46 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::spare_6 [private]

Definition at line 47 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::spare_7 [private]

Definition at line 48 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::spare_8 [private]

Definition at line 49 of file CSCSPRecord.h.

Referenced by check().

unsigned CSCSPRecord::spare_9 [private]

Definition at line 52 of file CSCSPRecord.h.

Referenced by check().

bool CSCSPRecord::spFilled[3] [private]

Definition at line 60 of file CSCSPRecord.h.

Referenced by tracks().

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 53 of file CSCSPRecord.h.

Referenced by check().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:29 2009 for CMSSW by  doxygen 1.5.4