|
pflib v3.13.3-1-gf856638
Pretty Fine HGCROC Interaction Library
|
Without a trigger link set up, the decoding cannot be fuctionally tested. More...
#include <TriggerLinkFrame.h>
Public Member Functions | |
| uint8_t | compressed_sum (int i_sum, int i_bx=0) const |
| Get a specific compressed trigger sum from the data words. | |
| uint32_t | linearized_sum (int i_sum, int i_bx=0) const |
| Get a specific linearized trigger sum from the data words. | |
| void | from (std::span< uint32_t > data) |
| Parse into this link frame from a std::span over 32-bit words. | |
| TriggerLinkFrame (std::span< uint32_t > data) | |
| Construct from a std::span over 32-bit words. | |
| TriggerLinkFrame ()=default | |
| default constructor which does nothing | |
Static Public Member Functions | |
| static uint32_t | compressed_to_linearized (uint8_t cs) |
| Convert a compressed trigger sum into its linearized equivalent. | |
Public Attributes | |
| int | i_link |
| trigger link identification number | |
| std::array< uint32_t, 4 > | data_words |
| Trigger words including one pre-sample and 2 following samples. | |
| std::array< bool, 5 > | corruption |
| Checks on data format. | |
| logging::logger | the_log_ {logging::get("decoding")} |
| handle to logging for decoding warnings | |
Static Public Attributes | |
| static const int | i_soi_ = 1 |
| index of data words containg sample of interest | |
Without a trigger link set up, the decoding cannot be fuctionally tested.
This class is merely a skeleton of how unpacking could be done for these trigger link frames on a fiberless setup. This class does not handle the change in format the happens when the trigger data streams from one or more ROCs are processed by an ECON-T.
| pflib::packing::TriggerLinkFrame::TriggerLinkFrame | ( | std::span< uint32_t > | data | ) |
Construct from a std::span over 32-bit words.
| uint8_t pflib::packing::TriggerLinkFrame::compressed_sum | ( | int | i_sum, |
| int | i_bx = 0 ) const |
Get a specific compressed trigger sum from the data words.
| [in] | i_sum | sum index 0, 1, 2, or 3 |
| [in] | i_bx | bunch index relative to i_soi_ -1, 0, 1, or 2 |
|
static |
Convert a compressed trigger sum into its linearized equivalent.
The chip lossy compresses its trigger sums into seven bits using the 4E+3M encoding and this function decompresses the sum into our best estimate of what the on-chip trigger sum was.
If SelTC4 stores the setting on the chip when the data was collected and lin_val is the value returned by this function, then
is the integer value pertaining to the correct scale of the sums as determined on the chip.
| [in] | cs | compressed sum to unpack |
| uint32_t pflib::packing::TriggerLinkFrame::linearized_sum | ( | int | i_sum, |
| int | i_bx = 0 ) const |
Get a specific linearized trigger sum from the data words.
| [in] | i_sum | sum index 0, 1, 2, or 3 |
| [in] | i_bx | bunch index relative to i_soi_ -1, 0, 1, or 2 |
| std::array<bool, 5> pflib::packing::TriggerLinkFrame::corruption |
Checks on data format.
| Index | Description |
|---|---|
| 0 | leading four-bits of sw header is wrong |
| 1 | leading four-bits of 0'th data word is wrong |
| 2 | leading four-bits of 1st data word is wrong |
| 3 | leading four-bits of 2nd data word is wrong |
| 4 | leading four-bits of 3rd data word is wrong |
| std::array<uint32_t, 4> pflib::packing::TriggerLinkFrame::data_words |
Trigger words including one pre-sample and 2 following samples.
A trigger word contains 4 7-bit trigger sums and a 4-bit leading header to help check for corruption and link alignment.