CMS 3D CMS Logo

List of all members | Static Public Member Functions | Static Private Attributes
RPCTBMuon::HSBOut 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 = 7
 
static const unsigned int m_phiBitsMask = 0x7f
 
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 179 of file RPCTBMuon.h.

Member Function Documentation

◆ fromBits()

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

Definition at line 330 of file RPCTBMuon.cc.

References edm::shift.

Referenced by RPCTBMuon::fromBits().

330  {
331  unsigned int shift = 0;
332  muon.m_Sign = (value & (m_signBitsMask << shift)) >> shift;
333  shift += m_signBitsCnt;
334  muon.m_PtCode = (value & (m_ptBitsMask << shift)) >> shift;
335  shift += m_ptBitsCnt;
336  muon.m_Quality = (value & (m_qualBitsMask << shift)) >> shift;
337  shift += m_qualBitsCnt;
338  muon.m_PhiAddress = (value & (m_phiBitsMask << shift)) >> shift;
339  shift += m_phiBitsCnt;
340  muon.m_EtaAddress = (value & (m_etaBitsMask << shift)) >> shift;
341  shift += m_etaBitsCnt;
342 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:183
static const int m_signBitsCnt
Definition: RPCTBMuon.h:181
Definition: value.py:1
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:189
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:185
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:187
static unsigned int const shift

◆ toBits()

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

Definition at line 311 of file RPCTBMuon.cc.

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

Referenced by RPCTBMuon::toBits().

311  {
312  unsigned int value = 0;
313 
314  unsigned int shift = 0;
315  value = value | (muon.m_Sign << shift);
316  shift += m_signBitsCnt;
317  // value = (muon.m_Sign<<shift); shift += m_signBitsCnt;
318  value = value | (muon.m_PtCode << shift);
319  shift += m_ptBitsCnt;
320  value = value | (muon.m_Quality << shift);
321  shift += m_qualBitsCnt;
322  value = value | (muon.m_PhiAddress << shift);
323  shift += m_phiBitsCnt;
324  value = value | (muon.m_EtaAddress << shift);
325  shift += m_etaBitsCnt;
326 
327  return value;
328 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:183
static const int m_signBitsCnt
Definition: RPCTBMuon.h:181
Definition: value.py:1
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:189
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:185
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:187
static unsigned int const shift

Member Data Documentation

◆ m_etaBitsCnt

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

Definition at line 189 of file RPCTBMuon.h.

◆ m_etaBitsMask

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

Definition at line 190 of file RPCTBMuon.h.

◆ m_phiBitsCnt

const int RPCTBMuon::HSBOut::m_phiBitsCnt = 7
staticprivate

Definition at line 187 of file RPCTBMuon.h.

◆ m_phiBitsMask

const unsigned int RPCTBMuon::HSBOut::m_phiBitsMask = 0x7f
staticprivate

Definition at line 188 of file RPCTBMuon.h.

◆ m_ptBitsCnt

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

Definition at line 183 of file RPCTBMuon.h.

◆ m_ptBitsMask

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

Definition at line 184 of file RPCTBMuon.h.

◆ m_qualBitsCnt

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

Definition at line 185 of file RPCTBMuon.h.

◆ m_qualBitsMask

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

Definition at line 186 of file RPCTBMuon.h.

◆ m_signBitsCnt

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

Definition at line 181 of file RPCTBMuon.h.

◆ m_signBitsMask

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

Definition at line 182 of file RPCTBMuon.h.