|
pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
|
A single DAQ 32-bit sample. More...
#include <Sample.h>
Public Member Functions | |
| bool | Tc () const |
| bool | Tp () const |
| int | toa () const |
| int | adc_tm1 () const |
| int | adc () const |
| int | tot () const |
| void | to_csv (std::ofstream &f) const |
| Write out the Sample as a row in the CSV. | |
| void | from_unpacked (bool Tc, bool Tp, int adc_tm1, int main_sample, int toa) |
| Construct the packed sample word given the unpacked sample values. | |
Public Attributes | |
| uint32_t | word |
Static Public Attributes | |
| static const std::string | to_csv_header = "Tp,Tc,adc_tm1,adc,tot,toa" |
| header if using to_csv | |
A single DAQ 32-bit sample.
The 32-bit word is stored in memory and then decoded upon request in order to save memory space. Only some of the values are present within the word depending on the flags Tp and Tc at the beginning of the word, so if a value returns -1, that value is not present in the word.
| void pflib::packing::Sample::from_unpacked | ( | bool | Tc, |
| bool | Tp, | ||
| int | adc_tm1, | ||
| int | main_sample, | ||
| int | toa ) |
Construct the packed sample word given the unpacked sample values.
No overflow checks are made since this (should) only be used within the ECOND unpacking infrastructure where the values are known to be limited to 10 bits already.
We assume that negative values have been zero-suppressed by the ECON-D and thus should be represented by a value of zero.
| void pflib::packing::Sample::to_csv | ( | std::ofstream & | f | ) | const |
Write out the Sample as a row in the CSV.
No newline is included in case other columns wish to be added. If you don't want to include all seven of these columns, you can write your own method.