36 std::set< std::vector<PacketRange > > rangeSet;
38 for(
size_t k(0);
k<raw.
size(); ++
k) {
40 rangeSet.insert(ranges);
43 if ( rangeSet.size() != 1 )
44 throw std::runtime_error(
"Links are not aligned!");
46 std::vector<PacketRange >
pr = *(rangeSet.begin());
55 for(
auto const&
p : pr) {
66 for( ; lIt != raw.
end(); ++lIt ) {
68 pkt.
links_[lIt->first] = std::vector<uint32_t>(
69 lIt->second.begin() +
p.first +
header_,
70 lIt->second.begin() +
p.second -
footer_ + 1
85 std::vector<PacketRange>
87 std::vector<PacketRange>
ranges;
90 for (
size_t i(0);
i < data.size(); ++
i) {
99 if ( not ((x >> 32 ) & 1 ) ) {
102 ranges.push_back(std::make_pair(
begin,end) );
108 if ( v && (
begin != -1 ) ) {
110 ranges.push_back(std::make_pair(
begin,end) );
virtual ~MP7PacketReader()
const_iterator end()
vector's end iterator
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_
std::vector< PacketData > buffers_
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