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::HSBOut Class Reference

#include <RPCTBMuon.h>

Static Public Member Functions

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

Static Private Attributes

static const int m_etaBitsCnt = 6
 
static const unsigned int m_etaBitsMask = 0x3f
 
static const int m_phiBitsCnt = 7
 
static const unsigned int m_phiBitsMask = 0x7f
 
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 179 of file RPCTBMuon.h.

Member Function Documentation

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

Definition at line 329 of file RPCTBMuon.cc.

References RPCTBMuon::m_EtaAddress, RPCTBMuon::m_PhiAddress, RPCMuon::m_PtCode, RPCMuon::m_Quality, RPCMuon::m_Sign, and edm::shift.

Referenced by RPCTBMuon::fromBits().

329  {
330  unsigned int shift = 0;
331  muon.m_Sign = (value & (m_signBitsMask << shift)) >> shift;
332  shift += m_signBitsCnt;
333  muon.m_PtCode = (value & (m_ptBitsMask << shift)) >> shift;
334  shift += m_ptBitsCnt;
335  muon.m_Quality = (value & (m_qualBitsMask << shift)) >> shift;
336  shift += m_qualBitsCnt;
337  muon.m_PhiAddress = (value & (m_phiBitsMask << shift)) >> shift;
338  shift += m_phiBitsCnt;
339  muon.m_EtaAddress = (value & (m_etaBitsMask << shift)) >> shift;
340  shift += m_etaBitsCnt;
341 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:183
unsigned int m_PhiAddress
Definition: RPCTBMuon.h:106
static const int m_signBitsCnt
Definition: RPCTBMuon.h:181
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 const int m_etaBitsCnt
Definition: RPCTBMuon.h:189
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:185
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:187
unsigned int m_EtaAddress
Definition: RPCTBMuon.h:104
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:93
unsigned int RPCTBMuon::HSBOut::toBits ( const RPCTBMuon muon)
static

Definition at line 310 of file RPCTBMuon.cc.

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

Referenced by RPCTBMuon::toBits().

310  {
311  unsigned int value = 0;
312 
313  unsigned int shift = 0;
314  value = value | (muon.m_Sign << shift);
315  shift += m_signBitsCnt;
316  // value = (muon.m_Sign<<shift); shift += m_signBitsCnt;
317  value = value | (muon.m_PtCode << shift);
318  shift += m_ptBitsCnt;
319  value = value | (muon.m_Quality << shift);
320  shift += m_qualBitsCnt;
321  value = value | (muon.m_PhiAddress << shift);
322  shift += m_phiBitsCnt;
323  value = value | (muon.m_EtaAddress << shift);
324  shift += m_etaBitsCnt;
325 
326  return value;
327 }
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:183
unsigned int m_PhiAddress
Definition: RPCTBMuon.h:106
static const int m_signBitsCnt
Definition: RPCTBMuon.h:181
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 const int m_etaBitsCnt
Definition: RPCTBMuon.h:189
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:185
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:187
unsigned int m_EtaAddress
Definition: RPCTBMuon.h:104
static unsigned int const shift
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:93

Member Data Documentation

const int RPCTBMuon::HSBOut::m_etaBitsCnt = 6
staticprivate

Definition at line 189 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::HSBOut::m_etaBitsMask = 0x3f
staticprivate

Definition at line 190 of file RPCTBMuon.h.

const int RPCTBMuon::HSBOut::m_phiBitsCnt = 7
staticprivate

Definition at line 187 of file RPCTBMuon.h.

const unsigned int RPCTBMuon::HSBOut::m_phiBitsMask = 0x7f
staticprivate

Definition at line 188 of file RPCTBMuon.h.

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

Definition at line 183 of file RPCTBMuon.h.

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

Definition at line 184 of file RPCTBMuon.h.

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

Definition at line 185 of file RPCTBMuon.h.

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

Definition at line 186 of file RPCTBMuon.h.

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

Definition at line 181 of file RPCTBMuon.h.

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

Definition at line 182 of file RPCTBMuon.h.