test_persist_responses.cxx
Go to the documentation of this file.
2 #include "WireCellUtil/ExecMon.h"
3 #include <iostream>
4 using namespace std;
5 
6 
7 int main(int argc, const char* argv[])
8 {
9 
10  if (argc < 2) {
11  cerr << "This test requires an Wire Cell Field Response input file." << endl;
12  return 0;
13  }
14 
15  WireCell::ExecMon em("test_persist_responses");
16  auto fr = WireCell::Response::Schema::load(argv[1]);
17  em("loaded");
18 
19  em("loop");
20  cerr << fr.planes.size() << " planes" << endl;
21  for (auto plane : fr.planes) {
22  cerr << "\t" << plane.planeid << ": " << plane.paths.size() << " paths" << endl;
23  for (auto path : plane.paths) {
24  cerr << "\t\t" << path.current.size() << " samples\n\t\t";
25  for (auto c : path.current) {
26  cerr << c << " ";
27  }
28  cerr << endl;
29  break;
30  }
31  }
32  cerr << em.summary() << endl;
33  // with -ggdb3: size=133936K, res=105216K about the same with opt.
34  return 0;
35 }
STL namespace.
FieldResponse load(const char *filename)
Definition: Response.cxx:39
int main(int argc, const char *argv[])
std::string summary() const
Return summary up to now.
Definition: ExecMon.cxx:21
QTextStream & endl(QTextStream &s)