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

[Bmon] Ignore unmapped channels in online unpacker

=> Due to noisy unconnected channel not being masked in HW during mCBM 2024 data taking (and probably 2022 one)
parent 24496bc7
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
#include <cassert>
#include <cmath>
#include <log.hpp>
#include <sstream>
#include <utility>
#include <vector>
......@@ -27,6 +28,8 @@ namespace cbm::algo::bmon
// --- Output data
Result_t result = {};
L_(debug) << "EQ ID 0x" << std::hex << msDescr.eq_id << std::dec;
// --- Number of messages in microslice
auto msSize = msDescr.size;
if (msSize % sizeof(critof001::Message) != 0) {
......@@ -114,7 +117,6 @@ namespace cbm::algo::bmon
{
// IGNORES:
// - Duplicate messages
// - (0 == uChanUId)
// - (fviRpcChUId.size() < uRemappedChannelNrInSys)
// - successive digis with same time
// (these are filtered in original version but not here)
......@@ -131,11 +133,17 @@ namespace cbm::algo::bmon
const uint32_t channel = message.getGdpbHitChanId();
const uint32_t channelUId = (elinkPar.fChannelUId)[channel];
double messageTime = message.getMsgFullTimeD(time.currentEpochInTs) - elinkPar.fTimeOffset;
const double charge = (double) message.getGdpbHit32Tot(); //cast from uint32_t
L_(debug) << "GET4 Idx " << elink << " channel " << channel << " 0x" << std::hex << channelUId << std::dec;
if (0 < channelUId) {
double messageTime = message.getMsgFullTimeD(time.currentEpochInTs) - elinkPar.fTimeOffset;
const double charge = (double) message.getGdpbHit32Tot(); //cast from uint32_t
// --- Create output digi
digiVec.emplace_back(channelUId, messageTime, charge);
// --- Create output digi
digiVec.emplace_back(channelUId, messageTime, charge);
}
else {
L_(debug) << "Ignoring digi on unmapped channel";
}
}
// --------------------------------------------------------------------------
......
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