10 #define BOOST_TEST_MODULE WaveformOperationsTest
11 #include <boost/test/unit_test.hpp>
20 using Sample_t =
signed short int;
25 constexpr NegOp op(+8000);
34 static_assert(NegOp::shiftBy(+8000, +1000) == +7000);
35 static_assert(NegOp::shiftBy(+8000, -1000) == +9000);
37 static_assert(NegOp::subtractBaseline(+7000, +8000) == +1000);
38 static_assert(NegOp::subtractBaseline(+9000, +8000) == -1000);
50 static_assert(!(NegOp::noLessThan (+8000, +7000)));
51 static_assert( (NegOp::noLessThan (+8000, +8000)));
52 static_assert( (NegOp::noLessThan (+8000, +9000)));
61 static_assert(op.shiftFromBaseline(+1000) == +7000);
62 static_assert(op.shiftFromBaseline(-1000) == +9000);
64 static_assert(op.subtractBaseline(+7000) == +1000);
65 static_assert(op.subtractBaseline(+9000) == -1000);
74 using Sample_t =
signed short int;
79 constexpr PosOp op(+8000);
88 static_assert(PosOp::shiftBy(+8000, +1000) == +9000);
89 static_assert(PosOp::shiftBy(+8000, -1000) == +7000);
91 static_assert(PosOp::subtractBaseline(+9000, +8000) == +1000);
92 static_assert(PosOp::subtractBaseline(+7000, +8000) == -1000);
104 static_assert( (PosOp::noLessThan (+8000, +7000)));
105 static_assert( (PosOp::noLessThan (+8000, +8000)));
106 static_assert(!(PosOp::noLessThan (+8000, +9000)));
115 static_assert(op.shiftFromBaseline(+1000) == +9000);
116 static_assert(op.shiftFromBaseline(-1000) == +7000);
118 static_assert(op.subtractBaseline(+9000) == +1000);
119 static_assert(op.subtractBaseline(+7000) == -1000);
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
bool greaterThan(CluLen c1, CluLen c2)
bool lessThan(CluLen c1, CluLen c2)