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 216 of file RPCTBMuon.cc.

216  {
217  unsigned int shift = 0;
218  muon.m_Sign = (value & (m_signBitsMask << shift)) >> shift;
219  shift += m_signBitsCnt;
220  muon.m_PtCode = (value & (m_ptBitsMask << shift)) >> shift;
221  shift += m_ptBitsCnt;
222  muon.m_Quality = (value & (m_qualBitsMask << shift)) >> shift;
223  shift += m_qualBitsCnt;
224 }

References m_ptBitsCnt, m_qualBitsCnt, m_signBitsCnt, and edm::shift.

Referenced by RPCTBMuon::fromBits().

◆ getMuonBitsCnt()

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

Definition at line 133 of file RPCTBMuon.h.

References m_ptBitsCnt, m_qualBitsCnt, and m_signBitsCnt.

◆ toBits()

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

Definition at line 226 of file RPCTBMuon.cc.

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  shift += m_qualBitsCnt;
235 
236  return value;
237 }

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

Referenced by RPCTBMuon::toBits().

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.

muon
Definition: MuonCocktails.h:17
RPCTBMuon::PACOut::m_signBitsCnt
static const int m_signBitsCnt
Definition: RPCTBMuon.h:126
RPCTBMuon::PACOut::m_ptBitsCnt
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:124
RPCTBMuon::PACOut::m_qualBitsCnt
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:122
value
Definition: value.py:1
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
relativeConstraints.value
value
Definition: relativeConstraints.py:53