Go to the documentation of this file.
9 : reader_(
path), header_(striphdr), footer_(stripftr), ikey_(ikey) {
35 std::set<std::vector<PacketRange> > rangeSet;
37 for (
size_t k(0);
k < raw.
size(); ++
k) {
42 if (rangeSet.size() != 1)
43 throw std::runtime_error(
"Links are not aligned!");
45 std::vector<PacketRange>
pr = *(rangeSet.begin());
51 data.packets_.reserve(
pr.size());
54 for (
auto const&
p :
pr) {
64 for (; lIt != raw.
end(); ++lIt) {
66 pkt.
links_[lIt->first] = std::vector<uint32_t>(lIt->second.begin() +
p.first +
header_,
67 lIt->second.begin() +
p.second -
footer_ + 1);
72 data.packets_.push_back(pkt);
80 std::vector<PacketRange>
ranges;
83 for (
size_t i(0);
i <
data.size(); ++
i) {
92 if (not((
x >> 32) & 1)) {
static std::vector< PacketRange > findPackets(std::vector< uint64_t > data)
const std::string & name() const
virtual ~MP7PacketReader()
size_t size() const
number of rawdata objects stored
const std::vector< uint64_t > & link(uint32_t i) const
std::vector< PacketData > buffers_
LinkMap::const_iterator const_iterator
bool valid() const
reader status. valid() == 1 indicates that data was successfully read from file
LinkMap::const_iterator begin() const
LinkMap::const_iterator end() const
const_iterator end()
vector's end iterator
std::vector< FileData >::const_iterator const_iterator
expose vector's const iterator
MP7PacketReader(const std::string &path, uint32_t striphdr=0, uint32_t stripftr=0, uint32_t ikey=0)
char data[epos_bytes_allocation]
unsigned long long uint64_t
const_iterator begin()
vector's begin iterator
const_iterator end() const
const_iterator begin() const