Skip to content
Snippets Groups Projects
Commit f29bf1e3 authored by Alexandru Bercuci's avatar Alexandru Bercuci
Browse files

fix build error/warnings

parent 43904807
No related branches found
No related tags found
1 merge request!19952D online unpacker. Updated versions for the algo and the FASP message.
......@@ -98,20 +98,22 @@ namespace cbm::algo::trd2d
// --- Initialise the mapping structure --------------------------------------------
void ReadoutConfig::InitChannelMap(
const std::map<size_t, std::map<size_t, std::map<size_t, std::tuple<int32_t, bool, uint64_t>>>>& channelMap)
const std::map<size_t, std::map<size_t, std::map<size_t, std::tuple<int32_t, bool, uint8_t, uint16_t>>>>&
channelMap)
{
// Constructing the map (equipId, asicId, chanId) -> (pad address, mask flag, daq offset)
for (auto compMap : channelMap) {
uint16_t equipmentId = compMap.first;
uint16_t numAsics = compMap.second.size();
// uint16_t numAsics = compMap.second.size();
for (auto asicMap : compMap.second) {
uint16_t asicId = asicMap.first;
uint16_t numChans = asicMap.second.size();
// uint16_t numChans = asicMap.second.size();
fChannelMap[equipmentId][asicId].resize(16);
for (auto chanMap : asicMap.second) {
uint16_t chanId = chanMap.first;
std::tuple<int32_t, bool, uint64_t> chanPars = chanMap.second;
ChanMapping entry = {std::get<0>(chanPars), std::get<1>(chanPars), std::get<2>(chanPars)};
std::tuple<int32_t, bool, uint8_t, uint16_t> chanPars = chanMap.second;
const ChanMapping entry = {std::get<0>(chanPars), std::get<1>(chanPars), std::get<2>(chanPars),
std::get<3>(chanPars)};
fChannelMap[equipmentId][asicId][chanId] = entry;
}
}
......@@ -123,7 +125,7 @@ namespace cbm::algo::trd2d
// --- Mapping (equimentId, asicId, channel) -> (pad address, mask flag, daq offset) -----
ReadoutConfig::ChanMapping ReadoutConfig::ChanMap(uint16_t equipId, uint16_t asicId, uint16_t chanId)
{
ChanMapping result = {-1, false, 0};
ChanMapping result = {-1, false, 0, 0};
auto it = fChannelMap.find(equipId);
if (it != fChannelMap.end()) {
auto fiberMap = fChannelMap[equipId];
......
......@@ -116,7 +116,8 @@ namespace cbm::algo::trd2d
/** @brief Initialisation of channel map **/
void InitChannelMap(
const std::map<size_t, std::map<size_t, std::map<size_t, std::tuple<int32_t, bool, uint64_t>>>>& channelMap);
const std::map<size_t, std::map<size_t, std::map<size_t, std::tuple<int32_t, bool, uint8_t, uint16_t>>>>&
channelMap);
/** @brief Get system time offset **/
int64_t GetSystemTimeOffset() { return fSystemTimeOffset; };
......
......@@ -39,7 +39,7 @@ InitStatus CbmTaskTrdUnpackParWrite::Init()
// Map (moduleId) -> (array of crobId)
std::map<uint32_t, std::vector<uint16_t>> crobMap;
// Map (equipId, asicId, chanId) -> (pad address, mask flag, daq offset [FASP clk])
std::map<size_t, std::map<size_t, std::map<size_t, std::tuple<int32_t, bool, uint64_t>>>> channelMap;
std::map<size_t, std::map<size_t, std::map<size_t, std::tuple<int32_t, bool, uint8_t, uint16_t>>>> channelMap;
// Loop through a list of module IDs from the .digi file (can in principle contradict crob_map).
for (auto entry : digiparset.GetModuleMap()) {
......@@ -77,9 +77,10 @@ InitStatus CbmTaskTrdUnpackParWrite::Init()
const CbmTrdParFaspChannel* faspch = fasppar->GetChannel(chan);
const int32_t pad = fasppar->GetPadAddress(chan) * (faspch->HasPairingR() ? 1 : -1);
const bool isMasked = faspch->IsMasked();
uint64_t daq_offset = 0;
uint8_t daq_offset = 0;
uint8_t thres = 0;
if (((CbmTrdParModDigi*) digipar)->GetPadRow(pad) % 2 == 0) daq_offset = 3;
channelMap[eq_id][fasp_in_eq][chan] = std::make_tuple(pad, isMasked, daq_offset);
channelMap[eq_id][fasp_in_eq][chan] = std::make_tuple(pad, isMasked, daq_offset, thres);
}
}
}
......
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