90 for (uint16_t comp = 0; comp < pars.
NComponents(); comp++) {
92 uint16_t equipment = pars.
eqIds.at(comp);
105 uint32_t chanInSys = comp * numChanPerComp + chanInComp;
108 const int numFullFlims = 8;
109 if (comp > numFullFlims) {
110 chanInSys -= (comp - numFullFlims) * numChanPerComp / 2;
128 L_(debug) <<
"============================================================";
129 L_(debug) <<
"================== BMON Mapping ============================";
132 for (uint32_t uGbtx = 0; uGbtx < pars.
NCrobs(); ++uGbtx) {
133 const uint32_t uCh0 = uCh;
134 const auto& crob = pars.
crobs.at(uGbtx);
135 switch (crob.rpcType) {
147 L_(warning) <<
" Found unused GBTX link at uCh = " << uCh;
152 L_(error) <<
"Invalid Bmon Type specifier for GBTx " << std::setw(2) << uGbtx <<
": " << crob.rpcType;
156 throw FatalError(
"Bmon mapping error for Gbtx {}, diff = {}, expected = {}", uGbtx, uCh - uCh0,
160 L_(info) <<
" Map for CROB " << uGbtx;
161 std::vector<int32_t> vAddrBunch(8, -1);
162 for (uint32_t uChPrint = uCh0; uChPrint < uCh; ++uChPrint) {
164 if (7 == uChPrint % 8) {
165 L_(debug) << std::hex << std::setfill(
'0') <<
"0x" << std::setw(8) << vAddrBunch[0] <<
" 0x" << std::setw(8)
166 << vAddrBunch[1] <<
" 0x" << std::setw(8) << vAddrBunch[2] <<
" 0x" << std::setw(8) << vAddrBunch[3]
167 <<
" 0x" << std::setw(8) << vAddrBunch[4] <<
" 0x" << std::setw(8) << vAddrBunch[5] <<
" 0x"
168 << std::setw(8) << vAddrBunch[6] <<
" 0x" << std::setw(8) << vAddrBunch[7] << std::dec;
176 L_(debug) << std::hex << std::setfill(
'0') <<
"0x" << std::setw(8) << vAddrBunch[0] << std::dec;
180 L_(debug) << std::hex << std::setfill(
'0') <<
"0x" << std::setw(8) << vAddrBunch[0] <<
" 0x" << std::setw(8)
181 << vAddrBunch[1] << std::dec;
185 L_(debug) << std::hex << std::setfill(
'0') <<
"0x" << std::setw(8) << vAddrBunch[0] <<
" 0x" << std::setw(8)
186 << vAddrBunch[1] <<
" 0x" << std::setw(8) << vAddrBunch[2] << std::dec;
190 L_(debug) << std::hex << std::setfill(
'0') <<
"0x" << std::setw(8) << vAddrBunch[0] <<
" 0x" << std::setw(8)
191 << vAddrBunch[1] <<
" 0x" << std::setw(8) << vAddrBunch[2] <<
" 0x" << std::setw(8) << vAddrBunch[3]
196 L_(debug) << std::hex << std::setfill(
'0') <<
"0x" << std::setw(8) << vAddrBunch[0] <<
" 0x" << std::setw(8)
197 << vAddrBunch[1] <<
" 0x" << std::setw(8) << vAddrBunch[2] <<
" 0x" << std::setw(8) << vAddrBunch[3]
198 <<
" 0x" << std::setw(8) << vAddrBunch[4] << std::dec;
202 L_(debug) << std::hex << std::setfill(
'0') <<
"0x" << std::setw(8) << vAddrBunch[0] <<
" 0x" << std::setw(8)
203 << vAddrBunch[1] <<
" 0x" << std::setw(8) << vAddrBunch[2] <<
" 0x" << std::setw(8) << vAddrBunch[3]
204 <<
" 0x" << std::setw(8) << vAddrBunch[4] <<
" 0x" << std::setw(8) << vAddrBunch[5] << std::dec;
208 L_(debug) << std::hex << std::setfill(
'0') <<
"0x" << std::setw(8) << vAddrBunch[0] <<
" 0x" << std::setw(8)
209 << vAddrBunch[1] <<
" 0x" << std::setw(8) << vAddrBunch[2] <<
" 0x" << std::setw(8) << vAddrBunch[3]
210 <<
" 0x" << std::setw(8) << vAddrBunch[4] <<
" 0x" << std::setw(8) << vAddrBunch[5] <<
" 0x"
211 << std::setw(8) << vAddrBunch[6] << std::dec;
217 L_(debug) <<
"============================================================";
223 const auto& crob = pars.
crobs.at(uGbtx);
224 L_(debug) <<
" Map diamond " << crob.moduleId <<
" at GBTX " << uGbtx <<
" - uCh = " << uCh;
225 for (uint32_t uGet4 = 0; uGet4 < pars.
NElinksPerCrob(); ++uGet4) {
228 if (uGet4 < 32 && 0 == uGet4Ch && -1 < crob.moduleId) {
229 uint32_t uChannelBmon = uGet4 + 32 * crob.rpcSide;
232 L_(debug) <<
" Bmon channel: " << uChannelBmon <<
" from GBTx " << uGbtx <<
" , indx " << uCh
233 <<
" address 0x" << std::hex << std::setfill(
'0') << std::setw(8) <<
fviRpcChUId[uCh] << std::dec;
246 const auto& crob = pars.
crobs.at(uGbtx);
247 L_(debug) <<
" Map 2022 diamond " << crob.moduleId <<
" at GBTX " << uGbtx <<
" - uCh = " << uCh;
248 for (uint32_t uGet4 = 0; uGet4 < pars.
NElinksPerCrob(); ++uGet4) {
251 if (-1 < crob.moduleId && uGet4 < 32 && 0 == uGet4 % 4 && 0 == uGet4Ch) {
254 uint32_t uChannelBmon = (uGet4 / 8 + 4 * (uGbtx / 2)) % 16;
257 L_(debug) <<
" Bmon channel: " << uChannelBmon <<
" side " << crob.rpcSide <<
" from GBTx " << uGbtx
258 <<
" , indx " << uCh <<
" address 0x" << std::hex << std::setfill(
'0') << std::setw(8)