CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions | Static Private Attributes
RPCTBMuon::FSBOut Class Reference

#include <RPCTBMuon.h>

Static Public Member Functions

static void fromBits (RPCTBMuon &muon, unsigned int value)
 
static unsigned int toBits (const RPCTBMuon &muon)
 

Static Private Attributes

static const int m_etaBitsCnt = 6
 
static const unsigned int m_etaBitsMask = 0x3f
 
static const int m_phiBitsCnt = 8
 
static const unsigned int m_phiBitsMask = 0xff
 
static const int m_ptBitsCnt = 5
 
static const unsigned int m_ptBitsMask = 0x1f
 
static const int m_qualBitsCnt = 3
 
static const unsigned int m_qualBitsMask = 0x7
 
static const int m_signBitsCnt = 1
 
static const unsigned int m_signBitsMask = 0x1
 

Detailed Description

Definition at line 191 of file RPCTBMuon.h.

Member Function Documentation

void RPCTBMuon::FSBOut::fromBits ( RPCTBMuon muon,
unsigned int  value 
)
static

Definition at line 351 of file RPCTBMuon.cc.

References RPCTBMuon::m_EtaAddress, RPCTBMuon::m_PhiAddress, RPCMuon::m_PtCode, RPCMuon::m_Quality, RPCMuon::m_Sign, and edm::shift.

Referenced by RPCTBMuon::fromBits().

351  {
352  unsigned int shift = 0;
353  muon.m_PhiAddress = value & m_phiBitsMask; shift += m_phiBitsCnt;
354  muon.m_PtCode = (value & (m_ptBitsMask<<shift)) >> shift; shift += m_ptBitsCnt;
355  muon.m_Quality = (value & (m_qualBitsMask<<shift)) >> shift; shift += m_qualBitsCnt;
356 
357  //+1 beacouse H/F bits, unused in RPC:
358  muon.m_EtaAddress = (value & (m_etaBitsMask<<shift)) >> shift; shift += m_etaBitsCnt + 1;
359  muon.m_Sign = (value & (m_signBitsMask<<shift)) >> shift; shift += m_signBitsCnt;
360 
361  muon.m_PtCode = (~(muon.m_PtCode)) & m_ptBitsMask;
362  muon.m_Quality = (~(muon.m_Quality)) & m_qualBitsMask;
363 }
static const int m_signBitsCnt
Definition: RPCTBMuon.h:197
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:194
unsigned int m_PhiAddress
Definition: RPCTBMuon.h:119
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:87
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:93
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:196
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:194
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:193
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:195
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:195
unsigned int m_EtaAddress
Definition: RPCTBMuon.h:117
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:90
static const unsigned int m_phiBitsMask
Definition: RPCTBMuon.h:193
unsigned int RPCTBMuon::FSBOut::toBits ( const RPCTBMuon muon)
static

Definition at line 332 of file RPCTBMuon.cc.

References RPCTBMuon::m_EtaAddress, RPCTBMuon::m_PhiAddress, RPCMuon::m_PtCode, RPCMuon::m_Quality, RPCMuon::m_Sign, edm::shift, and relativeConstraints::value.

Referenced by RPCTBMuon::toBits().

332  {
333  unsigned int value = 0;
334 
335  unsigned int shift = 0;
336  //bita are reversed, to be zero when cable not connected
337  unsigned int ptCode = (~(muon.m_PtCode)) & m_ptBitsMask;
338  unsigned int quality = (~(muon.m_Quality)) & m_qualBitsMask;
339 
340  value = value | muon.m_PhiAddress; shift += m_phiBitsCnt;
341  value = value | (ptCode<<shift); shift += m_ptBitsCnt;
342  value = value | (quality<<shift); shift += m_qualBitsCnt;
343 
344  //+1 beacouse H/F bits, unused in RPC:
345  value = value | (muon.m_EtaAddress<<shift); shift += m_etaBitsCnt + 1;
346  value = value | (muon.m_Sign<<shift); shift += m_signBitsCnt;
347 
348  return value;
349 }
static const int m_signBitsCnt
Definition: RPCTBMuon.h:197
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:194
unsigned int m_PhiAddress
Definition: RPCTBMuon.h:119
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:87
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:93
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:196
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:194
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:193
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:195
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:195
unsigned int m_EtaAddress
Definition: RPCTBMuon.h:117
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:90

Member Data Documentation

const int RPCTBMuon::FSBOut::m_etaBitsCnt = 6
staticprivate

Definition at line 196 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_etaBitsMask = 0x3f
staticprivate

Definition at line 196 of file RPCTBMuon.h.

const int RPCTBMuon::FSBOut::m_phiBitsCnt = 8
staticprivate

Definition at line 193 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_phiBitsMask = 0xff
staticprivate

Definition at line 193 of file RPCTBMuon.h.

const int RPCTBMuon::FSBOut::m_ptBitsCnt = 5
staticprivate

Definition at line 194 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_ptBitsMask = 0x1f
staticprivate

Definition at line 194 of file RPCTBMuon.h.

const int RPCTBMuon::FSBOut::m_qualBitsCnt = 3
staticprivate

Definition at line 195 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_qualBitsMask = 0x7
staticprivate

Definition at line 195 of file RPCTBMuon.h.

const int RPCTBMuon::FSBOut::m_signBitsCnt = 1
staticprivate

Definition at line 197 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::FSBOut::m_signBitsMask = 0x1
staticprivate

Definition at line 197 of file RPCTBMuon.h.