12 #include <boost/circular_buffer.hpp>
36 std::vector<short> &uncompressed,
40 std::vector<short> &uncompressed,
44 void Compress(std::vector<short> &adc,
46 int &nearestneighbor);
47 void Compress(std::vector<short> &adc,
49 unsigned int &zerothreshold,
50 int &nearestneighbor);
51 void Compress(std::vector<short> &adc,
53 unsigned int &zerothreshold,
56 bool fADCStickyCodeFeature=
false);
70 void Compress(std::vector<short> &adc,
72 void Compress(std::vector<short> &adc,
74 unsigned int &zerothreshold);
76 void Compress(
const boost::circular_buffer<std::vector<short>> &adcvec_neighbors,
77 std::vector<short> &adc,
79 unsigned int &zerothreshold,
80 int &nearestneighbor);
82 void Compress(
const boost::circular_buffer<std::vector<short>> &adcvec_neighbors,
83 std::vector<short> &adc,
85 unsigned int &zerothreshold,
88 bool fADCStickyCodeFeature=
false);
93 std::vector<short> &uncompressed);
102 std::vector<short> &uncompressed,
103 std::function<
int(std::vector<bool>&)> decode_table_chunk=
fibonacci_decode);
107 unsigned int &zerothreshold,
108 int &nearestneighbor);
111 unsigned int &zerothreshold,
113 int &nearestneighbor,
114 bool fADCStickyCodeFeature=
false);
118 unsigned int &zerothreshold);
120 void ZeroSuppression(
const boost::circular_buffer<std::vector<short>> &adcvec_neighbors,
121 std::vector<short> &adc,
122 unsigned int &zerothreshold,
123 int &nearestneighbor);
125 void ZeroSuppression(
const boost::circular_buffer<std::vector<short>> &adcvec_neighbors,
126 std::vector<short> &adc,
127 unsigned int &zerothreshold,
129 int &nearestneighbor,
130 bool fADCStickyCodeFeature=
false);
133 std::vector<short> &uncompressed);
136 std::vector<short> &uncompressed,
143 bool fADCStickyCodeFeature);
147 #endif // RAWDATA_RAW_H
void CompressHuffman(std::vector< short > &adc)
enum raw::_compress Compress_t
void UncompressHuffman(const std::vector< short > &adc, std::vector< short > &uncompressed)
const unsigned int onemask
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
int ADCStickyCodeCheck(const short adc_value, const int pedestal, bool fADCStickyCodeFeature)
void fibonacci_encode_table(int end, std::vector< std::vector< bool >> &table)
auto end(FixedBins< T, C > const &) noexcept
void ZeroUnsuppression(const std::vector< short > &adc, std::vector< short > &uncompressed)
void UncompressFibonacci(const std::vector< short > &adc, std::vector< short > &uncompressed, std::function< int(std::vector< bool > &)> decode_table_chunk)
void CompressFibonacci(std::vector< short > &wf, std::function< void(int, std::vector< std::vector< bool >> &)> add_to_table)
void Compress(std::vector< short > &adc, raw::Compress_t compress)
Compresses a raw data buffer.
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
void ZeroSuppression(std::vector< short > &adc, unsigned int &zerothreshold)
short fibonacci_decode(std::vector< bool > &chunk)