12#define BOOST_TEST_MODULE Test MCHRaw GBTEncoder
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
16#include <boost/test/unit_test.hpp>
23#include <fmt/printf.h>
24#include <boost/mpl/list.hpp>
29BOOST_AUTO_TEST_SUITE(o2_mch_raw)
31BOOST_AUTO_TEST_SUITE(gbtencoder)
35template <typename FORMAT, typename CHARGESUM>
57 int elinkIndexInGroup = 0;
60 elinkIndexInGroup = 3;
64 BOOST_CHECK_THROW(enc.
addChannelData(8, 0, 0, {SampaCluster(ts, 0, 10, 11)}), std::invalid_argument);
65 std::vector<std::byte>
buffer;
67 float e = expectedSize<T, ChargeSumMode>();
71template <
typename FORMAT,
typename CHARGESUM>
90 std::vector<std::byte>
buffer;
95 for (
int i = 0;
i < 64;
i++) {
100 float e = expectedMaxSize<T, ChargeSumMode>();
108 std::vector<std::byte>
buffer;
110 BOOST_CHECK_GE(
n, 0);
115BOOST_AUTO_TEST_SUITE_END()
116BOOST_AUTO_TEST_SUITE_END()
unsigned short int uint16_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
A GBTEncoder manages 40 ElinkEncoder to encode the data of one GBT.
void addChannelData(uint8_t elinkGroupId, uint8_t elinkIndexInGroup, uint8_t chId, const std::vector< SampaCluster > &data)
size_t moveToBuffer(std::vector< std::byte > &buffer)
Piece of data for one Sampa channel.
boost::mpl::list< o2::dcs::DataPointIdentifier, o2::dcs::DataPointValue, o2::dcs::DataPointCompositeObject > testTypes
BOOST_AUTO_TEST_CASE_TEMPLATE(GBTEncoderAddFewChannels, T, testTypes)
float expectedMaxSize< UserLogicFormat, ChargeSumMode >()
float expectedSize< UserLogicFormat, ChargeSumMode >()
float expectedMaxSize< BareFormat, ChargeSumMode >()
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())