CMS 3D CMS Logo

List of all members | Static Public Member Functions | Static Private Attributes
RPCTBMuon::FSBOut 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 = 8
 
static const unsigned int m_phiBitsMask = 0xff
 
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 198 of file RPCTBMuon.h.

Member Function Documentation

◆ fromBits()

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

Definition at line 367 of file RPCTBMuon.cc.

References edm::shift.

Referenced by RPCTBMuon::fromBits().

367  {
368  unsigned int shift = 0;
369  muon.m_PhiAddress = value & m_phiBitsMask;
370  shift += m_phiBitsCnt;
371  muon.m_PtCode = (value & (m_ptBitsMask << shift)) >> shift;
372  shift += m_ptBitsCnt;
373  muon.m_Quality = (value & (m_qualBitsMask << shift)) >> shift;
374  shift += m_qualBitsCnt;
375 
376  //+1 beacouse H/F bits, unused in RPC:
377  muon.m_EtaAddress = (value & (m_etaBitsMask << shift)) >> shift;
378  shift += m_etaBitsCnt + 1;
379  muon.m_Sign = (value & (m_signBitsMask << shift)) >> shift;
380  shift += m_signBitsCnt;
381 
382  muon.m_PtCode = (~(muon.m_PtCode)) & m_ptBitsMask;
383  muon.m_Quality = (~(muon.m_Quality)) & m_qualBitsMask;
384 }
static const int m_signBitsCnt
Definition: RPCTBMuon.h:208
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:202
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:206
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:203
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:200
Definition: value.py:1
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:205
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:204
static unsigned int const shift
static const unsigned int m_phiBitsMask
Definition: RPCTBMuon.h:201

◆ toBits()

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

Definition at line 343 of file RPCTBMuon.cc.

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

Referenced by RPCTBMuon::toBits().

343  {
344  unsigned int value = 0;
345 
346  unsigned int shift = 0;
347  //bita are reversed, to be zero when cable not connected
348  unsigned int ptCode = (~(muon.m_PtCode)) & m_ptBitsMask;
349  unsigned int quality = (~(muon.m_Quality)) & m_qualBitsMask;
350 
351  value = value | muon.m_PhiAddress;
352  shift += m_phiBitsCnt;
353  value = value | (ptCode << shift);
354  shift += m_ptBitsCnt;
355  value = value | (quality << shift);
356  shift += m_qualBitsCnt;
357 
358  //+1 beacouse H/F bits, unused in RPC:
359  value = value | (muon.m_EtaAddress << shift);
360  shift += m_etaBitsCnt + 1;
361  value = value | (muon.m_Sign << shift);
362  shift += m_signBitsCnt;
363 
364  return value;
365 }
static const int m_signBitsCnt
Definition: RPCTBMuon.h:208
static const int m_ptBitsCnt
Definition: RPCTBMuon.h:202
static const int m_etaBitsCnt
Definition: RPCTBMuon.h:206
static const unsigned int m_ptBitsMask
Definition: RPCTBMuon.h:203
static const int m_phiBitsCnt
Definition: RPCTBMuon.h:200
Definition: value.py:1
static const unsigned int m_qualBitsMask
Definition: RPCTBMuon.h:205
static const int m_qualBitsCnt
Definition: RPCTBMuon.h:204
static unsigned int const shift
string quality

Member Data Documentation

◆ m_etaBitsCnt

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

Definition at line 206 of file RPCTBMuon.h.

◆ m_etaBitsMask

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

Definition at line 207 of file RPCTBMuon.h.

◆ m_phiBitsCnt

const int RPCTBMuon::FSBOut::m_phiBitsCnt = 8
staticprivate

Definition at line 200 of file RPCTBMuon.h.

◆ m_phiBitsMask

const unsigned int RPCTBMuon::FSBOut::m_phiBitsMask = 0xff
staticprivate

Definition at line 201 of file RPCTBMuon.h.

◆ m_ptBitsCnt

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

Definition at line 202 of file RPCTBMuon.h.

◆ m_ptBitsMask

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

Definition at line 203 of file RPCTBMuon.h.

◆ m_qualBitsCnt

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

Definition at line 204 of file RPCTBMuon.h.

◆ m_qualBitsMask

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

Definition at line 205 of file RPCTBMuon.h.

◆ m_signBitsCnt

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

Definition at line 208 of file RPCTBMuon.h.

◆ m_signBitsMask

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

Definition at line 209 of file RPCTBMuon.h.