2#ifndef PFLIB_PACKING_SINGLEECONTCAPTUREFRAME_H
3#define PFLIB_PACKING_SINGLEECONTCAPTUREFRAME_H
7#include "pflib/logging/Logging.h"
8#include "pflib/packing/ECONTCaptureHeader.h"
9#include "pflib/packing/Reader.h"
11namespace pflib::packing {
53 mutable ::pflib::logging::logger the_log_{
61 void from(std::span<uint32_t> data);
69 int max_tc(
int i_stc)
const;
75 void from(std::span<uint32_t> data);
77 std::optional<int> i_sample = {})
const;
78 int bx(std::optional<int> i_econt = {},
79 std::optional<int> i_sample = {})
const;
80 int stc_sum(
int i_stc, std::optional<int> i_econt = {},
81 std::optional<int> i_sample = {})
const;
82 int encoded_stc_sum(
int i_stc, std::optional<int> i_econt = {},
83 std::optional<int> i_sample = {})
const;
84 int max_tc(
int i_stc, std::optional<int> i_econt = {},
85 std::optional<int> i_sample = {})
const;
86 const ECONTCaptureHeader& header()
const;
91 int pre_samples()
const;
95 ECONTCaptureHeader header_;
Each ECON-T sample has the following struture, assuming.
Definition HcalECONTCaptureFrame.h:52
int encoded_stc_sum(int i_stc) const
the raw value trasmitted by the ECON-T
Definition HcalECONTCaptureFrame.cxx:39
int stc_sum(int i_stc) const
decode the 5E+4M encoding into a linearized sum value
Definition HcalECONTCaptureFrame.cxx:35
int bx() const
bx counter for this sample of STC sums
Definition HcalECONTCaptureFrame.cxx:33
int max_tc(int i_stc) const
index of the TC within the STC that was the maximum
Definition HcalECONTCaptureFrame.cxx:43
A capture frame has one or more SingleECONTSamples along with two headers written by the firmware tha...
Definition HcalECONTCaptureFrame.h:18
void from(std::span< uint32_t > data)
Definition HcalECONTCaptureFrame.cxx:51
Reading a raw data stream with some underlying backend.
Definition Reader.h:19
logger get(const std::string &name)
Gets a logger with the input name for its channel.
Definition Logging.cxx:24