14#include <boost/serialization/access.hpp>
15#include <boost/serialization/vector.hpp>
65 std::vector<uint8_t> data;
68 uint8_t* desc_bytes =
reinterpret_cast<uint8_t*
>(&desc);
72 ts_desc.
size = data.size();
73 desc_.push_back(ts_desc);
74 data_.push_back(data);
88 std::vector<uint8_t>& this_data = data_[component];
92 uint8_t* desc_bytes =
reinterpret_cast<uint8_t*
>(&
descriptor);
105 this_desc.
size = this_data.size();
120 friend class
InputArchiveLoop<Timeslice, StorableTimeslice, ArchiveType::TimesliceArchive>;
123 template<class Archive>
124 void serialize(Archive& ar, const unsigned int )
126 ar & timeslice_descriptor_;
143 std::vector<std::vector<uint8_t>> data_;
144 std::vector<TimesliceComponentDescriptor> desc_;
The StorableMicroslice class contains the data of a single microslice.
The StorableTimeslice class contains the data of a single timeslice.
uint32_t append_component(uint64_t num_microslices, uint64_t=0)
Append a single component to fill using append_microslice.
friend class TimesliceSubscriber
uint64_t append_microslice(uint32_t component, uint64_t microslice, MicrosliceDescriptor descriptor, const uint8_t *content)
Append a single microslice using given descriptor and content.
friend class boost::serialization::access
uint64_t append_microslice(uint32_t component, uint64_t microslice, StorableMicroslice &m)
Append a single microslice object.
StorableTimeslice(uint32_t num_core_microslices, uint64_t index=UINT64_MAX, uint64_t ts_pos=UINT64_MAX)
Construct and initialize empty timeslice to fill using append_component.
The Timeslice class provides read access to the data of a timeslice.
uint64_t num_components() const
Retrieve the number of components (contributing input channels).
uint64_t num_microslices(uint64_t component) const
Retrieve the total number of microslices.
const MicrosliceDescriptor & descriptor(uint64_t component, uint64_t microslice) const
Retrieve the descriptor of a given microslice.
const uint8_t * content(uint64_t component, uint64_t microslice) const
Retrieve a pointer to the data content of a given microslice.
TimesliceDescriptor timeslice_descriptor_
The timeslice descriptor.
std::vector< uint8_t * > data_ptr_
A vector of pointers to the data content, one per timeslice component.
uint64_t num_core_microslices() const
Retrieve the number of core microslices.
std::vector< TimesliceComponentDescriptor * > desc_ptr_
A vector of pointers to the microslice descriptors, one per timeslice component.
uint64_t index() const
Retrieve the timeslice index.
Defines the fles::ArchiveDescriptor class.
Defines the fles::StorableMicroslice class.
Defines the fles::Timeslice abstract base class.
ArchiveType
The archive type enum (e.g., timeslice, microslice)
Microslice descriptor struct.
uint32_t size
Content size (bytes)
uint64_t offset
Offset in event buffer (bytes)
Timeslice component descriptor struct.
uint64_t ts_num
Timeslice index.
uint64_t num_microslices
Number of microslices.
uint64_t size
Size (in bytes) of corresponding data.
uint64_t offset
Start offset (in bytes) of corresponding data.
uint64_t index
Global index of this timeslice.
uint32_t num_core_microslices
Number of core microslices.
uint64_t ts_pos
Start offset (in items) of this timeslice.
uint32_t num_components
Number of components (contributing input channels)