pflib v3.9.4-7-gb2e7f4f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
MultiSampleECONDEventPacket.h
1#pragma once
2
3#include "pflib/packing/ECONDEventPacket.h"
4#include "pflib/packing/Reader.h"
5
6namespace pflib::packing {
7
21 mutable ::pflib::logging::logger the_log_{::pflib::logging::get("decoding")};
24
25 public:
43 uint64_t timestamp;
45 const ECONDEventPacket& soi() const;
49 MultiSampleECONDEventPacket(int n_links);
51 void from(std::span<uint32_t> data, bool expect_ldmx_ror_header = false);
53 Reader& read(Reader& r);
54
57
59 void to_csv(std::ofstream& f) const;
60};
61
62} // namespace pflib::packing
Single ECON-D event packet.
Definition ECONDEventPacket.h:30
Unpack an event that has potentially more than one sample collected from a single ECOND.
Definition MultiSampleECONDEventPacket.h:19
int subsys_id
subsystem ID
Definition MultiSampleECONDEventPacket.h:41
Reader & read(Reader &r)
read into this structure from the input Reader
Definition MultiSampleECONDEventPacket.cxx:127
int n_links_
number of links connected to the ECOND
Definition MultiSampleECONDEventPacket.h:23
void from(std::span< uint32_t > data, bool expect_ldmx_ror_header=false)
unpack the given data into this structure
Definition MultiSampleECONDEventPacket.cxx:42
std::vector< ECONDEventPacket > samples
samples from ECOND stored in order of transmission
Definition MultiSampleECONDEventPacket.h:47
mutable::pflib::logging::logger the_log_
handle to logging source
Definition MultiSampleECONDEventPacket.h:21
int econd_id
ID for this econ.
Definition MultiSampleECONDEventPacket.h:37
static const std::string to_csv_header
header string if using to_csv
Definition MultiSampleECONDEventPacket.h:56
const ECONDEventPacket & soi() const
get the sample of interest
Definition MultiSampleECONDEventPacket.cxx:168
uint64_t timestamp
timestamp from RoR
Definition MultiSampleECONDEventPacket.h:43
void to_csv(std::ofstream &f) const
write out all of the samples into the input CSV file
Definition MultiSampleECONDEventPacket.cxx:15
int contrib_id
contributor ID
Definition MultiSampleECONDEventPacket.h:39
std::size_t i_soi
Corruption bits.
Definition MultiSampleECONDEventPacket.h:35
MultiSampleECONDEventPacket(int n_links)
constructor defining how many links are connected to this ECOND
Definition MultiSampleECONDEventPacket.cxx:8
Reading a raw data stream with some underlying backend.
Definition Reader.h:19
logger get(const std::string &name)
Gets a logger with the input name for its channel.
Definition Logging.cxx:24