6 #include <boost/algorithm/string.hpp> 7 #include <boost/regex.hpp> 25 LinkMap::const_iterator it =
links_.find(
i);
34 if (!
file_.is_open()) {
70 using namespace boost;
73 while (
file_.good()) {
93 std::vector<std::vector<uint64_t> > chans(
links.size(), std::vector<uint64_t>(
data.size()));
96 for (
size_t i(0);
i <
links.size(); ++
i) {
97 for (
size_t j(0);
j <
data.size(); ++
j) {
103 for (
size_t i(0);
i <
links.size(); ++
i) {
104 s.links_.insert(std::make_pair(
links[
i], chans[
i]));
159 std::vector<std::string> tokens;
164 boost::split(tokens,
tmp, boost::is_any_of(
" \t"), boost::token_compress_on);
166 std::vector<uint32_t>
links;
168 return std::stoul(
str);
172 throw std::logic_error(
"Unexpected line found!");
175 throw std::logic_error(
"No list of links found");
181 throw std::logic_error(
"Token '" +
token +
"' doesn't match the valid format");
185 value += std::stoul(what[2].
str(),
nullptr, 16);
193 std::vector<std::vector<uint64_t> >
data;
194 int place =
file_.tellg();
204 uint32_t
n = std::stoul(what[1].
str());
206 if (
n !=
data.size()) {
207 std::stringstream
ss;
208 ss <<
"Frame misalignment! (expected " <<
data.size() <<
" found " <<
n;
209 throw std::logic_error(
ss.str());
211 std::vector<std::string> tokens;
214 boost::split(tokens,
tmp, boost::is_any_of(
" \t"), boost::token_compress_on);
216 std::vector<uint64_t> row;
222 place =
file_.tellg();
static boost::regex reBoard_
const std::vector< uint64_t > & link(uint32_t i) const
const std::string & path() const
source file path
static boost::regex reFrame_
static void trim(std::string &s)
std::vector< std::vector< uint64_t > > readRows()
Log< level::Error, false > LogError
static const uint16_t valid_
static boost::regex reLink_
MP7FileReader(const std::string &path)
def split(sequence, size)
static uint64_t validStrToUint64(const std::string &token)
static boost::regex reQuadChan_
unsigned long long uint64_t
std::vector< FileData > buffers_
char data[epos_bytes_allocation]
static boost::regex reValid_
const FileData & get(size_t k) const
data getter via index
std::vector< std::string > names() const
raw data name collector
std::vector< uint32_t > searchLinks()
std::string searchBoard()