test_chirping.cxx
Go to the documentation of this file.
3 #include "WireCellUtil/Testing.h"
4 
5 #include <iostream>
6 #include <string>
7 
8 
9 // provides vectors "horig" and "hfilt"
10 // generate like:
11 // $ dump-root-hist-to-waveform sigproc/test/example-chirp.root horig hfilt > sigproc/test/example-chirp.h
12 #include <vector>
13 #include "example-chirping.h"
14 
15 using namespace std;
16 
17 using namespace WireCell;
18 using namespace WireCell::SigProc;
19 
20 int main(int argc, char* argv[])
21 {
22  int beg=-1, end=-1;
23  Diagnostics::Chirp chirp;
24  bool found = chirp(horig, beg, end);
25  Assert(found);
26 
27  // the function should find something starting at the beginning.
28  Assert(beg == 0);
29  Assert(end == 3720);
30  return 0;
31 }
32 // Local Variables:
33 // mode: c++
34 // c-basic-offset: 4
35 // End:
std::vector< float > horig
Definition: example-chirp.h:1
STL namespace.
int main(int argc, char *argv[])
#define Assert
Definition: Testing.h:7
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:72
Definition: Main.h:22