CMS 3D CMS Logo

List of all members | Static Public Member Functions | Static Private Attributes
RPCTBMuon::TBOut 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 = 2
 
static const unsigned int m_etaBitsMask = 0x3
 
static const int m_gbDataBitsCnt =2
 
static const unsigned int m_gbDataBitsMask = 0x3
 
static const int m_phiBitsCnt = 4
 
static const unsigned int m_phiBitsMask = 0xf
 
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 148 of file RPCTBMuon.h.

Member Function Documentation

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

Definition at line 263 of file RPCTBMuon.cc.

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

Referenced by RPCTBMuon::fromBits().

263  {
264  unsigned int shift = 0;
265  muon.m_Sign = (value & (m_signBitsMask<<shift)) >> shift; shift += m_signBitsCnt;
266  muon.m_PtCode = (value & (m_ptBitsMask<<shift)) >> shift; shift += m_ptBitsCnt;
267  muon.m_Quality = (value & (m_qualBitsMask<<shift)) >> shift; shift += m_qualBitsCnt;
268  muon.m_PhiAddress = (value & (m_phiBitsMask<<shift)) >> shift; shift += m_phiBitsCnt;
269  muon.m_EtaAddress = (value & (m_etaBitsMask<<shift)) >> shift; shift += m_etaBitsCnt;
270  muon.m_GBData = (value & (m_gbDataBitsMask<<shift))>> shift; shift += m_gbDataBitsCnt;
271 }
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:154
unsigned int m_GBData
Definition: RPCTBMuon.h:126
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:150
static const int m_gbDataBitsCnt
Definition: RPCTBMuon.h:155
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_signBitsCnt
Definition: RPCTBMuon.h:152
Definition: value.py:1
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:151
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:153
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
unsigned int RPCTBMuon::TBOut::toBits ( const RPCTBMuon muon)
static

Definition at line 273 of file RPCTBMuon.cc.

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

Referenced by RPCTBMuon::toBits().

273  {
274  unsigned int value = 0;
275  unsigned int shift = 0;
276  value = (muon.m_Sign<<shift); shift += m_signBitsCnt;
277  value = value | (muon.m_PtCode<<shift); shift += m_ptBitsCnt;
278  value = value | (muon.m_Quality<<shift); shift += m_qualBitsCnt;
279  value = value | (muon.m_PhiAddress<<shift); shift += m_phiBitsCnt;
280  value = value | (muon.m_EtaAddress<<shift); shift += m_etaBitsCnt;
281  value = value | (muon.m_GBData<<shift); shift += m_gbDataBitsCnt;
282  return value;
283 }
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:154
unsigned int m_GBData
Definition: RPCTBMuon.h:126
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:150
static const int m_gbDataBitsCnt
Definition: RPCTBMuon.h:155
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_signBitsCnt
Definition: RPCTBMuon.h:152
Definition: value.py:1
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:151
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:153
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::TBOut::m_etaBitsCnt = 2
staticprivate

Definition at line 154 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::TBOut::m_etaBitsMask = 0x3
staticprivate

Definition at line 154 of file RPCTBMuon.h.

const int RPCTBMuon::TBOut::m_gbDataBitsCnt =2
staticprivate

Definition at line 155 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::TBOut::m_gbDataBitsMask = 0x3
staticprivate

Definition at line 155 of file RPCTBMuon.h.

const int RPCTBMuon::TBOut::m_phiBitsCnt = 4
staticprivate

Definition at line 153 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::TBOut::m_phiBitsMask = 0xf
staticprivate

Definition at line 153 of file RPCTBMuon.h.

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

Definition at line 151 of file RPCTBMuon.h.

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

Definition at line 151 of file RPCTBMuon.h.

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

Definition at line 150 of file RPCTBMuon.h.

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

Definition at line 150 of file RPCTBMuon.h.

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

Definition at line 152 of file RPCTBMuon.h.

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

Definition at line 152 of file RPCTBMuon.h.