CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 216 of file RPCTBMuon.cc.

References m_ptBitsCnt, RPCMuon::m_PtCode, m_qualBitsCnt, RPCMuon::m_Quality, RPCMuon::m_Sign, m_signBitsCnt, and edm::shift.

Referenced by RPCTBMuon::fromBits().

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 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:124
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:122
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:90
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:96
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:93
static const int m_signBitsCnt
Definition: RPCTBMuon.h:126
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
unsigned int RPCTBMuon::PACOut::toBits ( const RPCTBMuon muon)
static

Definition at line 226 of file RPCTBMuon.cc.

References RPCMuon::m_PtCode, RPCMuon::m_Quality, RPCMuon::m_Sign, 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  shift += m_qualBitsCnt;
235 
236  return value;
237 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:124
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:122
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:90
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:96
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:93
static const int m_signBitsCnt
Definition: RPCTBMuon.h:126

Member Data Documentation

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

Definition at line 124 of file RPCTBMuon.h.

Referenced by fromBits(), and getMuonBitsCnt().

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

Definition at line 125 of file RPCTBMuon.h.

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

Definition at line 122 of file RPCTBMuon.h.

Referenced by fromBits(), and getMuonBitsCnt().

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

Definition at line 123 of file RPCTBMuon.h.

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

Definition at line 126 of file RPCTBMuon.h.

Referenced by fromBits(), and getMuonBitsCnt().

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

Definition at line 127 of file RPCTBMuon.h.