21 findingRecord<SiStripFedCablingRcd>();
23 edm::LogVerbatim(
"FedCabling") <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]"
24 <<
" Constructing object...";
30 edm::LogVerbatim(
"FedCabling") <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]"
31 <<
" Destructing object...";
37 edm::LogVerbatim(
"FedCabling") <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]"
38 <<
" Building \"fake\" FED cabling map"
39 <<
" from real DetIds and FedIds (read from ascii file)";
45 typedef std::vector<uint32_t> Dets;
49 typedef std::vector<uint16_t> Feds;
56 Dets::const_iterator idet = dets.begin();
57 Dets::const_iterator jdet = dets.end();
58 for (; idet != jdet; ++idet) {
60 for (uint16_t ipair = 0; ipair < npairs; ++ipair) {
62 if (npairs == 2 && ipair == 0) {
64 }
else if (npairs == 2 && ipair == 1) {
66 }
else if (npairs == 3 && ipair == 0) {
68 }
else if (npairs == 3 && ipair == 1) {
70 }
else if (npairs == 3 && ipair == 2) {
73 edm::LogWarning(
"FedCabling") <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]"
74 <<
" Inconsistent values for nPairs (" << npairs <<
") and ipair (" << ipair
95 bool insufficient =
false;
96 Feds::const_iterator ifed =
feds.begin();
98 for (std::vector<SiStripFecCrate>::const_iterator icrate = fec_cabling->
crates().begin();
99 icrate != fec_cabling->
crates().end();
101 for (std::vector<SiStripFec>::const_iterator ifec = icrate->fecs().begin(); ifec != icrate->fecs().end(); ifec++) {
102 for (std::vector<SiStripRing>::const_iterator iring = ifec->rings().begin(); iring != ifec->rings().end();
104 for (std::vector<SiStripCcu>::const_iterator iccu = iring->ccus().begin(); iccu != iring->ccus().end();
106 for (std::vector<SiStripModule>::const_iterator imod = iccu->modules().begin(); imod != iccu->modules().end();
108 if (populateAllFeds) {
109 for (uint16_t ipair = 0; ipair < imod->nApvPairs(); ipair++) {
110 if (ifed ==
feds.end()) {
119 std::pair<uint16_t, uint16_t>
addr = imod->activeApvPair(imod->lldChannel(ipair));
124 const_cast<SiStripModule&>(*imod).fedCh(
addr.first, fed_channel);
132 if (96 - fed_ch < imod->nApvPairs()) {
136 for (uint16_t ipair = 0; ipair < imod->nApvPairs(); ipair++) {
137 std::pair<uint16_t, uint16_t>
addr = imod->activeApvPair((*imod).lldChannel(ipair));
142 const_cast<SiStripModule&>(*imod).fedCh(
addr.first, fed_channel);
154 <<
" Insufficient FED channels to cable entire system!";
158 std::stringstream
ss;
159 ss <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]"
160 <<
" First count devices of FEC cabling " << std::endl;
165 std::vector<FedChannelConnection> conns;