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

Class representing data from an endcap SL board. More...

#include <Lvl1MuEndcapSectorLogicData.h>

Inheritance diagram for LVL1MUONIF::Lvl1MuEndcapSectorLogicData:
Collaboration diagram for LVL1MUONIF::Lvl1MuEndcapSectorLogicData:

Public Types

typedef unsigned int SectorLogicWord

Public Member Functions

 Lvl1MuEndcapSectorLogicData ()
 ~Lvl1MuEndcapSectorLogicData ()
Lvl1MuEndcapSectorLogicDataoperator= (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 an endcap SL board.

   This class representds the data coming from a single
   TGC endcap 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 Lvl1MuEndcapSectorLogicData.h.

Member Typedef Documentation

◆ SectorLogicWord

Definition at line 44 of file Lvl1MuSectorLogicData.h.

Constructor & Destructor Documentation

◆ Lvl1MuEndcapSectorLogicData()

LVL1MUONIF::Lvl1MuEndcapSectorLogicData::Lvl1MuEndcapSectorLogicData ( )

◆ ~Lvl1MuEndcapSectorLogicData()

LVL1MUONIF::Lvl1MuEndcapSectorLogicData::~Lvl1MuEndcapSectorLogicData ( )
inline

Definition at line 31 of file Lvl1MuEndcapSectorLogicData.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::Lvl1MuEndcapSectorLogicData::convertFromWordFormat ( const SectorLogicWord & value)
virtual

Convert SectorLogicData from 32 bit word data.

Implements LVL1MUONIF::Lvl1MuSectorLogicData.

Definition at line 91 of file Lvl1MuEndcapSectorLogicData.cxx.

91 {
92
93 unsigned int val;
94 // Bit 0
95 if ( value & 0x0001 ) {
97 } else {
99 }
100 // Bit 1-9
101 val = ( value >> 1 ) & 0x00FF;
102 if ( val == 0x00FF ) {
103 roi( 0, -1 );
104 ovl( 0, -1 );
105 } else {
106 roi( 0, val );
107 ovl( 0, ( value >> 9 ) & 0x0001 );
108 }
109 // Bit 10-18
110 val = ( value >> 10 ) & 0x00FF;
111 if ( val == 0x00FF ) {
112 roi( 1, -1 );
113 ovl( 1, -1 );
114 } else {
115 roi( 1, val );
116 ovl( 1, ( value >> 18 ) & 0x0001 );
117 }
118 // bit 19-21
119 val = ( value >> 19 ) & 0x0007;
120 if ( val == 0x0007 ) {
121 pt( 0, -1 );
122 } else {
123 pt( 0, val );
124 }
125 // bit 22-24
126 val = ( value >> 22 ) & 0x0007;
127 if ( val == 0x0007 ) {
128 pt( 1, -1 );
129 } else {
130 pt( 1, val );
131 }
132 // bit 25
133 clear2candidates( 0 );
134 // bit 26
135 clear2candidates( 1 );
136 // bit 27-29
137 val = ( value >> 27 ) & 0x0007;
138 bcid( val );
139 // bit 30
140 val = ( value >> 30 ) & 0x0001;
141 if ( val != 0 ) charge( 0, + 1 );
142 // bit 31
143 val = ( value >> 31 ) & 0x0001;
144 if ( val != 0 ) charge( 1, + 1 );
145
146 return *this;
147 }

◆ getSystemId()

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

Definition at line 73 of file Lvl1MuSectorLogicData.h.

73{ return m_id_system; }

◆ getWordFormat()

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

Get data in 32 bit word format.

Implements LVL1MUONIF::Lvl1MuSectorLogicData.

Definition at line 33 of file Lvl1MuEndcapSectorLogicData.cxx.

33 {
34
35 unsigned int val = 0;
36 // Bit 0
37 if ( is2candidatesInSector() ) {
38 val = 1;
39 }
40 // Bit 1-8
41 if ( roi( 0 ) < 0 ) {
42 val |= 0x01FE;
43 } else {
44 val |= ( roi( 0 ) & 0x0FF ) << 1;
45 }
46 // Bit 9
47 if ( ovl( 0 ) < 0 ) {
48 val |= 0x0200;
49 } else {
50 val |= ( ovl( 0 ) & 0x0001 ) << 9;
51 }
52 // Bit 10-17
53 if ( roi( 1 ) < 0 ) {
54 val |= 0x03FC00;
55 } else {
56 val |= ( roi( 1 ) & 0x00FF ) << 10;
57 }
58 // Bit 18
59 if ( ovl( 1 ) < 0 ) {
60 val |= 0x040000;
61 } else {
62 val |= ( ovl( 1 ) & 0x0001 ) << 18;
63 }
64 // bit 19-21
65 if ( pt( 0 ) < 0 ) {
66 val |= 0x0380000;
67 } else {
68 val |= ( pt( 0 ) & 0x0007 ) << 19;
69 }
70 // bit 22-24
71 if ( pt( 1 ) < 0 ) {
72 val |= 0x01C00000;
73 } else {
74 val |= ( pt( 1 ) & 0x0007 ) << 22;
75 }
76 // bit 25
77 val |= 0x02000000;
78 // bit 26
79 val |= 0x04000000;
80 // bit 27-29
81 val |= ( bcid() & 0x07 ) << 27;
82 // bit 30
83 if ( charge( 0 ) > 0 ) val |= 0x040000000;
84 // bit 31
85 if ( charge( 1 ) > 0 ) val |= 0x080000000;
86
87 return val;
88 }

◆ 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=()

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

Definition at line 17 of file Lvl1MuEndcapSectorLogicData.cxx.

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

◆ 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::Lvl1MuEndcapSectorLogicData::printOut ( std::ostream & out) const
protectedvirtual

print out data

Reimplemented from LVL1MUONIF::Lvl1MuSectorLogicData.

Definition at line 150 of file Lvl1MuEndcapSectorLogicData.cxx.

150 {
151
152 out << "Bit 0 " << " >2candidates in a sector ";
153 out << std::setw( 8 ) << m_2candidatesInSector << std::endl;
154
155 out << "Bit 1-8 " << " ROI<1> ";
156 if ( m_roi[ 0 ] == -1 ) {
157 out << std::setw( 8 ) << "NA" << std::endl;
158 } else {
159 out << std::setw( 8 ) << m_roi[ 0 ] << std::endl;
160 }
161 out << "Bit 9 " << " OVL<1> ";
162 if ( m_ovl[ 0 ] < 0 ) {
163 out << std::setw( 8 ) << "NA" << std::endl;
164 } else {
165 out << std::setw( 8 ) << m_ovl[ 0 ] << std::endl;
166 }
167 out << "Bit 10-17 " << " ROI<2> ";
168 if ( m_roi[ 1 ] == -1 ) {
169 out << std::setw( 8 ) << "NA" << std::endl;
170 } else {
171 out << std::setw( 8 ) << m_roi[ 1 ] << std::endl;
172 }
173 out << "Bit 18 " << " OVL<2> ";
174 if ( m_ovl[ 1 ] < 0 ) {
175 out << std::setw( 8 ) << "NA" << std::endl;
176 } else {
177 out << std::setw( 8 ) << m_ovl[ 1 ] << std::endl;
178 }
179 out << "Bit 19-21 " << " Pt1 ";
180 if ( m_pt[ 0 ] == -1 ) {
181 out << std::setw( 8 ) << "No Hit" << std::endl;
182 } else {
183 out << std::setw( 8 ) << m_pt[ 0 ] << std::endl;
184 }
185 out << "Bit 22-24 " << " Pt2 ";
186 if ( m_pt[ 1 ] == -1 ) {
187 out << std::setw( 8 ) << "No Hit" << std::endl;
188 } else {
189 out << std::setw( 8 ) << m_pt[ 1 ] << std::endl;
190 }
191 out << "Bit 25-26 " << " NA " << std::endl;
192 out << "Bit 27-29 " << " BCID ";
193 out << std::setw( 8 ) << m_bcid << std::endl;
194 out << "Bit 30 " << " charge in ROI1 ";
195 out << std::setw( 8 ) << m_charge[ 0 ] << std::endl;
196 out << "Bit 31 " << " charge in ROI2 ";
197 out << std::setw( 8 ) << m_charge[ 1 ] << std::endl;
198 }

◆ 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: