ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::TgcSlbData Class Reference

This is the SLB data class which represents an SLB block. More...

#include <TgcSlbData.h>

Collaboration diagram for Muon::TgcSlbData:

Public Types

enum  {
  BC_UNDEFINED =0 , BC_PREVIOUS , BC_CENTRAL , BC_NEXT ,
  N_BC , BITMAP_SIZE = 200
}
enum  SlbType {
  SLB_HIT =0 , SLB_LPT_D_W , SLB_LPT_D_S , SLB_LPT_T_W ,
  SLB_LPT_T_S , SLB_LPT_I_W , SLB_LPT_I_S , SLB_SL_F ,
  SLB_SL_E , SLB_NONE
}

Public Member Functions

 TgcSlbData (uint16_t bcId, uint32_t l1Id, uint16_t sswId, uint16_t slbId)
 Costructor.
virtual ~TgcSlbData (void)
 Destructor.
bool equal (uint16_t bcId, uint32_t l1Id, uint16_t sswId, uint16_t slbId) const
 Check input IDs and held IDs are equal or not.
const bool * getBitArray (const uint16_t bcTag) const
 Get bitArray for a BC tag.
void setBitmap (const uint16_t bcTag, const uint32_t cellAddr, const uint32_t cellData)
 Store bitmap.
void setBit (const uint16_t bcTag, uint32_t iBit)
 Set a bit.
int getType () const
 Get SLB type.
void setType (int vType)
 Set SLB type.
bool isCoincidence (void) const
 Check if the SLB type is coincidence.
bool isLowPt (void) const
 Check if the SLB type is LowPt.
bool isHighPt (void) const
 Check if the SLB type is HighPt.
bool isSL (void) const
 Check if the SLB type is SL.
bool isInner (void) const
 Check if the SLB type is inner LowPt.
void setBcId (uint16_t bcId)
 Set bcId.
void setL1Id (uint32_t l1Id)
 Set l1Id.
void setSswId (uint16_t sswId)
 Set sswId.
void setSlbId (uint16_t slbId)
 Set slbId.
void setSbLoc (uint16_t sbLoc)
 Set sbLoc.
void setError (uint16_t error)
 Set Error.
uint16_t getBcId () const
 Get bcId.
uint32_t getL1Id () const
 Get l1Id.
uint16_t getSswId () const
 Get sswId.
uint16_t getSlbId () const
 Get slbId.
uint16_t getSbLoc () const
 Get sbLoc.
uint16_t getError () const
 Get error.

Private Types

enum  { CELL_SIZE = 8 , PADDING_WORD = 0x1F }

Private Member Functions

 TgcSlbData (void)
 Costructor.
bool * getBitArray (const uint16_t bcTag)
 Get bitArray for a BC tag.

Private Attributes

uint16_t m_bcId
uint32_t m_l1Id
uint16_t m_sswId
uint16_t m_slbId
uint16_t m_sbLoc
uint16_t m_error
bool m_bitArray_C [BITMAP_SIZE]
 Bit array at central bunch.
bool m_bitArray_P [BITMAP_SIZE]
 Bit array at previous bunch.
bool m_bitArray_N [BITMAP_SIZE]
 Bit array at next bunch.
int m_type
 SLB type.

Detailed Description

This is the SLB data class which represents an SLB block.

Author
Hisaya Kurashige
Susumu Oda

This class was developed by Tadashi Maeno.

Definition at line 21 of file TgcSlbData.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
CELL_SIZE 
PADDING_WORD 

Definition at line 119 of file TgcSlbData.h.

119 {
120 CELL_SIZE = 8,
121 PADDING_WORD = 0x1F
122 };

◆ anonymous enum

anonymous enum
Enumerator
BC_UNDEFINED 
BC_PREVIOUS 
BC_CENTRAL 
BC_NEXT 
N_BC 
BITMAP_SIZE 

Definition at line 24 of file TgcSlbData.h.

◆ SlbType

Enumerator
SLB_HIT 
SLB_LPT_D_W 
SLB_LPT_D_S 
SLB_LPT_T_W 
SLB_LPT_T_S 
SLB_LPT_I_W 
SLB_LPT_I_S 
SLB_SL_F 
SLB_SL_E 
SLB_NONE 

Definition at line 34 of file TgcSlbData.h.

Constructor & Destructor Documentation

◆ TgcSlbData() [1/2]

Muon::TgcSlbData::TgcSlbData ( uint16_t bcId,
uint32_t l1Id,
uint16_t sswId,
uint16_t slbId )

Costructor.

Definition at line 23 of file TgcSlbData.cxx.

25 : m_bcId(bcId), m_l1Id(l1Id),
26 m_sswId(sswId), m_slbId(slbId),
27 m_sbLoc(999),
28 m_error(0),
30{
31 // init bit array
32 for(int i=0; i<BITMAP_SIZE; ++i) {
33 m_bitArray_C[i]=false;
34 m_bitArray_P[i]=false;
35 m_bitArray_N[i]=false;
36 }
37}
uint16_t bcId(uint32_t data)
int m_type
SLB type.
Definition TgcSlbData.h:146
bool m_bitArray_N[BITMAP_SIZE]
Bit array at next bunch.
Definition TgcSlbData.h:143
bool m_bitArray_C[BITMAP_SIZE]
Bit array at central bunch.
Definition TgcSlbData.h:139
bool m_bitArray_P[BITMAP_SIZE]
Bit array at previous bunch.
Definition TgcSlbData.h:141

◆ ~TgcSlbData()

Muon::TgcSlbData::~TgcSlbData ( void )
virtualdefault

Destructor.

◆ TgcSlbData() [2/2]

Muon::TgcSlbData::TgcSlbData ( void )
private

Costructor.

Definition at line 7 of file TgcSlbData.cxx.

8 : m_bcId(0), m_l1Id(0),
9 m_sswId(999), m_slbId(999),
10 m_sbLoc(999),
11 m_error(0),
13{
14 // init bit array
15 for(int i=0; i<BITMAP_SIZE; ++i) {
16 m_bitArray_C[i]=false;
17 m_bitArray_P[i]=false;
18 m_bitArray_N[i]=false;
19 }
20}

Member Function Documentation

◆ equal()

bool Muon::TgcSlbData::equal ( uint16_t bcId,
uint32_t l1Id,
uint16_t sswId,
uint16_t slbId ) const

Check input IDs and held IDs are equal or not.

Definition at line 42 of file TgcSlbData.cxx.

46{
47 return ((m_l1Id == l1Id) && (m_sswId == sswId) && (m_slbId == slbId));
48}

◆ getBcId()

uint16_t Muon::TgcSlbData::getBcId ( ) const

Get bcId.

Definition at line 194 of file TgcSlbData.cxx.

194 {
195 return m_bcId;
196}

◆ getBitArray() [1/2]

bool * Muon::TgcSlbData::getBitArray ( const uint16_t bcTag)
private

Get bitArray for a BC tag.

Definition at line 75 of file TgcSlbData.cxx.

76{
77 bool* bitArray = nullptr;
78 switch (bcTag)
79 {
80 case BC_CENTRAL:
81 bitArray = m_bitArray_C;
82 break;
83 case BC_PREVIOUS:
84 bitArray = m_bitArray_P;
85 break;
86 case BC_NEXT:
87 bitArray = m_bitArray_N;
88 break;
89 case BC_UNDEFINED:
90 bitArray = m_bitArray_C; // for backward compatibility
91 break;
92 default:
93 bitArray = nullptr;
94 break;
95 }
96 return bitArray;
97}
unsigned bcTag(unsigned bcBitMap)

◆ getBitArray() [2/2]

const bool * Muon::TgcSlbData::getBitArray ( const uint16_t bcTag) const

Get bitArray for a BC tag.

Definition at line 50 of file TgcSlbData.cxx.

51{
52 const bool* bitArray = nullptr;
53 switch (bcTag)
54 {
55 case BC_CENTRAL:
56 bitArray = m_bitArray_C;
57 break;
58 case BC_PREVIOUS:
59 bitArray = m_bitArray_P;
60 break;
61 case BC_NEXT:
62 bitArray = m_bitArray_N;
63 break;
64 case BC_UNDEFINED:
65 bitArray = m_bitArray_C; // for backward compatibility
66 break;
67 default:
68 bitArray = nullptr;
69 break;
70 }
71 return bitArray;
72}

◆ getError()

uint16_t Muon::TgcSlbData::getError ( ) const

Get error.

Definition at line 214 of file TgcSlbData.cxx.

214 {
215 return m_error;
216}

◆ getL1Id()

uint32_t Muon::TgcSlbData::getL1Id ( ) const

Get l1Id.

Definition at line 198 of file TgcSlbData.cxx.

198 {
199 return m_l1Id;
200}

◆ getSbLoc()

uint16_t Muon::TgcSlbData::getSbLoc ( ) const

Get sbLoc.

Definition at line 210 of file TgcSlbData.cxx.

210 {
211 return m_sbLoc;
212}

◆ getSlbId()

uint16_t Muon::TgcSlbData::getSlbId ( ) const

Get slbId.

Definition at line 206 of file TgcSlbData.cxx.

206 {
207 return m_slbId;
208}

◆ getSswId()

uint16_t Muon::TgcSlbData::getSswId ( ) const

Get sswId.

Definition at line 202 of file TgcSlbData.cxx.

202 {
203 return m_sswId;
204}

◆ getType()

int Muon::TgcSlbData::getType ( ) const

Get SLB type.

Definition at line 135 of file TgcSlbData.cxx.

136{
137 return m_type;
138}

◆ isCoincidence()

bool Muon::TgcSlbData::isCoincidence ( void ) const

Check if the SLB type is coincidence.

Definition at line 145 of file TgcSlbData.cxx.

146{
147 return (m_type != SLB_HIT);
148}

◆ isHighPt()

bool Muon::TgcSlbData::isHighPt ( void ) const

Check if the SLB type is HighPt.

No SLB for HighPt and SLB for SL is used.

Definition at line 155 of file TgcSlbData.cxx.

156{
157 return ((m_type == SLB_SL_E)||(m_type==SLB_SL_F));
158}

◆ isInner()

bool Muon::TgcSlbData::isInner ( void ) const

Check if the SLB type is inner LowPt.

Definition at line 165 of file TgcSlbData.cxx.

166{
167 return ((m_type == SLB_LPT_I_W)||(m_type==SLB_LPT_I_S));
168}

◆ isLowPt()

bool Muon::TgcSlbData::isLowPt ( void ) const

Check if the SLB type is LowPt.

Definition at line 150 of file TgcSlbData.cxx.

151{
152 return ((m_type >= SLB_LPT_D_W)&&(m_type<=SLB_LPT_I_S));
153}

◆ isSL()

bool Muon::TgcSlbData::isSL ( void ) const

Check if the SLB type is SL.

Definition at line 160 of file TgcSlbData.cxx.

161{
162 return ((m_type == SLB_SL_E)||(m_type==SLB_SL_F));
163}

◆ setBcId()

void Muon::TgcSlbData::setBcId ( uint16_t bcId)

Set bcId.

Definition at line 170 of file TgcSlbData.cxx.

170 {
171 m_bcId = bcId;
172}

◆ setBit()

void Muon::TgcSlbData::setBit ( const uint16_t bcTag,
uint32_t iBit )

Set a bit.

Definition at line 124 of file TgcSlbData.cxx.

127{
128 if(iBit >= BITMAP_SIZE) return;
129
130 // get bit array
131 bool *bitArray = getBitArray(bcTag);
132 *(bitArray+iBit)=true;
133}
const bool * getBitArray(const uint16_t bcTag) const
Get bitArray for a BC tag.

◆ setBitmap()

void Muon::TgcSlbData::setBitmap ( const uint16_t bcTag,
const uint32_t cellAddr,
const uint32_t cellData )

Store bitmap.

Definition at line 100 of file TgcSlbData.cxx.

102{
103 // Padding Word for 32-bit alignment
104 if(cellAddr == PADDING_WORD) return;
105
106 // get bit array
107 bool *bitArray = getBitArray(bcTag);
108
109 // assign
110 int indexMap = BITMAP_SIZE - CELL_SIZE*(cellAddr+1);
111 if(indexMap<0) return;
112
113 for(int iBit=0; iBit<CELL_SIZE; ++iBit) {
114 // index check
115 if(indexMap+iBit >= BITMAP_SIZE) break;
116
117 if(cellData & (1<<iBit)) {
118 *(bitArray+indexMap+iBit)=true;
119 }
120 }
121 }

◆ setError()

void Muon::TgcSlbData::setError ( uint16_t error)

Set Error.

Definition at line 190 of file TgcSlbData.cxx.

◆ setL1Id()

void Muon::TgcSlbData::setL1Id ( uint32_t l1Id)

Set l1Id.

Definition at line 174 of file TgcSlbData.cxx.

174 {
175 m_l1Id = l1Id;
176}

◆ setSbLoc()

void Muon::TgcSlbData::setSbLoc ( uint16_t sbLoc)

Set sbLoc.

Definition at line 186 of file TgcSlbData.cxx.

186 {
187 m_sbLoc = sbLoc;
188}

◆ setSlbId()

void Muon::TgcSlbData::setSlbId ( uint16_t slbId)

Set slbId.

Definition at line 182 of file TgcSlbData.cxx.

182 {
183 m_slbId = slbId;
184}

◆ setSswId()

void Muon::TgcSlbData::setSswId ( uint16_t sswId)

Set sswId.

Definition at line 178 of file TgcSlbData.cxx.

178 {
179 m_sswId = sswId;
180}

◆ setType()

void Muon::TgcSlbData::setType ( int vType)

Set SLB type.

Definition at line 140 of file TgcSlbData.cxx.

141{
142 m_type = vType;
143}

Member Data Documentation

◆ m_bcId

uint16_t Muon::TgcSlbData::m_bcId
private

Definition at line 131 of file TgcSlbData.h.

◆ m_bitArray_C

bool Muon::TgcSlbData::m_bitArray_C[BITMAP_SIZE]
private

Bit array at central bunch.

Definition at line 139 of file TgcSlbData.h.

◆ m_bitArray_N

bool Muon::TgcSlbData::m_bitArray_N[BITMAP_SIZE]
private

Bit array at next bunch.

Definition at line 143 of file TgcSlbData.h.

◆ m_bitArray_P

bool Muon::TgcSlbData::m_bitArray_P[BITMAP_SIZE]
private

Bit array at previous bunch.

Definition at line 141 of file TgcSlbData.h.

◆ m_error

uint16_t Muon::TgcSlbData::m_error
private

Definition at line 136 of file TgcSlbData.h.

◆ m_l1Id

uint32_t Muon::TgcSlbData::m_l1Id
private

Definition at line 132 of file TgcSlbData.h.

◆ m_sbLoc

uint16_t Muon::TgcSlbData::m_sbLoc
private

Definition at line 135 of file TgcSlbData.h.

◆ m_slbId

uint16_t Muon::TgcSlbData::m_slbId
private

Definition at line 134 of file TgcSlbData.h.

◆ m_sswId

uint16_t Muon::TgcSlbData::m_sswId
private

Definition at line 133 of file TgcSlbData.h.

◆ m_type

int Muon::TgcSlbData::m_type
private

SLB type.

Definition at line 146 of file TgcSlbData.h.


The documentation for this class was generated from the following files: