ldas-tools-framecpp 2.7.0
|
#include <sys/types.h>
#include <dirent.h>
#include <stdarg.h>
#include <unistd.h>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <sstream>
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/test/included/unit_test.hpp>
#include "ldastoolsal/unordered_map.hh"
#include "ldastoolsal/regex.hh"
#include "ldastoolsal/regexmatch.hh"
#include "framecpp/Common/Compression.hh"
#include "framecpp/Common/CompressionDifferential.hh"
#include "framecpp/Common/CompressionZeroSuppress.hh"
#include "framecpp/Dimension.hh"
#include "framecpp/FrameH.hh"
#include "framecpp/FrAdcData.hh"
#include "framecpp/FrRawData.hh"
#include "framecpp/FrVect.hh"
#include "framecpp/IFrameStream.hh"
#include "framecpp/OFrameStream.hh"
Namespaces | |
namespace | anonymous_namespace{compression.cc} |
Macros | |
#define | EnableFrameL(a) |
#define | TEST_FILE_COMPARISON 1 |
#define | TEST_BUILDING_BLOCKS 1 |
#define | TEST_RAW 1 |
#define | TEST_GZIP 1 |
#define | TEST_DIFF_GZIP 1 |
#define | TEST_ZERO_SUPPRESS_SHORT 1 |
#define | TEST_ZERO_SUPPRESS_INT_FLOAT 1 |
#define | TEST_ZERO_SUPPRESS_OTHERWISE_GZIP 1 |
#define | PROBLEM_CASES 1 |
#define | TEST_GZIP_LEVEL_MIN 1 |
#define | TEST_GZIP_LEVEL_MAX 9 |
#define | TEST_DIFF_GZIP_LEVEL_MIN 1 |
#define | TEST_DIFF_GZIP_LEVEL_MAX 9 |
#define | BOOST_TEST_MAIN |
#define | FL_DATA_TYPE(A, B) |
#define | METHOD(A) |
#define | DATA_TYPE(A, B) |
Typedefs | |
typedef FrameCPP::Common::FrameBuffer< filebuf > | FrameBuffer |
typedef FrameCPP::Compression::output_type | data_type |
typedef ::data_type | anonymous_namespace{compression.cc}::zero_suppress_data_type |
typedef INT_8U | anonymous_namespace{compression.cc}::nBytes_type |
Functions | |
bool | DUMP_DATA () |
static const GPSTime | FrameStart (6000000, 0) |
void | anonymous_namespace{compression.cc}::message_line () |
template<class T > | |
std::string | anonymous_namespace{compression.cc}::data_name_type () |
std::string | anonymous_namespace{compression.cc}::method (const FrameCPP::FrVect::compression_scheme_type Method) |
template<typename T > | |
std::string | anonymous_namespace{compression.cc}::canonical (T Data) |
template<> | |
std::string | anonymous_namespace{compression.cc}::canonical< CHAR > (CHAR Data) |
template<> | |
std::string | anonymous_namespace{compression.cc}::canonical< CHAR_U > (CHAR_U Data) |
template<> | |
std::string | anonymous_namespace{compression.cc}::canonical< INT_2U > (INT_2U Data) |
template<> | |
std::string | anonymous_namespace{compression.cc}::canonical< INT_4U > (INT_4U Data) |
template<> | |
std::string | anonymous_namespace{compression.cc}::canonical< INT_8U > (INT_8U Data) |
template<> | |
std::string | anonymous_namespace{compression.cc}::canonical< COMPLEX_8 > (COMPLEX_8 Data) |
template<> | |
std::string | anonymous_namespace{compression.cc}::canonical< COMPLEX_16 > (COMPLEX_16 Data) |
template<typename T > | |
void | anonymous_namespace{compression.cc}::gen_test_names (FrameCPP::FrVect::compression_scheme_type Method, INT_2U Level, const T Start, const T End, const T Inc, INT_4U Samples, const wave_form_type WaveForm, std::ostringstream &TestName, std::ostringstream &ChannelName) |
template<class T > | |
void | anonymous_namespace{compression.cc}::ZeroSuppressCompress (zero_suppress_data_type &Data, INT_8U &NBytes, INT_4U NData) |
template<> | |
void | anonymous_namespace{compression.cc}::ZeroSuppressCompress< INT_2S > (zero_suppress_data_type &Data, INT_8U &NBytes, INT_4U NData) |
template<> | |
void | anonymous_namespace{compression.cc}::ZeroSuppressCompress< INT_4S > (zero_suppress_data_type &Data, INT_8U &NBytes, INT_4U NData) |
template<class T > | |
void | anonymous_namespace{compression.cc}::ZeroSuppressUncompress (zero_suppress_data_type &Data, INT_8U &NBytes, INT_4U NData) |
template<> | |
void | anonymous_namespace{compression.cc}::ZeroSuppressUncompress< INT_2S > (zero_suppress_data_type &Data, INT_8U &NBytes, INT_4U NData) |
template<> | |
void | anonymous_namespace{compression.cc}::ZeroSuppressUncompress< INT_4S > (zero_suppress_data_type &Data, INT_8U &NBytes, INT_4U NData) |
template<typename T , typename UT > | |
void | anonymous_namespace{compression.cc}::ZeroSuppress () |
template<class T > | |
void | anonymous_namespace{compression.cc}::Differential () |
template<class T > | |
void | compress_base (const std::string &TestName, FrameCPP::FrVect::compression_scheme_type Method, INT_2U Level, T *Data, INT_4U Samples, FrameCPP::FrVect::compression_scheme_type OutputMethod, const std::string &ChannelName) |
template<class T > | |
void | compress (FrameCPP::FrVect::compression_scheme_type Method, INT_2U Level, const T Start, const T End, const T Inc, INT_4U Samples, waveform_compression OutputMethod, int cycles=4) |
template<typename T > | |
void | compress (FrameCPP::FrVect::compression_scheme_type Method, INT_2U Level, T *Data, INT_4U Samples, FrameCPP::FrVect::compression_scheme_type OutputMethod, const char *ChannelName) |
template<class T > | |
void | compress (FrameCPP::FrVect::compression_scheme_type Method, INT_2U Level, const T Start, const T End, const T Inc, FrameCPP::FrVect::compression_scheme_type OutputMethod) |
template<class T > | |
void | compress (FrameCPP::FrVect::compression_scheme_type Method, INT_2U Level, const T Start, const T End, const T Inc, waveform_compression OutputMethod) |
BOOST_AUTO_TEST_CASE (frame_compression) | |
Variables | |
INT_2S | sc1 [256] |
REAL_4 | sc2 [] |
static std::ostringstream | FrameName |
static const REAL_8 | FrameDT = 1.0 |
static const INT_4S | FrameRun = -1 |
static const INT_4U | FrameNumber = 1 |
static const INT_4U | NBits = 16 |
static INT_4U | ChannelNumber = 1 |
static const char * | IFO = "Z1" |
static INT_2U | FrameSpecVersion = FRAME_SPEC_CURRENT |
static std::string | SystemType |
boost::shared_ptr< FrameCPP::FrameH > | Frame |
#define BOOST_TEST_MAIN |
#define DATA_TYPE | ( | A, | |
B | |||
) |
#define EnableFrameL | ( | a | ) |
#define FL_DATA_TYPE | ( | A, | |
B | |||
) |
#define METHOD | ( | A | ) |
#define PROBLEM_CASES 1 |
#define TEST_BUILDING_BLOCKS 1 |
#define TEST_DIFF_GZIP 1 |
#define TEST_DIFF_GZIP_LEVEL_MAX 9 |
#define TEST_DIFF_GZIP_LEVEL_MIN 1 |
#define TEST_FILE_COMPARISON 1 |
#define TEST_GZIP 1 |
#define TEST_GZIP_LEVEL_MAX 9 |
#define TEST_GZIP_LEVEL_MIN 1 |
#define TEST_RAW 1 |
#define TEST_ZERO_SUPPRESS_INT_FLOAT 1 |
#define TEST_ZERO_SUPPRESS_OTHERWISE_GZIP 1 |
#define TEST_ZERO_SUPPRESS_SHORT 1 |
typedef FrameCPP::Common::FrameBuffer< filebuf > FrameBuffer |
BOOST_AUTO_TEST_CASE | ( | frame_compression | ) |
|
inline |
void compress | ( | FrameCPP::FrVect::compression_scheme_type | Method, |
INT_2U | Level, | ||
const T | Start, | ||
const T | End, | ||
const T | Inc, | ||
INT_4U | Samples, | ||
waveform_compression | OutputMethod, | ||
int | cycles = 4 |
||
) |
|
inline |
void compress | ( | FrameCPP::FrVect::compression_scheme_type | Method, |
INT_2U | Level, | ||
T * | Data, | ||
INT_4U | Samples, | ||
FrameCPP::FrVect::compression_scheme_type | OutputMethod, | ||
const char * | ChannelName | ||
) |
void compress_base | ( | const std::string & | TestName, |
FrameCPP::FrVect::compression_scheme_type | Method, | ||
INT_2U | Level, | ||
T * | Data, | ||
INT_4U | Samples, | ||
FrameCPP::FrVect::compression_scheme_type | OutputMethod, | ||
const std::string & | ChannelName | ||
) |
|
inline |
|
static |
|
static |
boost::shared_ptr< FrameCPP::FrameH > Frame |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
INT_2S sc1[256] |
REAL_4 sc2[] |
|
static |