ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1MUONIF::Lvl1MuBarrelSectorLogicData Class Reference

Class representing data from a barrel SL board. More...

#include <Lvl1MuBarrelSectorLogicData.h>

Inheritance diagram for LVL1MUONIF::Lvl1MuBarrelSectorLogicData:
Collaboration diagram for LVL1MUONIF::Lvl1MuBarrelSectorLogicData:

Public Types

typedef unsigned int SectorLogicWord

Public Member Functions

 Lvl1MuBarrelSectorLogicData ()
 ~Lvl1MuBarrelSectorLogicData ()
Lvl1MuBarrelSectorLogicDataoperator= (const Lvl1MuSectorLogicData &right)
SectorLogicWord getWordFormat () const
 Get data in 32 bit word format.
const Lvl1MuSectorLogicDataconvertFromWordFormat (const SectorLogicWord &)
 Convert SectorLogicData from 32 bit word data.
bool is2candidatesInSector () const
int bcid () const
void bcid (int value)
int roi (size_t id) const
void roi (size_t id, int value)
int ovl (size_t id) const
void ovl (size_t id, int value)
int pt (size_t id) const
void pt (size_t id, int value)
int charge (size_t id) const
void charge (size_t id, int value)
bool is2candidates (size_t id) const
void set2candidatesInSector ()
void clear2candidatesInSector ()
void set2candidates (size_t id)
void clear2candidates (size_t id)
void clear ()
int getSystemId () const

Protected Member Functions

virtual void printOut (std::ostream &out) const
 print out data

Protected Attributes

bool m_2candidatesInSector
int m_roi [2]
int m_ovl [2]
int m_pt [2]
bool m_2candidates [2]
int m_bcid
int m_charge [2]
int m_id_system

Detailed Description

Class representing data from a barrel SL board.

   This class represents the data coming from a single
   RPC SL board to the MuCTPI.
See also
LVL1MUONIF::Lvl1MuSectorLogicData
Revision
187728
Date
2009-05-27 18:18:06 +0200 (Wed, 27 May 2009)

Definition at line 27 of file Lvl1MuBarrelSectorLogicData.h.

Member Typedef Documentation

◆ SectorLogicWord

Definition at line 44 of file Lvl1MuSectorLogicData.h.

Constructor & Destructor Documentation

◆ Lvl1MuBarrelSectorLogicData()

LVL1MUONIF::Lvl1MuBarrelSectorLogicData::Lvl1MuBarrelSectorLogicData ( )

◆ ~Lvl1MuBarrelSectorLogicData()

LVL1MUONIF::Lvl1MuBarrelSectorLogicData::~Lvl1MuBarrelSectorLogicData ( )
inline

Definition at line 31 of file Lvl1MuBarrelSectorLogicData.h.

31{}

Member Function Documentation

◆ bcid() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::bcid ( ) const
inlineinherited

Definition at line 47 of file Lvl1MuSectorLogicData.h.

◆ bcid() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::bcid ( int value)
inlineinherited

Definition at line 56 of file Lvl1MuSectorLogicData.h.

56{ m_bcid = value; }

◆ charge() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::charge ( size_t id) const
inlineinherited

◆ charge() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::charge ( size_t id,
int value )
inlineinherited

Definition at line 60 of file Lvl1MuSectorLogicData.h.

60{ m_charge[ id ] = value; }

◆ clear()

void LVL1MUONIF::Lvl1MuSectorLogicData::clear ( )
inherited

Definition at line 80 of file Lvl1MuSectorLogicData.cxx.

80 {
82 m_bcid = 0;
83 for ( size_t i = 0; i < 2; ++i ) {
84 m_roi[ i ] = -1;
85 m_ovl[ i ] = -1;
86 m_pt[ i ] = -1;
87 m_charge[ i ] = -1;
88 m_2candidates[ i ] = false;
89 }
90 }

◆ clear2candidates()

void LVL1MUONIF::Lvl1MuSectorLogicData::clear2candidates ( size_t id)
inlineinherited

Definition at line 62 of file Lvl1MuSectorLogicData.h.

62{ m_2candidates[ id ] = false; }

◆ clear2candidatesInSector()

void LVL1MUONIF::Lvl1MuSectorLogicData::clear2candidatesInSector ( )
inlineinherited

Definition at line 55 of file Lvl1MuSectorLogicData.h.

55{ m_2candidatesInSector = false;}

◆ convertFromWordFormat()

const Lvl1MuSectorLogicData & LVL1MUONIF::Lvl1MuBarrelSectorLogicData::convertFromWordFormat ( const SectorLogicWord & value)
virtual

Convert SectorLogicData from 32 bit word data.

Implements LVL1MUONIF::Lvl1MuSectorLogicData.

Definition at line 98 of file Lvl1MuBarrelSectorLogicData.cxx.

98 {
99
100 unsigned int val;
101 // Bit 0
102 if ( value & 0x0001 ) {
104 } else {
106 }
107 // Bit 1-9
108 val = ( value >> 1 ) & 0x001F;
109 if ( val == 0x001F ) {
110 roi( 0, -1 );
111 ovl( 0, -1 );
112 } else {
113 roi( 0, val );
114 ovl( 0, ( value >> 8 ) & 0x0003 );
115 }
116 // Bit 10-18
117 val = ( value >> 10 ) & 0x001F;
118 if ( val == 0x001F ) {
119 roi( 1, -1 );
120 ovl( 1, -1 );
121 } else {
122 roi( 1, val );
123 ovl( 1, ( value >> 17 ) & 0x0003 );
124 }
125 // bit 19-21
126 val = ( value >> 19 ) & 0x0007;
127 if ( val == 0x0007 ) {
128 pt( 0, -1 );
129 } else {
130 pt( 0, val );
131 }
132 // bit 22-24
133 val = ( value >> 22 ) & 0x0007;
134 if ( val == 0x0007 ) {
135 pt( 1, -1 );
136 } else {
137 pt( 1, val );
138 }
139 // bit 25
140 val = ( value >> 25 ) & 0x0001;
141 if ( val ) {
142 set2candidates( 0 );
143 } else {
144 clear2candidates( 0 );
145 }
146 // bit 26
147 val = ( value >> 26 ) & 0x0001;
148 if ( val ) {
149 set2candidates( 1 );
150 } else {
151 clear2candidates( 1 );
152 }
153 // bit 27-29
154 val = ( value >> 27 ) & 0x0007;
155 bcid( val );
156 // bit 30
157 val = ( value >> 30 ) & 0x0001;
158 if ( val != 0 ) charge( 0, + 1 );
159 // bit 31
160 val = ( value >> 31 ) & 0x0001;
161 if ( val != 0 ) charge( 1, + 1 );
162
163 return *this;
164 }

◆ getSystemId()

int LVL1MUONIF::Lvl1MuSectorLogicData::getSystemId ( ) const
inlineinherited

Definition at line 73 of file Lvl1MuSectorLogicData.h.

73{ return m_id_system; }

◆ getWordFormat()

Lvl1MuSectorLogicData::SectorLogicWord LVL1MUONIF::Lvl1MuBarrelSectorLogicData::getWordFormat ( ) const
virtual

Get data in 32 bit word format.

Implements LVL1MUONIF::Lvl1MuSectorLogicData.

Definition at line 36 of file Lvl1MuBarrelSectorLogicData.cxx.

36 {
37
38 unsigned int val = 0;
39 // Bit 0
40 if ( is2candidatesInSector() ) {
41 val = 1;
42 }
43 // Bit 1-7
44 if ( roi( 0 ) < 0 ) {
45 val |= 0x00FE;
46 } else {
47 val |= ( 0x00C0 | ( roi( 0 ) & 0x01F ) << 1 );
48 }
49 // Bit 8-9
50 if ( ovl( 0 ) < 0 ) {
51 val |= 0x0300;
52 } else {
53 val |= ( ovl( 0 ) & 0x0003 ) << 8;
54 }
55 // Bit 10-16
56 if ( roi( 1 ) < 0 ) {
57 val |= 0x01FC00;
58 } else {
59 val |= ( 0x018000 | ( roi( 1 ) & 0x001F ) << 10 );
60 }
61 // Bit 17-18
62 if ( ovl( 1 ) < 0 ) {
63 val |= 0x060000;
64 } else {
65 val |= ( ovl( 1 ) & 0x0003 ) << 17;
66 }
67 // bit 19-21
68 if ( pt( 0 ) < 0 ) {
69 val |= 0x0380000;
70 } else {
71 val |= ( pt( 0 ) & 0x0007 ) << 19;
72 }
73 // bit 22-24
74 if ( pt( 1 ) < 0 ) {
75 val |= 0x01C00000;
76 } else {
77 val |= ( pt( 1 ) & 0x0007 ) << 22;
78 }
79 // bit 25
80 if ( is2candidates( 0 ) ) {
81 val |= 0x02000000;
82 }
83 // bit 26
84 if ( is2candidates( 1 ) ) {
85 val |= 0x04000000;
86 }
87 // bit 27-29
88 val |= ( bcid() & 0x07 ) << 27;
89 // bit 30
90 if ( charge( 0 ) > 0 ) val |= 0x040000000;
91 // bit 31
92 if ( charge( 1 ) > 0 ) val |= 0x080000000;
93
94 return val;
95 }

◆ is2candidates()

bool LVL1MUONIF::Lvl1MuSectorLogicData::is2candidates ( size_t id) const
inlineinherited

Definition at line 52 of file Lvl1MuSectorLogicData.h.

52{ return m_2candidates[ id ]; }

◆ is2candidatesInSector()

bool LVL1MUONIF::Lvl1MuSectorLogicData::is2candidatesInSector ( ) const
inlineinherited

Definition at line 46 of file Lvl1MuSectorLogicData.h.

46{ return m_2candidatesInSector; }

◆ operator=()

Lvl1MuBarrelSectorLogicData & LVL1MUONIF::Lvl1MuBarrelSectorLogicData::operator= ( const Lvl1MuSectorLogicData & right)

Definition at line 17 of file Lvl1MuBarrelSectorLogicData.cxx.

17 {
18
19 if ( ( right.getSystemId() == m_id_system ) &&
20 ( this != &right ) ) {
21
22 m_bcid = right.bcid();
23 m_2candidatesInSector = right.is2candidatesInSector();
24 for ( size_t i = 0; i < 2; ++i ) {
25 m_roi[ i ] = right.roi( i );
26 m_ovl[ i ] = right.ovl( i );
27 m_pt[ i ] = right.pt( i );
28 m_charge[ i ] = right.charge( i );
29 m_2candidates[ i ] = right.is2candidates( i );
30 }
31 }
32
33 return *this;
34 }

◆ ovl() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::ovl ( size_t id) const
inlineinherited

Definition at line 49 of file Lvl1MuSectorLogicData.h.

49{ return m_ovl[ id ]; }

◆ ovl() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::ovl ( size_t id,
int value )
inlineinherited

Definition at line 58 of file Lvl1MuSectorLogicData.h.

58{ m_ovl[ id ] = value; }

◆ printOut()

void LVL1MUONIF::Lvl1MuBarrelSectorLogicData::printOut ( std::ostream & out) const
protectedvirtual

print out data

Reimplemented from LVL1MUONIF::Lvl1MuSectorLogicData.

Definition at line 167 of file Lvl1MuBarrelSectorLogicData.cxx.

167 {
168
169 out << "Bit 0 " << " >2candidates in a sector ";
170 out << std::setw( 8 ) << m_2candidatesInSector << std::endl;
171
172 out << "Bit 1-5 " << " ROI<1> ";
173 if ( m_roi[ 0 ] == -1 ) {
174 out << std::setw( 8 ) << "NA" << std::endl;
175 } else {
176 out << std::setw( 8 ) << m_roi[ 0 ] << std::endl;
177 }
178 out << "Bit 6-7 " << " NA " << std::endl;
179 out << "Bit 8-9 " << " OVL<1> ";
180 if ( m_ovl[ 0 ] == 0 ) {
181 out << std::setw( 8 ) << "No Ovl" << std::endl;
182 } else if ( m_ovl[ 0 ] == 1 ) {
183 out << std::setw( 8 ) << "Phi" << std::endl;
184 } else if ( m_ovl[ 0 ] == 2 ) {
185 out << std::setw( 8 ) << "Eta" << std::endl;
186 } else if ( m_ovl[ 0 ] == 3 ) {
187 out << std::setw( 8 ) << "Phi,Eta" << std::endl;
188 } else {
189 out << std::setw( 8 ) << "NA" << std::endl;
190 }
191 out << "Bit 10-14 " << " ROI<2> ";
192 if ( m_roi[ 1 ] == -1 ) {
193 out << std::setw( 8 ) << "NA" << std::endl;
194 } else {
195 out << std::setw( 8 ) << m_roi[ 1 ] << std::endl;
196 }
197 out << "Bit 15-16 " << " NA " << std::endl;
198 out << "Bit 17-18 " << " OVL<2> ";
199 if ( m_ovl[ 1 ] == 0 ) {
200 out << std::setw( 8 ) << "No Ovl" << std::endl;
201 } else if ( m_ovl[ 1 ] == 1 ) {
202 out << std::setw( 8 ) << "Phi" << std::endl;
203 } else if ( m_ovl[ 1 ] == 2 ) {
204 out << std::setw( 8 ) << "Eta" << std::endl;
205 } else if ( m_ovl[ 1 ] == 3 ) {
206 out << std::setw( 8 ) << "Phi,Eta" << std::endl;
207 } else {
208 out << std::setw( 8 ) << "NA" << std::endl;
209 }
210 out << "Bit 19-21 " << " Pt1 ";
211 if ( m_pt[ 0 ] == -1 ) {
212 out << std::setw( 8 ) << "No Hit" << std::endl;
213 } else {
214 out << std::setw( 8 ) << m_pt[ 0 ] << std::endl;
215 }
216 out << "Bit 22-24 " << " Pt2 ";
217 if ( m_pt[ 1 ] == -1 ) {
218 out << std::setw( 8 ) << "No Hit" << std::endl;
219 } else {
220 out << std::setw( 8 ) << m_pt[ 1 ] << std::endl;
221 }
222 out << "Bit 25 " << " >2candidates in ROI1 ";
223 out << std::setw( 8 ) << m_2candidates[ 0 ] << std::endl;
224 out << "Bit 26 " << " >2candidates in ROI2 ";
225 out << std::setw( 8 ) << m_2candidates[ 1 ] << std::endl;
226 out << "Bit 27-29 " << " BCID ";
227 out << std::setw( 8 ) << m_bcid << std::endl;
228 out << "Bit 30 " << " charge in ROI1 ";
229 out << std::setw( 8 ) << m_charge[ 0 ] << std::endl;
230 out << "Bit 31 " << " charge in ROI2 ";
231 out << std::setw( 8 ) << m_charge[ 1 ] << std::endl;
232
233 return;
234 }

◆ pt() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::pt ( size_t id) const
inlineinherited

Definition at line 50 of file Lvl1MuSectorLogicData.h.

50{ return m_pt[ id ]; }

◆ pt() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::pt ( size_t id,
int value )
inlineinherited

Definition at line 59 of file Lvl1MuSectorLogicData.h.

59{ m_pt[ id ] = value; }

◆ roi() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::roi ( size_t id) const
inlineinherited

Definition at line 48 of file Lvl1MuSectorLogicData.h.

48{ return m_roi[ id ]; }

◆ roi() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::roi ( size_t id,
int value )
inlineinherited

Definition at line 57 of file Lvl1MuSectorLogicData.h.

57{ m_roi[ id ] = value; }

◆ set2candidates()

void LVL1MUONIF::Lvl1MuSectorLogicData::set2candidates ( size_t id)
inlineinherited

Definition at line 61 of file Lvl1MuSectorLogicData.h.

61{ m_2candidates[ id ] = true; }

◆ set2candidatesInSector()

void LVL1MUONIF::Lvl1MuSectorLogicData::set2candidatesInSector ( )
inlineinherited

Definition at line 54 of file Lvl1MuSectorLogicData.h.

54{ m_2candidatesInSector = true; }

Member Data Documentation

◆ m_2candidates

bool LVL1MUONIF::Lvl1MuSectorLogicData::m_2candidates[2]
protectedinherited

Definition at line 83 of file Lvl1MuSectorLogicData.h.

◆ m_2candidatesInSector

bool LVL1MUONIF::Lvl1MuSectorLogicData::m_2candidatesInSector
protectedinherited

Definition at line 79 of file Lvl1MuSectorLogicData.h.

◆ m_bcid

int LVL1MUONIF::Lvl1MuSectorLogicData::m_bcid
protectedinherited

Definition at line 84 of file Lvl1MuSectorLogicData.h.

◆ m_charge

int LVL1MUONIF::Lvl1MuSectorLogicData::m_charge[2]
protectedinherited

Definition at line 85 of file Lvl1MuSectorLogicData.h.

◆ m_id_system

int LVL1MUONIF::Lvl1MuSectorLogicData::m_id_system
protectedinherited

Definition at line 86 of file Lvl1MuSectorLogicData.h.

◆ m_ovl

int LVL1MUONIF::Lvl1MuSectorLogicData::m_ovl[2]
protectedinherited

Definition at line 81 of file Lvl1MuSectorLogicData.h.

◆ m_pt

int LVL1MUONIF::Lvl1MuSectorLogicData::m_pt[2]
protectedinherited

Definition at line 82 of file Lvl1MuSectorLogicData.h.

◆ m_roi

int LVL1MUONIF::Lvl1MuSectorLogicData::m_roi[2]
protectedinherited

Definition at line 80 of file Lvl1MuSectorLogicData.h.


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