CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 133 of file RPCTBMuon.h.

Member Function Documentation

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

Definition at line 245 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().

245  {
246  unsigned int shift = 0;
247  muon.m_Sign = (value & (m_signBitsMask<<shift)) >> shift; shift += m_signBitsCnt;
248  muon.m_PtCode = (value & (m_ptBitsMask<<shift)) >> shift; shift += m_ptBitsCnt;
249  muon.m_Quality = (value & (m_qualBitsMask<<shift)) >> shift; shift += m_qualBitsCnt;
250 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:136
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:135
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:87
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:93
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:90
static const int m_signBitsCnt
Definition: RPCTBMuon.h:137
static const int RPCTBMuon::PACOut::getMuonBitsCnt ( )
inlinestatic

Definition at line 142 of file RPCTBMuon.h.

References m_ptBitsCnt, m_qualBitsCnt, and m_signBitsCnt.

142  {
144  }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:136
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:135
static const int m_signBitsCnt
Definition: RPCTBMuon.h:137
unsigned int RPCTBMuon::PACOut::toBits ( const RPCTBMuon muon)
static

Definition at line 252 of file RPCTBMuon.cc.

References RPCMuon::m_PtCode, RPCMuon::m_Quality, RPCMuon::m_Sign, edm::shift, and relativeConstraints::value.

Referenced by RPCTBMuon::toBits().

252  {
253  unsigned int value = 0;
254  unsigned int shift = 0;
255  value = (muon.m_Sign<<shift); shift += m_signBitsCnt;
256  value = value | (muon.m_PtCode<<shift); shift += m_ptBitsCnt;
257  value = value | (muon.m_Quality<<shift); shift += m_qualBitsCnt;
258 
259  return value;
260 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:136
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:135
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:87
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:93
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:90
static const int m_signBitsCnt
Definition: RPCTBMuon.h:137

Member Data Documentation

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

Definition at line 136 of file RPCTBMuon.h.

Referenced by fromBits(), and getMuonBitsCnt().

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

Definition at line 136 of file RPCTBMuon.h.

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

Definition at line 135 of file RPCTBMuon.h.

Referenced by fromBits(), and getMuonBitsCnt().

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

Definition at line 135 of file RPCTBMuon.h.

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

Definition at line 137 of file RPCTBMuon.h.

Referenced by fromBits(), and getMuonBitsCnt().

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

Definition at line 137 of file RPCTBMuon.h.