|
pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
|
Simple HGCROC-only event packet. More...
#include <SingleROCEventPacket.h>
Public Member Functions | |
| void | from (std::span< uint32_t > data) |
| parse into this package from the passed data span | |
| Reader & | read (Reader &r) |
| read from the input reader into this packet | |
| void | to_csv (std::ofstream &f) const |
| write current packet into a CSV | |
| Sample | channel (int ch) const |
| Get a specific Sample from a channel. | |
| uint32_t | trigsum (int i_link, int i_sum, int i_bx=0) const |
| Get a trigger cell sum. | |
| SingleROCEventPacket ()=default | |
| default constructor that does nothing | |
Public Attributes | |
| std::array< DAQLinkFrame, 2 > | daq_links |
| the two daq links for the connected HGCROC | |
| std::array< TriggerLinkFrame, 4 > | trigger_links |
| the four trigger links | |
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")} |
Simple HGCROC-only event packet.
No zero suppressions or condensation is done, the entire HGCROC DAQ and Link packets are reaodut into a single event packet in sequence.
This is the style of readout from the 2021 teastbeam and can be done easily in pflib without much emulation.
| Sample pflib::packing::SingleROCEventPacket::channel | ( | int | ch | ) | const |
Get a specific Sample from a channel.
The channel index input here is relative to the ROC [0,71]. If you have the channel index within a daq link (or ROC "half"), just access the daq links directly
where i_link is the link index 0 or 1 and i_chan is the channel index within the link [0,35].
read from the input reader into this packet
enables us to
| void pflib::packing::SingleROCEventPacket::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 two DAQ links each with 36 channels and one calib channel, there are 2*(36+1)=74 rows written for each call to this function.
The trigger links are entirely ignored.
| uint32_t pflib::packing::SingleROCEventPacket::trigsum | ( | int | i_link, |
| int | i_sum, | ||
| int | i_bx = 0 ) const |
Get a trigger cell sum.
We do not have a unified ID number for trigger cells defined at the moment, so you need to specify both which trigger link it comes from and the index of the sum within that trigger link.
| [in] | i_link | trigger link 0-3 |
| [in] | i_sum | index of sum within the link 0-3 |
| [in] | i_bx | index of BX relative to in-time sample, default is 0 (the in-time sample) |
We return the linearized sum since that is what most people want.
|
static |
header string if using to_csv