15#define BOOST_TEST_MODULE Test MCHRaw BareElinkDecoder
16#define BOOST_TEST_MAIN
17#define BOOST_TEST_DYN_LINK
20#include <boost/test/unit_test.hpp>
21#include <fmt/printf.h>
34 std::cout << fmt::format(
"{} {} ch={:2d} ",
msg,
s.str(), channel);
35 std::cout << sc <<
"\n";
39BOOST_AUTO_TEST_SUITE(o2_mch_raw)
41BOOST_AUTO_TEST_SUITE(elinkdecoder)
50 helper(dsId, channel, sh);
57 std::string enc(
"1100100010000000000011110000001010101010101010101011111010011100000000000010000000000000000000000000100000000000101000000010100000010000100100100000000000101000000000000000000000000100000000001001100000100110001010011000111110100110100000000000101100000000000000000000001100000000001000001000100000101010000010011000001001001000010110000000000011111000000000000000000000001000000000110110010011011001101101100101110110011111011001");
59 for (
int i = 0;
i < enc.size() - 1;
i += 2) {
60 e.append(enc[
i] ==
'1', enc[
i + 1] ==
'1');
73 helper(dsId, channel, sh);
79 std::string enc(
"11001000100000000000111100000010101010101010101010110110100100100000000000100000000000000000000000001000000000001010000010100110000000000000010000100100100000000000101000000000000000000000001000000000001001100010011111100000000000000110100100100000000000101100000000000000000000001000000000001000001010000100101000000000110110100100100000000000111110000000000000000000001000000000001101100111011100001100000000");
81 for (
int i = 0;
i < enc.size() - 1;
i += 2) {
82 e.append(enc[
i] ==
'1', enc[
i + 1] ==
'1');
91 for (
int i = 0;
i < enc.size() - 1;
i += 2) {
92 e2.
append(enc[
i] == 1, enc[
i + 1] == 1);
98BOOST_AUTO_TEST_SUITE_END()
99BOOST_AUTO_TEST_SUITE_END()
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 s
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
Main element of the MCH Bare Raw Data Format decoder.
void append(bool bit0, bool bit1)
Append two bits (from the same dual sampa, one per sampa) to the Elink.
std::function< void(DsElecId dsId, DualSampaChannelId channel, SampaCluster)> SampaChannelHandler
BOOST_AUTO_TEST_CASE(FlatHisto)
SampaChannelHandler sampaChannelHandler
Piece of data for one Sampa channel.
SampaChannelHandler handlePacketPrint(std::string_view msg)
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())
uint64_t const void const *restrict const msg