pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
Sample.h
1#pragma once
2
3#include <cstdint>
4#include <fstream>
5
6namespace pflib::packing {
7
17struct Sample {
18 uint32_t word;
19 bool Tc() const;
20 bool Tp() const;
21 int toa() const;
22 int adc_tm1() const;
23 int adc() const;
24 int tot() const;
36 void to_csv(std::ofstream& f) const;
44 void from_unpacked(bool Tc, bool Tp, int adc_tm1, int main_sample, int toa);
45};
46
47} // namespace pflib::packing
A single DAQ 32-bit sample.
Definition Sample.h:17
void to_csv(std::ofstream &f) const
Write out the Sample as a row in the CSV.
Definition Sample.cxx:41
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.
Definition Sample.cxx:46
static const std::string to_csv_header
header if using to_csv
Definition Sample.h:26