Skip to content
Snippets Groups Projects
Commit 79173df5 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau Committed by Pierre-Alain Loizeau
Browse files

[online] alt fix for FEB index at mSTS chan masks import, closer to original

parent a7ab5082
No related branches found
No related tags found
1 merge request!1771[online] alternative fix for FEB index at mSTS chan masks import, closer to original
Pipeline #28977 passed
......@@ -93,10 +93,12 @@ void sts::ReadoutConfig::Init(const ReadoutSetup& config, const ChannelMaskSet&
std::map<size_t, uint32_t> febAdcCuts = {{1, 1}, {2, 1}, {3, 1}, {4, 1}};
// Constructing the map (equipmentId, eLink) -> (module, ASIC within module)
int32_t febBaseIdx = 0;
for (uint16_t compIdx = 0; compIdx < numComp; compIdx++) {
const auto& component = config.components.at(compIdx);
uint16_t equipment = component.equipmentId;
fReadoutConfig[equipment].resize(numElinksPerComp);
const int32_t numFebsPerCrob = component.FEBsPerCrob();
for (uint16_t crobIdx = 0; crobIdx < numCrobPerComp; crobIdx++) {
for (uint16_t elinkIdx = 0; elinkIdx < numElinksPerCrob; elinkIdx++) {
......@@ -134,8 +136,7 @@ void sts::ReadoutConfig::Init(const ReadoutSetup& config, const ChannelMaskSet&
asicInModule = (moduleSide == 1 ? asicInFeb : numAsicsPerMod - 1 - asicInFeb);
// Init channel mask
const int32_t numFebsPerCrob = component.FEBsPerCrob();
const int32_t febId = 2 * moduleIdx + moduleSide;
const int32_t febId = feb + febBaseIdx;
auto mapIt = chanMaskSet.values.find(febId);
if (mapIt != chanMaskSet.values.end()) {
const auto& mask = mapIt->second;
......@@ -161,6 +162,7 @@ void sts::ReadoutConfig::Init(const ReadoutSetup& config, const ChannelMaskSet&
} //# elink
} //# CROB
febBaseIdx += numCrobPerComp * numFebsPerCrob; // Add the proper offset for the current CROB
} //# component
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment