65 if (
this != &addarray) {
102 m_station[
stat - 1] = 15;
112 m_station[
stat - 1] = adr;
131 int s1 = m_station[0];
132 s1 = (s1 == 15) ? 0 : ((s1 / 2) % 2) + 1;
133 int s2 = m_station[1];
134 s2 = (s2 == 15) ? 0 : ((s2 / 2) % 2) + 1;
135 int s3 = m_station[2];
136 s3 = (s3 == 15) ? 0 : ((s3 / 2) % 2) + 1;
137 int s4 = m_station[3];
138 s4 = (
s4 == 15) ? 0 : ((
s4 / 2) % 2) + 1;
144 if (s1 == 0 && s2 == 0 && s3 == 0 &&
s4 == 0)
146 if (s1 == 0 && s2 == 0 && s3 == 2 &&
s4 == 1)
148 if (s1 == 0 && s2 == 0 && s3 == 2 &&
s4 == 2)
150 if (s1 == 0 && s2 == 2 && s3 == 0 &&
s4 == 1)
152 if (s1 == 0 && s2 == 2 && s3 == 0 &&
s4 == 2)
154 if (s1 == 0 && s2 == 2 && s3 == 1 &&
s4 == 0)
156 if (s1 == 0 && s2 == 2 && s3 == 2 &&
s4 == 0)
158 if (s1 == 0 && s2 == 1 && s3 == 2 &&
s4 == 1)
160 if (s1 == 0 && s2 == 2 && s3 == 1 &&
s4 == 1)
162 if (s1 == 0 && s2 == 2 && s3 == 1 &&
s4 == 2)
164 if (s1 == 0 && s2 == 2 && s3 == 2 &&
s4 == 1)
166 if (s1 == 0 && s2 == 2 && s3 == 2 &&
s4 == 2)
168 if (s1 == 1 && s2 == 0 && s3 == 2 &&
s4 == 1)
170 if (s1 == 1 && s2 == 2 && s3 == 0 &&
s4 == 1)
172 if (s1 == 1 && s2 == 2 && s3 == 1 &&
s4 == 0)
174 if (s1 == 1 && s2 == 1 && s3 == 2 &&
s4 == 1)
176 if (s1 == 1 && s2 == 2 && s3 == 1 &&
s4 == 1)
178 if (s1 == 1 && s2 == 2 && s3 == 1 &&
s4 == 2)
180 if (s1 == 1 && s2 == 2 && s3 == 2 &&
s4 == 1)
182 if (s1 == 0 && s2 == 0 && s3 == 1 &&
s4 == 1)
184 if (s1 == 0 && s2 == 0 && s3 == 1 &&
s4 == 2)
186 if (s1 == 0 && s2 == 1 && s3 == 0 &&
s4 == 1)
188 if (s1 == 0 && s2 == 1 && s3 == 0 &&
s4 == 2)
190 if (s1 == 0 && s2 == 1 && s3 == 1 &&
s4 == 0)
192 if (s1 == 0 && s2 == 1 && s3 == 1 &&
s4 == 1)
194 if (s1 == 0 && s2 == 1 && s3 == 1 &&
s4 == 2)
196 if (s1 == 0 && s2 == 1 && s3 == 2 &&
s4 == 0)
198 if (s1 == 0 && s2 == 1 && s3 == 2 &&
s4 == 2)
200 if (s1 == 1 && s2 == 0 && s3 == 0 &&
s4 == 1)
202 if (s1 == 1 && s2 == 0 && s3 == 0 &&
s4 == 2)
204 if (s1 == 1 && s2 == 0 && s3 == 1 &&
s4 == 0)
206 if (s1 == 1 && s2 == 0 && s3 == 1 &&
s4 == 1)
208 if (s1 == 1 && s2 == 0 && s3 == 1 &&
s4 == 2)
210 if (s1 == 1 && s2 == 0 && s3 == 2 &&
s4 == 0)
212 if (s1 == 1 && s2 == 0 && s3 == 2 &&
s4 == 2)
214 if (s1 == 1 && s2 == 1 && s3 == 0 &&
s4 == 0)
216 if (s1 == 1 && s2 == 1 && s3 == 0 &&
s4 == 1)
218 if (s1 == 1 && s2 == 1 && s3 == 0 &&
s4 == 2)
220 if (s1 == 1 && s2 == 1 && s3 == 1 &&
s4 == 0)
222 if (s1 == 1 && s2 == 1 && s3 == 1 &&
s4 == 1)
224 if (s1 == 1 && s2 == 1 && s3 == 1 &&
s4 == 2)
226 if (s1 == 1 && s2 == 1 && s3 == 2 &&
s4 == 0)
228 if (s1 == 1 && s2 == 1 && s3 == 2 &&
s4 == 2)
230 if (s1 == 1 && s2 == 2 && s3 == 0 &&
s4 == 0)
232 if (s1 == 1 && s2 == 2 && s3 == 0 &&
s4 == 2)
234 if (s1 == 1 && s2 == 2 && s3 == 2 &&
s4 == 0)
236 if (s1 == 1 && s2 == 2 && s3 == 2 &&
s4 == 2)
252 newaddressarray.
setStations(adr1, adr2, adr3, adr4);
254 return newaddressarray;
261 s.setf(ios::right, ios::adjustfield);
273 unsigned short int newaddress = 15;
342 return ((adr / 2) % 2 == 0);
350 return ((adr / 2) % 2 == 1);
unsigned short station(int stat) const
get address of a given station [1-4]
static bool sameWheel(unsigned short int adr)
is it a same wheel address?
void reset()
reset address array
bool operator!=(const L1MuDTAddressArray &) const
unequal operator
int trackAddressCode() const
get track address code (for eta track finder)
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?
std::ostream & operator<<(std::ostream &out, const std::tuple< Types... > &value)
L1MuDTAddressArray converted() const
get converted Addresses
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]
void reset(double vett[256])
bool operator==(const L1MuDTAddressArray &) const
equal operator
virtual ~L1MuDTAddressArray()
destructor
L1MuDTAddressArray & operator=(const L1MuDTAddressArray &)
assignment operator