CMS 3D CMS Logo

RPCTBMuon::FSBOut Class Reference

#include <L1Trigger/RPCTrigger/interface/RPCTBMuon.h>

List of all members.

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 191 of file RPCTBMuon.h.


Member Function Documentation

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

Definition at line 344 of file RPCTBMuon.cc.

References RPCTBMuon::m_EtaAddress, m_etaBitsCnt, RPCTBMuon::m_PhiAddress, m_phiBitsCnt, m_phiBitsMask, m_ptBitsCnt, m_ptBitsMask, RPCMuon::m_PtCode, m_qualBitsCnt, m_qualBitsMask, RPCMuon::m_Quality, RPCMuon::m_Sign, and m_signBitsCnt.

Referenced by RPCTBMuon::fromBits().

00344                                                                   {
00345   unsigned int shift = 0;
00346   muon.m_PhiAddress =  value &  m_phiBitsMask;                     shift += m_phiBitsCnt;
00347   muon.m_PtCode     = (value & (m_ptBitsMask<<shift))   >> shift;  shift += m_ptBitsCnt;
00348   muon.m_Quality    = (value & (m_qualBitsMask<<shift)) >> shift;  shift += m_qualBitsCnt;
00349   
00350   //+1 beacouse H/F bits, unused in RPC:
00351   muon.m_EtaAddress = (value & (m_etaBitsMask<<shift))  >> shift;  shift += m_etaBitsCnt + 1; 
00352   muon.m_Sign       = (value & (m_signBitsMask<<shift)) >> shift;  shift += m_signBitsCnt; 
00353   
00354   muon.m_PtCode = (~(muon.m_PtCode)) & m_ptBitsMask;
00355   muon.m_Quality = (~(muon.m_Quality)) & m_qualBitsMask;
00356 }

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

Definition at line 325 of file RPCTBMuon.cc.

References RPCTBMuon::m_EtaAddress, m_etaBitsCnt, RPCTBMuon::m_PhiAddress, m_phiBitsCnt, m_ptBitsCnt, m_ptBitsMask, RPCMuon::m_PtCode, m_qualBitsCnt, m_qualBitsMask, RPCMuon::m_Quality, RPCMuon::m_Sign, m_signBitsCnt, and value.

Referenced by RPCTBMuon::toBits().

00325                                                           {
00326   unsigned int value = 0;
00327         
00328   unsigned int shift = 0;
00329   //bita are reversed, to be zero when cable not connected
00330   unsigned int ptCode =  (~(muon.m_PtCode)) & m_ptBitsMask; 
00331   unsigned int quality = (~(muon.m_Quality)) & m_qualBitsMask;
00332 
00333   value = value |  muon.m_PhiAddress;         shift += m_phiBitsCnt;    
00334   value = value | (ptCode<<shift);            shift += m_ptBitsCnt;
00335   value = value | (quality<<shift);           shift += m_qualBitsCnt;
00336   
00337   //+1 beacouse H/F bits, unused in RPC:
00338   value = value | (muon.m_EtaAddress<<shift); shift += m_etaBitsCnt + 1; 
00339   value = value | (muon.m_Sign<<shift);       shift += m_signBitsCnt;
00340   
00341   return value;
00342 }


Member Data Documentation

const int RPCTBMuon::FSBOut::m_etaBitsCnt = 6 [static, private]

Definition at line 196 of file RPCTBMuon.h.

Referenced by fromBits(), and toBits().

const unsigned int RPCTBMuon::FSBOut::m_etaBitsMask = 0x3f [static, private]

Definition at line 196 of file RPCTBMuon.h.

const int RPCTBMuon::FSBOut::m_phiBitsCnt = 8 [static, private]

Definition at line 193 of file RPCTBMuon.h.

Referenced by fromBits(), and toBits().

const unsigned int RPCTBMuon::FSBOut::m_phiBitsMask = 0xff [static, private]

Definition at line 193 of file RPCTBMuon.h.

Referenced by fromBits().

const int RPCTBMuon::FSBOut::m_ptBitsCnt = 5 [static, private]

Definition at line 194 of file RPCTBMuon.h.

Referenced by fromBits(), and toBits().

const unsigned int RPCTBMuon::FSBOut::m_ptBitsMask = 0x1f [static, private]

Definition at line 194 of file RPCTBMuon.h.

Referenced by fromBits(), and toBits().

const int RPCTBMuon::FSBOut::m_qualBitsCnt = 3 [static, private]

Definition at line 195 of file RPCTBMuon.h.

Referenced by fromBits(), and toBits().

const unsigned int RPCTBMuon::FSBOut::m_qualBitsMask = 0x7 [static, private]

Definition at line 195 of file RPCTBMuon.h.

Referenced by fromBits(), and toBits().

const int RPCTBMuon::FSBOut::m_signBitsCnt = 1 [static, private]

Definition at line 197 of file RPCTBMuon.h.

Referenced by fromBits(), and toBits().

const unsigned int RPCTBMuon::FSBOut::m_signBitsMask = 0x1 [static, private]

Definition at line 197 of file RPCTBMuon.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:12 2009 for CMSSW by  doxygen 1.5.4