pflib v3.14.3-4-g3289bd3
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
9class SingleECONDRocErxMapping;
10
24 mutable ::pflib::logging::logger the_log_{::pflib::logging::get("decoding")};
27
28 public:
29 /*
30 * Corruption bits
31 *
32 * Index | Description
33 * ------|------------
34 * 0 | full packet header flag mismatch
35 std::array<bool, 1> corruption;
36 */
37
47 uint64_t timestamp;
49 const ECONDEventPacket& soi() const;
53 MultiSampleECONDEventPacket(int n_links);
55 void from(std::span<uint32_t> data, bool expect_ldmx_ror_header = false);
57 Reader& read(Reader& r);
58
61
65
78 void to_csv(std::ofstream& f,
79 const SingleECONDRocErxMapping* mapping = nullptr) const;
80};
81
82} // 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:22
int subsys_id
subsystem ID
Definition MultiSampleECONDEventPacket.h:45
Reader & read(Reader &r)
read into this structure from the input Reader
Definition MultiSampleECONDEventPacket.cxx:134
int n_links_
number of links connected to the ECOND
Definition MultiSampleECONDEventPacket.h:26
void from(std::span< uint32_t > data, bool expect_ldmx_ror_header=false)
unpack the given data into this structure
Definition MultiSampleECONDEventPacket.cxx:69
static const std::string to_csv_header_with_mapping
header string if using MultiSampleECONDEventPacket::to_csv with an input mapping
Definition MultiSampleECONDEventPacket.h:64
std::vector< ECONDEventPacket > samples
samples from ECOND stored in order of transmission
Definition MultiSampleECONDEventPacket.h:51
mutable::pflib::logging::logger the_log_
handle to logging source
Definition MultiSampleECONDEventPacket.h:24
int econd_id
ID for this econ.
Definition MultiSampleECONDEventPacket.h:41
static const std::string to_csv_header
header string if using MultiSampleECONDEventPacket::to_csv
Definition MultiSampleECONDEventPacket.h:60
const ECONDEventPacket & soi() const
get the sample of interest
Definition MultiSampleECONDEventPacket.cxx:169
uint64_t timestamp
timestamp from RoR
Definition MultiSampleECONDEventPacket.h:47
void to_csv(std::ofstream &f, const SingleECONDRocErxMapping *mapping=nullptr) const
write out all of the samples into the input CSV file
Definition MultiSampleECONDEventPacket.cxx:21
int contrib_id
contributor ID
Definition MultiSampleECONDEventPacket.h:43
std::size_t i_soi
index of the sample of interest (SOI)
Definition MultiSampleECONDEventPacket.h:39
MultiSampleECONDEventPacket(int n_links)
constructor defining how many links are connected to this ECOND
Definition MultiSampleECONDEventPacket.cxx:10
Reading a raw data stream with some underlying backend.
Definition Reader.h:19
Mapping for link/channel IDs for single ECON-D collection.
Definition SingleECONDRocErxMapping.h:35
logger get(const std::string &name)
Gets a logger with the input name for its channel.
Definition Logging.cxx:24