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

References edm::shift.

Referenced by RPCTBMuon::fromBits().

368  {
369  unsigned int shift = 0;
370  muon.m_PhiAddress = value & m_phiBitsMask;
371  shift += m_phiBitsCnt;
372  muon.m_PtCode = (value & (m_ptBitsMask << shift)) >> shift;
373  shift += m_ptBitsCnt;
374  muon.m_Quality = (value & (m_qualBitsMask << shift)) >> shift;
375  shift += m_qualBitsCnt;
376 
377  //+1 beacouse H/F bits, unused in RPC:
378  muon.m_EtaAddress = (value & (m_etaBitsMask << shift)) >> shift;
379  shift += m_etaBitsCnt + 1;
380  muon.m_Sign = (value & (m_signBitsMask << shift)) >> shift;
381  shift += m_signBitsCnt;
382 
383  muon.m_PtCode = (~(muon.m_PtCode)) & m_ptBitsMask;
384  muon.m_Quality = (~(muon.m_Quality)) & m_qualBitsMask;
385 }
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 344 of file RPCTBMuon.cc.

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

Referenced by RPCTBMuon::toBits().

344  {
345  unsigned int value = 0;
346 
347  unsigned int shift = 0;
348  //bita are reversed, to be zero when cable not connected
349  unsigned int ptCode = (~(muon.m_PtCode)) & m_ptBitsMask;
350  unsigned int quality = (~(muon.m_Quality)) & m_qualBitsMask;
351 
352  value = value | muon.m_PhiAddress;
353  shift += m_phiBitsCnt;
354  value = value | (ptCode << shift);
355  shift += m_ptBitsCnt;
356  value = value | (quality << shift);
357  shift += m_qualBitsCnt;
358 
359  //+1 beacouse H/F bits, unused in RPC:
360  value = value | (muon.m_EtaAddress << shift);
361  shift += m_etaBitsCnt + 1;
362  value = value | (muon.m_Sign << shift);
363  shift += m_signBitsCnt;
364 
365  return value;
366 }
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
string quality
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

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.