14 namespace itk::itkpix::endec::dummy {
24 log.
debug(
"evt_init(tag: 0x{:02x})", tag);
27 log.
debug(
"evt_next(tag: 0x{:02x})", tag);
30 log.
debug(
"evt_done");
32 void add_hit(uint16_t col, uint16_t row, uint16_t tot)
override {
33 log.
trace(
"add_hit(col: {}, row: {}, tot: {})", col, row, tot);
35 void add_hmap(uint8_t qcol, uint8_t qrow, uint16_t hmap, uint64_t tots)
override {
36 log.
trace(
"add_hit(qcol: {}, qrow: {}, hmap: 0x{:04x}, tot: 0x{:016x})", qcol, qrow, hmap, tots);
38 void add_qcore(uint8_t qcol, uint8_t qrow, uint64_t qtot)
override {
39 log.
trace(
"add_qcore(qcol: {}, qrow: {}, tot: 0x{:016x})", qcol, qrow, qtot);
42 log.
error(
"evt_error(code: {})", error.
code);
48 template<
typename T,
int cb_type = 0>
54 log.
info(
"dummy.DecCore(opt, evt, type: {})", cb_type);
57 inline void initialize() {
58 log.
debug(
"initialize()");
60 inline void finalize() {
61 log.
debug(
"finalize()");
63 inline void decode(uint64_t data64) {
64 log.
debug(
"decode(data64: 0x{:016x})", data64);
66 inline void decode(
const uint8_t *buff,
size_t size) {
67 log.
debug(
"decode(buff) | size64: {}",
size);
68 for (uint i = 0; i <
size; i++) {
69 log.
trace(
" 0x{:02x}", buff[i]);
72 inline void decode(
const uint64_t *buff64,
size_t size64) {
73 log.
debug(
"decode(buff64) | size64: {}", size64);
74 for (uint i = 0; i < size64; i++) {
75 log.
trace(
" 0x{:016x}", buff64[i]);
77 log.
debug(
"example of cb_evt callbacks:");
78 cb_evt.evt_init(0x10);
79 cb_evt.add_hit(1, 2, 3);
Definition: test_enc_dec.cpp:117
Definition: deccore.hpp:49
Definition: deccore.hpp:18
void add_hmap(uint8_t qcol, uint8_t qrow, uint16_t hmap, uint64_t tots) override
Add quarter core: rawmap is decoded, tots are not decoded.
Definition: deccore.hpp:35
uint8_t on_error(EventError error) override
Callback on decoding error.
Definition: deccore.hpp:41
void evt_init(uint8_t tag) override
Initialize a new stream and create a new event.
Definition: deccore.hpp:23
void evt_next(uint8_t tag) override
Complete the event and start the next one.
Definition: deccore.hpp:26
void evt_done() override
Complete the event and finalize the stream.
Definition: deccore.hpp:29
void add_hit(uint16_t col, uint16_t row, uint16_t tot) override
Add hit.
Definition: deccore.hpp:32
void add_qcore(uint8_t qcol, uint8_t qrow, uint64_t qtot) override
Add quarter core: tots are decoded to 64 bit qtot, no-hit marked as 0xF.
Definition: deccore.hpp:38
Callback interface for event.
Definition: evtcallback.hpp:45
Definition: deccore.hpp:128
Logger class definition, wrapper around CoreLogger, adds templated methods for different logging leve...
Definition: logger.hpp:108
void error(fmt::format_string< Args... > fmt, Args &&...args)
Logs a message with error level.
Definition: logger.hpp:164
void debug(fmt::format_string< Args... > fmt, Args &&...args)
Logs a message with debug level.
Definition: logger.hpp:140
void info(fmt::format_string< Args... > fmt, Args &&...args)
Logs a message with information level.
Definition: logger.hpp:148
void trace(fmt::format_string< Args... > fmt, Args &&...args)
Logs a message with trace level.
Definition: logger.hpp:132
Templates for ITkPix Decoder.
Callback on event decoding error.
Definition: evtcallback.hpp:15
error_t code
error code
Definition: evtcallback.hpp:32
Common encoder/decoder options.
Definition: options.hpp:10