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) {
39 rangeSet.insert(ranges);
42 if (rangeSet.size() != 1)
43 throw std::runtime_error(
"Links are not aligned!");
45 std::vector<PacketRange> pr = *(rangeSet.begin());
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);
80 std::vector<PacketRange>
ranges;
83 for (
size_t i(0);
i < data.size(); ++
i) {
92 if (not((x >> 32) & 1)) {
95 ranges.push_back(std::make_pair(
begin, end));
101 if (v && (
begin != -1)) {
102 end = data.size() - 1;
103 ranges.push_back(std::make_pair(
begin, end));
virtual ~MP7PacketReader()
const_iterator end()
vector's end iterator
std::vector< PacketData > buffers_
MP7PacketReader(const std::string &path, uint32_t striphdr=0, uint32_t stripftr=0, uint32_t ikey=0)
LinkMap::const_iterator begin() const
size_t size() const
number of rawdata objects stored
std::vector< Packet > packets_
const_iterator end() const
LinkMap::const_iterator const_iterator
unsigned long long uint64_t
const_iterator begin() const
const std::string & name() const
LinkMap::const_iterator end() const
char data[epos_bytes_allocation]
std::vector< FileData >::const_iterator const_iterator
expose vector's const iterator
const std::vector< uint64_t > & link(uint32_t i) const
static std::vector< PacketRange > findPackets(std::vector< uint64_t > data)
bool valid() const
reader status. valid() == 1 indicates that data was successfully read from file
const_iterator begin()
vector's begin iterator