|
pflib v3.14.3-4-g3289bd3
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 SingleECONDRocErxMapping *mapping=nullptr) const |
| write out all of the samples into the input CSV file | |
Public Attributes | |
| std::size_t | i_soi |
| index of the sample of interest (SOI) | |
| 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 MultiSampleECONDEventPacket::to_csv | |
| static const std::string | to_csv_header_with_mapping |
| header string if using MultiSampleECONDEventPacket::to_csv with an input mapping | |
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
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 SingleECONDRocErxMapping * | mapping = nullptr ) const |
write out all of the samples into the input CSV file
| [in] | f | output file stream to write rows into |
| [in] | mapping | if provided, use the input mapping to convert the (i_erx, i_ch) indices into (i_roc, ch indices) |
The columns of the output CSV are
where i_link is the index of the active eRx being read out and channel ranges from 0 to 35 or is "calib" if a mapping is not provided (mapping == nullptr) and
where i_roc is the index of the ROC that is read out and channel ranges from 0 to 71 or is "calib_<half>". if a mapping is provided (mapping != nullptr).
|
static |
header string if using MultiSampleECONDEventPacket::to_csv
|
static |
header string if using MultiSampleECONDEventPacket::to_csv with an input mapping