52 for (
int stat = 1; stat <= 4; stat++ ) {
53 m_station[stat-1] = addarray.
m_station[stat-1];
75 if (
this != &addarray ) {
76 for (
int stat = 1; stat <= 4; stat++ ) {
77 m_station[stat-1] = addarray.
m_station[stat-1];
90 for (
int stat = 1; stat <= 4; stat++ ) {
91 if ( m_station[stat-1] != addarray.
m_station[stat-1] )
return false;
104 for (
int stat = 1; stat <= 4; stat++ ) {
105 if ( m_station[stat-1] != addarray.
m_station[stat-1] )
return true;
118 for (
int stat = 1; stat <= 4; stat++ ) {
119 m_station[stat-1] = 15;
132 m_station[stat-1] = adr;
157 int s1 = m_station[0];
158 s1 = ( s1 == 15 ) ? 0 : ((s1/2)%2)+1;
159 int s2 = m_station[1];
160 s2 = ( s2 == 15 ) ? 0 : ((s2/2)%2)+1;
161 int s3 = m_station[2];
162 s3 = ( s3 == 15 ) ? 0 : ((s3/2)%2)+1;
163 int s4 = m_station[3];
164 s4 = ( s4 == 15 ) ? 0 : ((s4/2)%2)+1;
170 if ( s1 == 0 && s2 == 0 && s3 == 0 && s4 == 0 ) code = 0;
171 if ( s1 == 0 && s2 == 0 && s3 == 2 && s4 == 1 ) code = 0;
172 if ( s1 == 0 && s2 == 0 && s3 == 2 && s4 == 2 ) code = 0;
173 if ( s1 == 0 && s2 == 2 && s3 == 0 && s4 == 1 ) code = 0;
174 if ( s1 == 0 && s2 == 2 && s3 == 0 && s4 == 2 ) code = 0;
175 if ( s1 == 0 && s2 == 2 && s3 == 1 && s4 == 0 ) code = 0;
176 if ( s1 == 0 && s2 == 2 && s3 == 2 && s4 == 0 ) code = 0;
177 if ( s1 == 0 && s2 == 1 && s3 == 2 && s4 == 1 ) code = 0;
178 if ( s1 == 0 && s2 == 2 && s3 == 1 && s4 == 1 ) code = 0;
179 if ( s1 == 0 && s2 == 2 && s3 == 1 && s4 == 2 ) code = 0;
180 if ( s1 == 0 && s2 == 2 && s3 == 2 && s4 == 1 ) code = 0;
181 if ( s1 == 0 && s2 == 2 && s3 == 2 && s4 == 2 ) code = 0;
182 if ( s1 == 1 && s2 == 0 && s3 == 2 && s4 == 1 ) code = 0;
183 if ( s1 == 1 && s2 == 2 && s3 == 0 && s4 == 1 ) code = 0;
184 if ( s1 == 1 && s2 == 2 && s3 == 1 && s4 == 0 ) code = 0;
185 if ( s1 == 1 && s2 == 1 && s3 == 2 && s4 == 1 ) code = 0;
186 if ( s1 == 1 && s2 == 2 && s3 == 1 && s4 == 1 ) code = 0;
187 if ( s1 == 1 && s2 == 2 && s3 == 1 && s4 == 2 ) code = 0;
188 if ( s1 == 1 && s2 == 2 && s3 == 2 && s4 == 1 ) code = 0;
189 if ( s1 == 0 && s2 == 0 && s3 == 1 && s4 == 1 ) code = 1;
190 if ( s1 == 0 && s2 == 0 && s3 == 1 && s4 == 2 ) code = 2;
191 if ( s1 == 0 && s2 == 1 && s3 == 0 && s4 == 1 ) code = 3;
192 if ( s1 == 0 && s2 == 1 && s3 == 0 && s4 == 2 ) code = 4;
193 if ( s1 == 0 && s2 == 1 && s3 == 1 && s4 == 0 ) code = 5;
194 if ( s1 == 0 && s2 == 1 && s3 == 1 && s4 == 1 ) code = 6;
195 if ( s1 == 0 && s2 == 1 && s3 == 1 && s4 == 2 ) code = 7;
196 if ( s1 == 0 && s2 == 1 && s3 == 2 && s4 == 0 ) code = 8;
197 if ( s1 == 0 && s2 == 1 && s3 == 2 && s4 == 2 ) code = 8;
198 if ( s1 == 1 && s2 == 0 && s3 == 0 && s4 == 1 ) code = 9;
199 if ( s1 == 1 && s2 == 0 && s3 == 0 && s4 == 2 ) code = 10;
200 if ( s1 == 1 && s2 == 0 && s3 == 1 && s4 == 0 ) code = 11;
201 if ( s1 == 1 && s2 == 0 && s3 == 1 && s4 == 1 ) code = 12;
202 if ( s1 == 1 && s2 == 0 && s3 == 1 && s4 == 2 ) code = 13;
203 if ( s1 == 1 && s2 == 0 && s3 == 2 && s4 == 0 ) code = 14;
204 if ( s1 == 1 && s2 == 0 && s3 == 2 && s4 == 2 ) code = 14;
205 if ( s1 == 1 && s2 == 1 && s3 == 0 && s4 == 0 ) code = 15;
206 if ( s1 == 1 && s2 == 1 && s3 == 0 && s4 == 1 ) code = 16;
207 if ( s1 == 1 && s2 == 1 && s3 == 0 && s4 == 2 ) code = 17;
208 if ( s1 == 1 && s2 == 1 && s3 == 1 && s4 == 0 ) code = 18;
209 if ( s1 == 1 && s2 == 1 && s3 == 1 && s4 == 1 ) code = 19;
210 if ( s1 == 1 && s2 == 1 && s3 == 1 && s4 == 2 ) code = 20;
211 if ( s1 == 1 && s2 == 1 && s3 == 2 && s4 == 0 ) code = 21;
212 if ( s1 == 1 && s2 == 1 && s3 == 2 && s4 == 2 ) code = 21;
213 if ( s1 == 1 && s2 == 2 && s3 == 0 && s4 == 0 ) code = 22;
214 if ( s1 == 1 && s2 == 2 && s3 == 0 && s4 == 2 ) code = 22;
215 if ( s1 == 1 && s2 == 2 && s3 == 2 && s4 == 0 ) code = 22;
216 if ( s1 == 1 && s2 == 2 && s3 == 2 && s4 == 2 ) code = 22;
236 return newaddressarray;
246 s.setf(ios::right,ios::adjustfield);
247 for (
int stat = 1; stat <= 4; stat++ ) {
248 s <<
"stat " << stat <<
": " << setw(2) << adrarr.
station(stat) <<
" ";
261 unsigned short int newaddress = 15;
264 case 0 : { newaddress = 8;
break; }
265 case 1 : { newaddress = 9;
break; }
266 case 2 : { newaddress = 0;
break; }
267 case 3 : { newaddress = 1;
break; }
268 case 4 : { newaddress = 10;
break; }
269 case 5 : { newaddress = 11;
break; }
270 case 6 : { newaddress = 2;
break; }
271 case 7 : { newaddress = 3;
break; }
272 case 8 : { newaddress = 12;
break; }
273 case 9 : { newaddress = 13;
break; }
274 case 10 : { newaddress = 4;
break; }
275 case 11 : { newaddress = 5;
break; }
276 case 15 : { newaddress = 15;
break; }
277 default: { newaddress = 15;
break; }
292 return ( (adr/2)%2 == 0 );
303 return ( (adr/2)%2 == 1 );
static bool sameWheel(unsigned short int adr)
is it a same wheel address?
int trackAddressCode() const
get track address code (for eta track finder)
void reset()
reset address array
ostream & operator<<(std::ostream &o, vector< std::string > const &iValue)
L1MuDTAddressArray converted() const
get converted Addresses
static unsigned short int convert(unsigned short int adr)
convert address to corresponding VHDL addresse
unsigned short int m_station[4]
static bool nextWheel(unsigned short int adr)
is it a next wheel address?
bool operator==(const L1MuDTAddressArray &) const
equal operator
L1MuDTAddressArray()
default constructor
void setStations(int adr1, int adr2, int adr3, int adr4)
set addresses of all four stations
void setStation(int stat, int adr)
set address of a given station [1-4]
bool operator!=(const L1MuDTAddressArray &) const
unequal operator
void reset(double vett[256])
unsigned short station(int stat) const
get address of a given station [1-4]
virtual ~L1MuDTAddressArray()
destructor
L1MuDTAddressArray & operator=(const L1MuDTAddressArray &)
assignment operator