![]() |
Project
|
#include <boost/test/tools/old/interface.hpp>
#include <sstream>
#include "DigitFileFormat.h"
#include <boost/test/unit_test.hpp>
#include <boost/test/data/test_case.hpp>
#include "DigitIO.h"
#include <algorithm>
#include <fmt/format.h>
#include <fstream>
#include "DataFormatsMCH/Digit.h"
#include "DataFormatsMCH/ROFRecord.h"
#include <cassert>
#include <array>
#include <stdexcept>
#include "DigitSamplerImpl.h"
#include "IO.h"
Go to the source code of this file.
Classes | |
struct | TF |
Macros | |
#define | BOOST_TEST_MODULE Test MCHWorkflow DigitsIO |
#define | BOOST_TEST_MAIN |
#define | BOOST_TEST_DYN_LINK |
Functions | |
DigitFileFormat | createFormat (uint8_t fileVersion, uint8_t digitVersion, uint8_t digitSize, uint8_t rofVersion, uint8_t rofSize, bool run2ids, bool hasRof) |
BOOST_AUTO_TEST_CASE (DigitFileFormatV0Value) | |
BOOST_AUTO_TEST_CASE (DigitFileFormatV1Value) | |
BOOST_AUTO_TEST_CASE (DigitFileFormatV2Value) | |
BOOST_AUTO_TEST_CASE (DigitFileFormatV3Value) | |
BOOST_AUTO_TEST_CASE (DigitFileFormatV4Value) | |
BOOST_DATA_TEST_CASE (WriteMustReturnFalseIfDigitVectorIsEmpty, digitFileFormats, digitFileFormat) | |
BOOST_DATA_TEST_CASE (BinaryWriteMustReturnFalseIfRofVectorIsEmpty, digitFileFormats, digitFileFormat) | |
BOOST_AUTO_TEST_CASE (DefaultFormatIsTheTag) | |
BOOST_DATA_TEST_CASE (ReaderMustIdentifyFileFormat, digitFileFormats, digitFileFormat) | |
BOOST_DATA_TEST_CASE (BinaryWriterMustTagCorrectly, digitFileFormats, digitFileFormat) | |
std::vector< o2::mch::Digit > | createDummyFixedDigits (int n) |
TF | createDummyData (int ndigits, int nrofs, uint32_t firstOrbit) |
void | writeTestData (std::ostream &out, DigitFileFormat dff) |
BOOST_DATA_TEST_CASE (TestDataDump, digitFileFormats, digitFileFormat) | |
BOOST_DATA_TEST_CASE (TestDataIsOfExpectedFormat, digitFileFormats, digitFileFormat) | |
BOOST_DATA_TEST_CASE (TestDataHasExpectedNofROFs, digitFileFormats, digitFileFormat) | |
BOOST_DATA_TEST_CASE (TestDataHasExpectedNofTFs, digitFileFormats, digitFileFormat) | |
BOOST_DATA_TEST_CASE (TestDataHasExpectedNumberOfDigitsWhenReading, digitFileFormats, digitFileFormat) | |
BOOST_DATA_TEST_CASE (TestDataHasExpectedNumberOfDigitsWhenCounting, digitFileFormats, digitFileFormat) | |
BOOST_DATA_TEST_CASE (CheckReader, digitFileFormats, digitFileFormat) | |
Variables | |
constexpr int | NROF_1 = 1 |
constexpr int | NROF_2 = 1 |
constexpr int | NROF_3 = 1 |
constexpr int | NROF_4 = 3 |
constexpr int | NROFS = NROF_1 + NROF_2 + NROF_3 + NROF_4 |
std::vector< TF > | testData |
#define BOOST_TEST_DYN_LINK |
Definition at line 17 of file testDigitIO.cxx.
#define BOOST_TEST_MAIN |
Definition at line 16 of file testDigitIO.cxx.
#define BOOST_TEST_MODULE Test MCHWorkflow DigitsIO |
Definition at line 15 of file testDigitIO.cxx.
BOOST_AUTO_TEST_CASE | ( | DefaultFormatIsTheTag | ) |
Definition at line 121 of file testDigitIO.cxx.
BOOST_AUTO_TEST_CASE | ( | DigitFileFormatV0Value | ) |
Definition at line 55 of file testDigitIO.cxx.
BOOST_AUTO_TEST_CASE | ( | DigitFileFormatV1Value | ) |
Definition at line 61 of file testDigitIO.cxx.
BOOST_AUTO_TEST_CASE | ( | DigitFileFormatV2Value | ) |
Definition at line 67 of file testDigitIO.cxx.
BOOST_AUTO_TEST_CASE | ( | DigitFileFormatV3Value | ) |
Definition at line 73 of file testDigitIO.cxx.
BOOST_AUTO_TEST_CASE | ( | DigitFileFormatV4Value | ) |
Definition at line 79 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | BinaryWriteMustReturnFalseIfRofVectorIsEmpty | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 104 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | BinaryWriterMustTagCorrectly | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 137 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | CheckReader | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 275 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | ReaderMustIdentifyFileFormat | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 127 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | TestDataDump | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 210 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | TestDataHasExpectedNofROFs | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 229 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | TestDataHasExpectedNofTFs | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 238 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | TestDataHasExpectedNumberOfDigitsWhenCounting | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 266 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | TestDataHasExpectedNumberOfDigitsWhenReading | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 251 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | TestDataIsOfExpectedFormat | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 220 of file testDigitIO.cxx.
BOOST_DATA_TEST_CASE | ( | WriteMustReturnFalseIfDigitVectorIsEmpty | , |
digitFileFormats | , | ||
digitFileFormat | |||
) |
Definition at line 85 of file testDigitIO.cxx.
Definition at line 166 of file testDigitIO.cxx.
std::vector< o2::mch::Digit > createDummyFixedDigits | ( | int | n | ) |
Definition at line 145 of file testDigitIO.cxx.
DigitFileFormat createFormat | ( | uint8_t | fileVersion, |
uint8_t | digitVersion, | ||
uint8_t | digitSize, | ||
uint8_t | rofVersion, | ||
uint8_t | rofSize, | ||
bool | run2ids, | ||
bool | hasRof | ||
) |
Definition at line 36 of file testDigitIO.cxx.
void writeTestData | ( | std::ostream & | out, |
DigitFileFormat | dff | ||
) |
Definition at line 200 of file testDigitIO.cxx.
|
constexpr |
The test data is used to check the internal consistency of the reader and writer (i.e. data written by the writer must be readable by the reader). A complete test requires, in addition, the usage of externally created data (see for instance V0File in testDigitIOV0)
Definition at line 187 of file testDigitIO.cxx.
|
constexpr |
Definition at line 188 of file testDigitIO.cxx.
|
constexpr |
Definition at line 189 of file testDigitIO.cxx.
|
constexpr |
Definition at line 190 of file testDigitIO.cxx.
Definition at line 191 of file testDigitIO.cxx.
std::vector<TF> testData |
Definition at line 193 of file testDigitIO.cxx.