8 #include <ecl/dataobjects/ECLWaveforms.h>
9 #include <ecl/digitization/ECLCompress.h>
10 #include <gtest/gtest.h>
28 EXPECT_EQ(q.getStore().size(), 0);
35 vector<unsigned int> t(N);
38 EXPECT_EQ(q.getStore().size(), N);
48 EXPECT_EQ(q.getPos(), 0);
49 EXPECT_EQ(q.getStore().size(), 1);
53 EXPECT_EQ(q2.getPos(), 0);
54 EXPECT_EQ(q2.getStore().size(), N);
63 for (
unsigned int i = 0; i < 32; i++) {
64 unsigned int k = 1u << i;
67 EXPECT_EQ(q.getPos(), 528);
69 for (
unsigned int i = 0; i < 32; i++) {
70 unsigned int k0 = 1u << i, k = q.getNBits(i + 1);
73 EXPECT_EQ(q.getPos(), 528);
77 for (
unsigned int i = 0; i < 32; i++) {
78 unsigned int k0 = 1u << i, k = q.getNBits(i + 1);
81 EXPECT_EQ(q.getPos(), 528);
93 for (
int off = 0; off < 32; ++off) {
98 for (
int i = 0; i < 31; i++) A[i] = 4000 + ((i % 2) * 1000 - 500);
104 for (
int i = 0; i < 31; i++) EXPECT_EQ(A[i], B[i]);
117 for (
int off = 0; off < 32; ++off) {
122 for (
int i = 0; i < 31; i++) A[i] = 4000 + ((i % 2) * 1000 - 500);
128 for (
int i = 0; i < 31; i++) EXPECT_EQ(A[i], B[i]);
138 width_t widths_phs2_scale10[] = {
172 ECLDCTCompress q(1, 3500, widths_phs2_scale10);
175 for (
int off = 0; off < 1; ++off) {
180 for (
int i = 0; i < 31; i++) A[i] = 4000 + ((i % 2) * 1000 - 500);
186 for (
int i = 0; i < 31; i++) EXPECT_NEAR(A[i], B[i], 10);
Declare ECLBaseCompress test.
ECL waveform compression/decompression to/from the BitStream storage with the BASE algorithm.
Declare ECLDCTCompress test.
Declare ECLDeltaCompress test.
ECL waveform compression/decompression to/from the BitStream storage with the DELTA algorithm.
TEST_F(GlobalLabelTest, LargeNumberOfTimeDependentParameters)
Test large number of time-dep params for registration and retrieval.
Abstract base class for different kinds of events.
Bit widths for the prefix coding to encode integers which are mainly concentrated around zero and pro...