|
pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
|
Single ECON-D event packet. More...
#include <ECONDEventPacket.h>
Public Member Functions | |
| ECONDEventPacket (std::size_t n_links) | |
| Construct an event packet with the number of eRx "links". | |
| int | adc_cm0 (int i_link) const |
| get ADC readout from common mode 0 of input link | |
| int | adc_cm1 (int i_link) const |
| get ADC readout from common mode 1 of input link | |
| Sample | channel (int i_link, int i_ch) const |
| get channel Sample from a link | |
| Sample | calib (int i_link) const |
| get calib Sample from a link half | |
| void | from (std::span< uint32_t > data) |
| parse into the packet from the passed data span | |
| void | to_csv (std::ofstream &f) const |
| write current packet into a CSV | |
Public Attributes | |
| std::array< bool, 4 > | corruption |
| storage of corruption bits | |
| std::vector< DAQLinkFrame > | links |
| storage of unpacked link data | |
Static Public Attributes | |
| static const std::string | to_csv_header |
| header string if using to_csv | |
Private Member Functions | |
| std::size_t | unpack_link_subpacket (std::span< uint32_t > data, DAQLinkFrame &link, bool passthrough) |
| Unpack a eRx ("link") subpacket from the ECOND event into a DAQLinkFrame. | |
Private Attributes | |
| mutable::pflib::logging::logger | the_log_ {::pflib::logging::get("decoding")} |
| handle to logging source | |
Single ECON-D event packet.
The ECON-D is the CONcentrator mezzanine for the Data path and it has many different configuration modes. The two most important to us for decoding are
The ECOND_Formatter emulates the ECON-D re-formatting of the HGCROC event packets into the ECON-D event packet. This unpacking is done separately from this formatter so that it can be applied to data actually extracted from an ECON-D.
| void pflib::packing::ECONDEventPacket::from | ( | std::span< uint32_t > | data | ) |
parse into the packet from the passed data span
This function is what implements the format describe in the ECOND specification.
| void pflib::packing::ECONDEventPacket::to_csv | ( | std::ofstream & | f | ) | const |
write current packet into a CSV
| [in,out] | f | file to write CSV to |
The columns of the output CSV are
Since there are 36 channels and one calib channel per DAQ links, there are N*(36+1) rows written for each call to this function where N is the number of links.
The trigger links are entirely ignored.
|
private |
Unpack a eRx ("link") subpacket from the ECOND event into a DAQLinkFrame.
| [in] | data | subpacket data to unpack |
| [out] | link | DAQLinkFrame to update with unpacked data @paran[in] passthrough whether the ECOND is in pass through mode or not |
| std::array<bool, 4> pflib::packing::ECONDEventPacket::corruption |
storage of corruption bits
| Index | Description |
|---|---|
| 0 | 9b header marker is not the ECOND spec or common CMS config |
| 1 | stored length does not equal packet length |
| 2 | 8b header CRC mismatch |
| 3 | 32b sub-packet CRC mismatch |
| std::vector<DAQLinkFrame> pflib::packing::ECONDEventPacket::links |
storage of unpacked link data
This is very space in-efficient since we store zero words for any channel or measurement that was zero suppressed. This won't be a problem for the smaller-scale testbeam prototypes, but could be a memory issue when we get to the full LDMX detector with its almost 100k channels.
|
static |
header string if using to_csv