CMS 3D CMS Logo

List of all members | Static Public Member Functions | Static Private Attributes
RPCTBMuon::PACOut Class Reference

#include <RPCTBMuon.h>

Static Public Member Functions

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

Static Private Attributes

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

Member Function Documentation

◆ fromBits()

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

Definition at line 217 of file RPCTBMuon.cc.

References m_ptBitsCnt, m_signBitsCnt, and edm::shift.

Referenced by RPCTBMuon::fromBits().

217  {
218  unsigned int shift = 0;
219  muon.m_Sign = (value & (m_signBitsMask << shift)) >> shift;
220  shift += m_signBitsCnt;
221  muon.m_PtCode = (value & (m_ptBitsMask << shift)) >> shift;
222  shift += m_ptBitsCnt;
223  muon.m_Quality = (value & (m_qualBitsMask << shift)) >> shift;
224 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:124
Definition: value.py:1
static unsigned int const shift
static const int m_signBitsCnt
Definition: RPCTBMuon.h:126

◆ getMuonBitsCnt()

static const int RPCTBMuon::PACOut::getMuonBitsCnt ( )
inlinestatic

Definition at line 133 of file RPCTBMuon.h.

References m_ptBitsCnt, m_qualBitsCnt, and m_signBitsCnt.

static const int m_ptBitsCnt
Definition: RPCTBMuon.h:124
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:122
static const int m_signBitsCnt
Definition: RPCTBMuon.h:126

◆ toBits()

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

Definition at line 226 of file RPCTBMuon.cc.

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

Referenced by RPCTBMuon::toBits().

226  {
227  unsigned int value = 0;
228  unsigned int shift = 0;
229  value = (muon.m_Sign << shift);
230  shift += m_signBitsCnt;
231  value = value | (muon.m_PtCode << shift);
232  shift += m_ptBitsCnt;
233  value = value | (muon.m_Quality << shift);
234 
235  return value;
236 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:124
Definition: value.py:1
static unsigned int const shift
static const int m_signBitsCnt
Definition: RPCTBMuon.h:126

Member Data Documentation

◆ m_ptBitsCnt

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

Definition at line 124 of file RPCTBMuon.h.

Referenced by fromBits(), and getMuonBitsCnt().

◆ m_ptBitsMask

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

Definition at line 125 of file RPCTBMuon.h.

◆ m_qualBitsCnt

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

Definition at line 122 of file RPCTBMuon.h.

Referenced by getMuonBitsCnt().

◆ m_qualBitsMask

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

Definition at line 123 of file RPCTBMuon.h.

◆ m_signBitsCnt

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

Definition at line 126 of file RPCTBMuon.h.

Referenced by fromBits(), and getMuonBitsCnt().

◆ m_signBitsMask

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

Definition at line 127 of file RPCTBMuon.h.