3 #include <boost/foreach.hpp>
37 std::set< std::vector<PacketRange > > rangeSet;
39 for(
size_t k(0);
k<raw.
size(); ++
k) {
41 rangeSet.insert(ranges);
44 if ( rangeSet.size() != 1 )
45 throw std::runtime_error(
"Links are not aligned!");
47 std::vector<PacketRange > pr = *(rangeSet.begin());
67 for( ; lIt != raw.
end(); ++lIt ) {
69 pkt.
links_[lIt->first] = std::vector<uint32_t>(
70 lIt->second.begin() + p.first +
header_,
71 lIt->second.begin() + p.second -
footer_ + 1
86 std::vector<PacketRange>
88 std::vector<PacketRange>
ranges;
91 for (
size_t i(0);
i < data.size(); ++
i) {
100 if ( not ((x >> 32 ) & 1 ) ) {
103 ranges.push_back(std::make_pair(
begin,end) );
109 if ( v && (
begin != -1 ) ) {
111 ranges.push_back(std::make_pair(
begin,end) );
virtual ~MP7PacketReader()
const_iterator end()
vector's end iterator
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
std::pair< uint32_t, uint32_t > PacketRange
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)
MP7PacketReader(const std::string &path, uint32_t striphdr=0, uint32_t stripftr=0)
bool valid() const
reader status. valid() == 1 indicates that data was successfully read from file
const_iterator begin()
vector's begin iterator