26 const uint64_t tTimeslice)
const
32 L_(debug) <<
"EQ ID 0x" << std::hex << msDescr.eq_id << std::dec;
35 auto msSize = msDescr.size;
37 std::get<1>(result).fNumErrInvalidMsSize++;
41 if (numMessages < 2) {
42 std::get<1>(result).fNumErrInvalidMsSize++;
49 const uint32_t maxDigis = numMessages - 2;
50 std::get<0>(result).reserve(maxDigis);
54 std::get<1>(result).fNumErrInvalidFirstMessage++;
59 const uint64_t msStartEpoch =
61 if (message[0].getGdpbEpEpochNb() != msStartEpoch) {
62 std::get<1>(result).fNumErrInvalidStartEpoch++;
75 if (!message[numMessages - 1].isEndOfMs()) {
76 std::get<1>(result).fNumErrInvalidLastMessage++;
82 for (uint32_t messageNr = 1; messageNr < numMessages; messageNr++) {
85 switch (message[messageNr].getMessageType()) {
88 ProcessHitMessage(message[messageNr], time, std::get<0>(result), std::get<1>(result));
97 std::get<1>(result).fNumErrInvalidAsicEpochs++;
103 std::get<1>(result).fNumNonHitOrTsbMessage++;
107 std::get<1>(result).fNumNonHitOrTsbMessage++;
111 std::get<1>(result).fNumNonHitOrTsbMessage++;
142 const uint32_t channelUId = (elinkPar.
fChannelUId)[channel];
144 L_(debug) <<
"GET4 Idx " << elink <<
" channel " << channel <<
" 0x" << std::hex << channelUId << std::dec;
145 if (0 < channelUId) {
150 digiVec.emplace_back(channelUId, messageTime, charge);
153 L_(debug) <<
"Ignoring digi on unmapped channel";
std::tuple< std::vector< Digi_t >, Monitor_t, Aux_t > Result_t
UnpackPar fParams
Parameter container.
UnpackMS(const UnpackPar &pars)
Construct from parameters.
~UnpackMS() override
Destructor.
void ProcessHitMessage(const critof001::Message &message, const TimeSpec &time, std::vector< CbmBmonDigi > &digiVec, UnpackMonitorData &monitor) const
Process a hit message.
Result_t operator()(const uint8_t *msContent, const fles::MicrosliceDescriptor &msDescr, const uint64_t tTimeslice) const override
Algorithm execution.
void ProcessEpochMessage(const critof001::Message &message, TimeSpec &time) const
Process an epoch message (TS_MSB)
uint16_t getGdpbHit32Tot() const
uint16_t getGet4Idx() const
uint16_t getGdpbHitChanId() const
uint32_t getGdpbEpEpochNb() const
double getMsgFullTimeD(uint64_t epoch) const
Returns expanded and adjusted time of message in double (in ns)
const uint64_t kulEpochCycleEp
const uint32_t kuChipIdMergedEpoch
Bmon Unpacking parameters for one eLink / ASIC.
int32_t fTimeOffset
Time calibration parameter.
std::vector< uint32_t > fChannelUId
CbmBmonAddress for different channels.
uint64_t currentTsTime
Unix time of timeslice in units of epoch length.
uint32_t currentEpochInTs
Current epoch number relative to timeslice start epoch.
uint32_t fNumErrElinkOutOfRange
Elink not contained in parameters.
Parameters required for the BMON unpacking (specific to one component)
std::vector< UnpackElinkPar > fElinkParams
Parameters for each eLink.