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_qualBitsCnt, 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  shift += m_qualBitsCnt;
225 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:124
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:122
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 227 of file RPCTBMuon.cc.

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

Referenced by RPCTBMuon::toBits().

227  {
228  unsigned int value = 0;
229  unsigned int shift = 0;
230  value = (muon.m_Sign << shift);
231  shift += m_signBitsCnt;
232  value = value | (muon.m_PtCode << shift);
233  shift += m_ptBitsCnt;
234  value = value | (muon.m_Quality << shift);
235  shift += m_qualBitsCnt;
236 
237  return value;
238 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:124
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:122
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 fromBits(), and 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.