6 #include <boost/algorithm/string.hpp>
13 std::vector< std::vector < int > > MWRData::unpackMWR(std::string packed_data, std::vector<double> &time_stamp,
double timeoffset)
const
16 std::vector<std::vector<int> > unpacked_data;
17 unpacked_data.resize(4);
20 std::vector<std::string>
row(0);
21 boost::split(row, packed_data, boost::is_any_of(
","));
22 if (row.size()==447) {
23 for (
int i=3;i<447;i++) {
24 data[i-3]=atoi(row[i].c_str());
26 string devname=row[1].substr(0,8);
27 for (
int idev=0;idev<4;idev++) {
30 for (
int ich=0;ich<48;ich++) {
31 unpacked_data[idev].push_back(mwr.
hor[ich]);
33 for (
int ich=0;ich<48;ich++) {
34 unpacked_data[idev].push_back(mwr.
ver[ich]);
38 cout <<
"BeamSpillInfoRetriever: MRWData: Bad data!"<<endl;
49 memcpy(&mwrdata.
hor, data+nblock*111, 96);
50 memcpy(&mwrdata.
ver, data+nblock*111+48, 96);
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
BEGIN_PROLOG could also be cout