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 137 of file RPCTBMuon.h.

Member Function Documentation

◆ fromBits()

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

Definition at line 239 of file RPCTBMuon.cc.

References edm::shift.

Referenced by RPCTBMuon::fromBits().

239  {
240  unsigned int shift = 0;
241  muon.m_Sign = (value & (m_signBitsMask << shift)) >> shift;
242  shift += m_signBitsCnt;
243  muon.m_PtCode = (value & (m_ptBitsMask << shift)) >> shift;
244  shift += m_ptBitsCnt;
245  muon.m_Quality = (value & (m_qualBitsMask << shift)) >> shift;
246  shift += m_qualBitsCnt;
247  muon.m_PhiAddress = (value & (m_phiBitsMask << shift)) >> shift;
248  shift += m_phiBitsCnt;
249  muon.m_EtaAddress = (value & (m_etaBitsMask << shift)) >> shift;
250  shift += m_etaBitsCnt;
251  muon.m_GBData = (value & (m_gbDataBitsMask << shift)) >> shift;
252 }
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:147
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:139
static const int m_signBitsCnt
Definition: RPCTBMuon.h:143
Definition: value.py:1
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:141
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:145
static unsigned int const shift

◆ toBits()

unsigned int RPCTBMuon::TBOut::toBits ( const RPCTBMuon muon)
static

Definition at line 254 of file RPCTBMuon.cc.

References edm::shift, and relativeConstraints::value.

Referenced by RPCTBMuon::toBits().

254  {
255  unsigned int value = 0;
256  unsigned int shift = 0;
257  value = (muon.m_Sign << shift);
258  shift += m_signBitsCnt;
259  value = value | (muon.m_PtCode << shift);
260  shift += m_ptBitsCnt;
261  value = value | (muon.m_Quality << shift);
262  shift += m_qualBitsCnt;
263  value = value | (muon.m_PhiAddress << shift);
264  shift += m_phiBitsCnt;
265  value = value | (muon.m_EtaAddress << shift);
266  shift += m_etaBitsCnt;
267  value = value | (muon.m_GBData << shift);
268  return value;
269 }
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:147
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:139
static const int m_signBitsCnt
Definition: RPCTBMuon.h:143
Definition: value.py:1
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:141
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:145
static unsigned int const shift

Member Data Documentation

◆ m_etaBitsCnt

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

Definition at line 147 of file RPCTBMuon.h.

◆ m_etaBitsMask

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

Definition at line 148 of file RPCTBMuon.h.

◆ m_gbDataBitsCnt

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

Definition at line 149 of file RPCTBMuon.h.

◆ m_gbDataBitsMask

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

Definition at line 150 of file RPCTBMuon.h.

◆ m_phiBitsCnt

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

Definition at line 145 of file RPCTBMuon.h.

◆ m_phiBitsMask

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

Definition at line 146 of file RPCTBMuon.h.

◆ m_ptBitsCnt

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

Definition at line 141 of file RPCTBMuon.h.

◆ m_ptBitsMask

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

Definition at line 142 of file RPCTBMuon.h.

◆ m_qualBitsCnt

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

Definition at line 139 of file RPCTBMuon.h.

◆ m_qualBitsMask

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

Definition at line 140 of file RPCTBMuon.h.

◆ m_signBitsCnt

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

Definition at line 143 of file RPCTBMuon.h.

◆ m_signBitsMask

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

Definition at line 144 of file RPCTBMuon.h.