|
pflib v3.9.4-7-gb2e7f4f
Pretty Fine HGCROC Interaction Library
|
Unpack an event that has potentially more than one sample collected from a single ECOND. More...
#include <MultiSampleECONDEventPacket.h>
Public Member Functions | |
| const ECONDEventPacket & | soi () const |
| get the sample of interest | |
| MultiSampleECONDEventPacket (int n_links) | |
| constructor defining how many links are connected to this ECOND | |
| void | from (std::span< uint32_t > data, bool expect_ldmx_ror_header=false) |
| unpack the given data into this structure | |
| Reader & | read (Reader &r) |
| read into this structure from the input Reader | |
| void | to_csv (std::ofstream &f) const |
| write out all of the samples into the input CSV file | |
Public Attributes | |
| std::size_t | i_soi |
| Corruption bits. | |
| int | econd_id |
| ID for this econ. | |
| int | contrib_id |
| contributor ID | |
| int | subsys_id |
| subsystem ID | |
| uint64_t | timestamp |
| timestamp from RoR | |
| std::vector< ECONDEventPacket > | samples |
| samples from ECOND stored in order of transmission | |
Static Public Attributes | |
| static const std::string | to_csv_header |
| header string if using to_csv | |
Private Attributes | |
| mutable::pflib::logging::logger | the_log_ {::pflib::logging::get("decoding")} |
| handle to logging source | |
| int | n_links_ |
| number of links connected to the ECOND | |
Unpack an event that has potentially more than one sample collected from a single ECOND.
| void pflib::packing::MultiSampleECONDEventPacket::from | ( | std::span< uint32_t > | data, |
| bool | expect_ldmx_ror_header = false ) |
unpack the given data into this structure
the ldmx ror header inserts 4 32-bit words (16 bytes) of the form
0xA5 | 8b contrib | 8b subsys | 8b VERS = 0 32b 0 64b timestamp
The software emulation adds another header before the ECOND packet, which looks like
4b vers | 10b ECON ID | 5b il1a | S | 0 | 8b length
read into this structure from the input Reader
DANGER Without signal header/trailer words, this assumes that the data stream is word aligned and we aren't starting on the wrong word.
| void pflib::packing::MultiSampleECONDEventPacket::to_csv | ( | std::ofstream & | f | ) | const |
write out all of the samples into the input CSV file
The columns of the output CSV are
| std::size_t pflib::packing::MultiSampleECONDEventPacket::i_soi |
Corruption bits.
| Index | Description |
|---|---|
| 0 | full packet header flag mismatch |
std::array<bool, 1> corruption; index of the sample of interest (SOI)
|
static |
header string if using to_csv