39 void set(uint32_t
orbit, uint32_t trigger);
47#if defined(MID_RAW_VECTORS)
52 inline void onDone(
const ELinkDecoder& decoder, uint8_t crateId, uint8_t locId, std::vector<ROBoard>&
data, std::vector<ROFRecord>& rofs)
54 return mDataShapers[mIndex(crateId, locId,
raw::isLoc(decoder.getStatusWord()))].onDone(decoder,
data, rofs);
58 std::function<size_t(uint8_t, uint8_t,
bool)> mIndex{};
59 std::vector<ELinkDataShaper> mDataShapers;
60 std::vector<ELinkDecoder> mDecoders;
64 inline ELinkDecoder&
getDecoder(uint8_t boardUniqueId,
bool isLoc) {
return mDecoders.find(makeUniqueId(isLoc, boardUniqueId))->second; }
67 void onDone(
const ELinkDecoder& decoder, uint8_t crateId, uint8_t locId, std::vector<ROBoard>&
data, std::vector<ROFRecord>& rofs);
71 inline uint16_t makeUniqueId(
bool isLoc, uint8_t uniqueId) {
return (isLoc ? 0 : (1 << 8)) | uniqueId; }
72 std::unordered_map<uint16_t, ELinkDataShaper> mDataShapers;
73 std::unordered_map<uint16_t, ELinkDecoder> mDecoders;
74 std::unordered_map<uint16_t, unsigned long int> mErrors;
void init(uint16_t feeId, bool isDebugMode, bool isBare=false, const ElectronicsDelay &electronicsDelay=ElectronicsDelay(), const FEEIdConfig &feeIdConfig=FEEIdConfig())
void onDone(const ELinkDecoder &decoder, uint8_t boardUniqueId, std::vector< ROBoard > &data, std::vector< ROFRecord > &rofs)
Main function to be executed when decoding is done.