37 <<
" Unexpected FEC crate (" <<
conn.fecCrate() <<
") for this module ("
44 <<
" Unexpected FEC slot (" <<
conn.fecSlot() <<
") for this module (" <<
key_.
fecSlot()
51 <<
" Unexpected FEC ring (" <<
conn.fecRing() <<
") for this module (" <<
key_.
fecRing()
58 <<
" Unexpected CCU addr (" <<
conn.ccuAddr() <<
") for this module (" <<
key_.
ccuAddr()
65 <<
" Unexpected CCU chan (" <<
conn.ccuChan() <<
") for this module (" <<
key_.
ccuChan()
71 if (
conn.i2cAddr(0)) {
74 if (
conn.i2cAddr(1)) {
105 std::vector<uint16_t> apvs;
130 if (apv_address == 0 || apv_address == 32) {
132 }
else if (apv_address == 1 || apv_address == 33) {
134 }
else if (apv_address == 2 || apv_address == 34) {
136 }
else if (apv_address == 3 || apv_address == 35) {
138 }
else if (apv_address == 4 || apv_address == 36) {
140 }
else if (apv_address == 5 || apv_address == 37) {
144 <<
" Unexpected I2C address or number (" << apv_address <<
") for this module!";
146 static const uint16_t address = 0;
154 if (apv_address == 0) {
156 <<
" Null APV I2C address!";
158 }
else if (apv_address < 32 || apv_address > 37) {
160 <<
" Unexpected I2C address (" << apv_address <<
") for APV!";
164 bool added_apv =
false;
165 if (!
apv32_ && apv_address == 32) {
168 }
else if (!
apv33_ && apv_address == 33) {
171 }
else if (!
apv34_ && apv_address == 34) {
174 }
else if (!
apv35_ && apv_address == 35) {
177 }
else if (!
apv36_ && apv_address == 36) {
180 }
else if (!
apv37_ && apv_address == 37) {
185 std::stringstream
ss;
186 ss <<
"SiStripModule::" << __func__ <<
"]";
188 ss <<
" Added new APV for";
190 ss <<
" APV already exists for";
201 if (npairs == 2 || npairs == 3) {
203 }
else if (npairs == 0) {
216 <<
" Unexpected number of APV pairs: " << npairs;
223 if (lld_channel == 1) {
225 }
else if (lld_channel == 2) {
227 }
else if (lld_channel == 3) {
231 <<
" Unexpected LLD channel: " << lld_channel;
239 if (apv_pair_num > 2) {
241 <<
" Unexpected APV pair number: " << apv_pair_num;
246 <<
" Unexpected number of APV pairs: " <<
nApvPairs_;
251 }
else if (
nApvPairs_ == 2 && apv_pair_num == 2) {
253 <<
" APV pair number is incompatible with"
254 <<
" respect to number of !";
257 return apv_pair_num + 1;
264 if (lld_channel < 1 || lld_channel > 3) {
266 <<
" Unexpected LLD channel: " << lld_channel;
271 <<
" Unexpected number of APV pairs: " <<
nApvPairs_;
276 }
else if (
nApvPairs_ == 2 && lld_channel == 2) {
278 <<
" LLD channel is incompatible with"
279 <<
" respect to number of APV pairs!";
282 return lld_channel - 1;
293 <<
" No APV pairs exist!";
301 }
else if (apv_pair == 1) {
305 <<
" Unexpected pair number! " << apv_pair;
311 }
else if (apv_pair == 1) {
313 }
else if (apv_pair == 2) {
317 <<
" Unexpected pair number! " << apv_pair;
322 <<
" Unexpected number of APV pairs: " <<
nApvPairs();
325 FedCabling::const_iterator ipair =
cabling_.find(lld_ch);
327 return (*ipair).second;
339 if (apv_address == 32 || apv_address == 33) {
341 }
else if (apv_address == 34 || apv_address == 35) {
343 }
else if (apv_address == 36 || apv_address == 37) {
345 }
else if (apv_address == 0) {
350 <<
" Unexpected I2C address (" << apv_address <<
") for APV!";
356 FedCabling::iterator ipair =
cabling_.find(lld_ch);
360 ipair->second = fed_ch;
368 ss <<
" [SiStripModule::" << __func__ <<
"]" << std::endl
372 ss <<
" ActiveApvs : ";
377 std::vector<uint16_t>::const_iterator iapv = apvs.begin();
378 for (; iapv != apvs.end(); ++iapv) {
383 ss <<
" DcuId/DetId/nPairs : " << std::hex <<
"0x" << std::setfill(
'0') << std::setw(8)
388 ss <<
" ApvPairNum/FedCrate/FedSlot/FedId/FedCh : ";
389 FedCabling::const_iterator ichan =
channels.begin();
390 for (; ichan !=
channels.end(); ++ichan) {
391 ss << ichan->first <<
"/" << ichan->second.fedCrate_ <<
"/" << ichan->second.fedSlot_ <<
"/" << ichan->second.fedId_
392 <<
"/" << ichan->second.fedCh_ <<
", ";
403 ss <<
" [SiStripModule::" << __func__ <<
"]" << std::endl
407 ss <<
" ActiveApvs : ";
412 std::vector<uint16_t>::const_iterator iapv = apvs.begin();
413 for (; iapv != apvs.end(); ++iapv) {
418 ss <<
" DcuId/DetId/nPairs : " << std::hex <<
"0x" << std::setfill(
'0') << std::setw(8)
423 ss <<
" ApvPairNum/FedCrate/FedSlot/FedId/FedCh : ";
424 FedCabling::const_iterator ichan =
channels.begin();
425 for (; ichan !=
channels.end(); ++ichan) {
426 ss << ichan->first <<
"/" << ichan->second.fedCrate_ <<
"/" << ichan->second.fedSlot_ <<
"/" << ichan->second.fedId_
427 <<
"/" << ichan->second.fedCh_ <<
", ";
438 std::stringstream
ss;