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);
171 throw std::logic_error(
"Unexpected line found!");
174 throw std::logic_error(
"No list of links found");
180 throw std::logic_error(
"Token '" +
token +
"' doesn't match the valid format");
184 value += std::stoul(what[2].
str(),
nullptr, 16);
192 std::vector<std::vector<uint64_t> >
data;
193 int place =
file_.tellg();
203 uint32_t
n = std::stoul(what[1].
str());
205 if (
n !=
data.size()) {
206 std::stringstream
ss;
207 ss <<
"Frame misalignment! (expected " <<
data.size() <<
" found " <<
n;
208 throw std::logic_error(
ss.str());
210 std::vector<std::string> tokens;
213 boost::split(tokens,
tmp, boost::is_any_of(
" \t"), boost::token_compress_on);
215 std::vector<uint64_t> row;
221 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()