![]() |
Project
|
#include <boost/test/unit_test.hpp>
#include "Assertions.h"
#include "DetectorsRaw/RDHUtils.h"
#include "DumpBuffer.h"
#include "MCHRawCommon/DataFormats.h"
#include "MCHRawCommon/SampaHeader.h"
#include "MCHRawDecoder/PageDecoder.h"
#include "MCHRawDecoder/DecodedDataHandlers.h"
#include "MCHRawEncoderPayload/DataBlock.h"
#include "MCHRawEncoderPayload/PayloadEncoder.h"
#include "MoveBuffer.h"
#include "RDHManip.h"
#include "UserLogicEndpointDecoder.h"
#include <fmt/printf.h>
#include <fstream>
#include <iostream>
#include <boost/test/data/test_case.hpp>
#include <boost/mpl/list.hpp>
Go to the source code of this file.
Classes | |
struct | V0 |
struct | V1 |
Macros | |
#define | BOOST_TEST_MODULE Test MCHRaw UserLogicElinkDecoder |
#define | BOOST_TEST_MAIN |
#define | BOOST_TEST_DYN_LINK |
Typedefs | |
typedef boost::mpl::list< V0, V1 > | testTypes |
Functions | |
SampaChannelHandler | handlePacket (std::string &result) |
SampaErrorHandler | handleError (std::string &result) |
std::vector< std::byte > | convertBuffer2PayloadBuffer (gsl::span< const std::byte > buffer, std::optional< size_t > insertSync=std::nullopt) |
template<typename CHARGESUM , int VERSION> | |
std::string | decodeBuffer (int feeId, gsl::span< const std::byte > buffer) |
template<typename CHARGESUM , int VERSION> | |
std::string | testPayloadDecode (DsElecId ds1, DualSampaChannelId ch1, const std::vector< SampaCluster > &clustersFirstChannel, DsElecId ds2=DsElecId{0, 0, 0}, DualSampaChannelId ch2=47, const std::vector< SampaCluster > &clustersSecondChannel={}, std::optional< size_t > insertSync=std::nullopt) |
template<int VERSION> | |
std::vector< uint64_t > | convert (gsl::span< const uint64_t > page) |
template<> | |
std::vector< uint64_t > | convert< 0 > (gsl::span< const uint64_t > page) |
template<> | |
std::vector< uint64_t > | convert< 1 > (gsl::span< const uint64_t > page) |
template<int VERSION = 0> | |
std::string | testPayloadDecodeCruPages (gsl::span< const uint64_t > ipage) |
BOOST_AUTO_TEST_CASE_TEMPLATE (SampleModeSimplest, V, testTypes) | |
BOOST_AUTO_TEST_CASE_TEMPLATE (SampleModeSimple, V, testTypes) | |
BOOST_AUTO_TEST_CASE_TEMPLATE (SampleModeTwoChannels, V, testTypes) | |
BOOST_AUTO_TEST_CASE_TEMPLATE (ChargeSumModeSimplest, V, testTypes) | |
BOOST_AUTO_TEST_CASE_TEMPLATE (ChargeSumModeSimple, V, testTypes) | |
BOOST_AUTO_TEST_CASE_TEMPLATE (ChargeSumModeTwoChannels, V, testTypes) | |
BOOST_AUTO_TEST_CASE_TEMPLATE (SyncInTheMiddleChargeSumModeTwoChannels, V, testTypes) | |
BOOST_AUTO_TEST_CASE_TEMPLATE (TestCruPageOK, V, testTypes) | |
BOOST_AUTO_TEST_CASE_TEMPLATE (TestCruPageBadClusterSize, V, testTypes) | |
BOOST_AUTO_TEST_CASE_TEMPLATE (TestCruPageBadN10bitWords, V, testTypes) | |
Variables | |
const uint64_t | CruPageOK [] |
const uint64_t | CruPageBadClusterSize [] |
const uint64_t | CruPageBadN10bitWords [] |
#define BOOST_TEST_DYN_LINK |
Definition at line 17 of file testUserLogicEndpointDecoder.cxx.
#define BOOST_TEST_MAIN |
Definition at line 16 of file testUserLogicEndpointDecoder.cxx.
#define BOOST_TEST_MODULE Test MCHRaw UserLogicElinkDecoder |
Definition at line 15 of file testUserLogicEndpointDecoder.cxx.
Definition at line 285 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | ChargeSumModeSimple | , |
V | , | ||
testTypes | |||
) |
Definition at line 329 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | ChargeSumModeSimplest | , |
V | , | ||
testTypes | |||
) |
Definition at line 320 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | ChargeSumModeTwoChannels | , |
V | , | ||
testTypes | |||
) |
Definition at line 341 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | SampleModeSimple | , |
V | , | ||
testTypes | |||
) |
Definition at line 300 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | SampleModeSimplest | , |
V | , | ||
testTypes | |||
) |
Definition at line 291 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | SampleModeTwoChannels | , |
V | , | ||
testTypes | |||
) |
Definition at line 309 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | SyncInTheMiddleChargeSumModeTwoChannels | , |
V | , | ||
testTypes | |||
) |
Definition at line 356 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | TestCruPageBadClusterSize | , |
V | , | ||
testTypes | |||
) |
Definition at line 385 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | TestCruPageBadN10bitWords | , |
V | , | ||
testTypes | |||
) |
Definition at line 393 of file testUserLogicEndpointDecoder.cxx.
BOOST_AUTO_TEST_CASE_TEMPLATE | ( | TestCruPageOK | , |
V | , | ||
testTypes | |||
) |
Definition at line 376 of file testUserLogicEndpointDecoder.cxx.
std::vector< uint64_t > convert | ( | gsl::span< const uint64_t > | page | ) |
std::vector< uint64_t > convert< 0 > | ( | gsl::span< const uint64_t > | page | ) |
Definition at line 224 of file testUserLogicEndpointDecoder.cxx.
std::vector< uint64_t > convert< 1 > | ( | gsl::span< const uint64_t > | page | ) |
Definition at line 224 of file testUserLogicEndpointDecoder.cxx.
std::vector< std::byte > convertBuffer2PayloadBuffer | ( | gsl::span< const std::byte > | buffer, |
std::optional< size_t > | insertSync = std::nullopt |
||
) |
Definition at line 132 of file testUserLogicEndpointDecoder.cxx.
std::string decodeBuffer | ( | int | feeId, |
gsl::span< const std::byte > | buffer | ||
) |
Definition at line 165 of file testUserLogicEndpointDecoder.cxx.
SampaErrorHandler handleError | ( | std::string & | result | ) |
Definition at line 124 of file testUserLogicEndpointDecoder.cxx.
SampaChannelHandler handlePacket | ( | std::string & | result | ) |
Definition at line 109 of file testUserLogicEndpointDecoder.cxx.
std::string testPayloadDecode | ( | DsElecId | ds1, |
DualSampaChannelId | ch1, | ||
const std::vector< SampaCluster > & | clustersFirstChannel, | ||
DsElecId | ds2 = DsElecId{0, 0, 0} , |
||
DualSampaChannelId | ch2 = 47 , |
||
const std::vector< SampaCluster > & | clustersSecondChannel = {} , |
||
std::optional< size_t > | insertSync = std::nullopt |
||
) |
Definition at line 178 of file testUserLogicEndpointDecoder.cxx.
std::string testPayloadDecodeCruPages | ( | gsl::span< const uint64_t > | ipage | ) |
Definition at line 257 of file testUserLogicEndpointDecoder.cxx.
const uint64_t CruPageBadClusterSize[] |
Definition at line 63 of file testUserLogicEndpointDecoder.cxx.
const uint64_t CruPageBadN10bitWords[] |
Definition at line 85 of file testUserLogicEndpointDecoder.cxx.
const uint64_t CruPageOK[] |
Definition at line 41 of file testUserLogicEndpointDecoder.cxx.