12#define BOOST_TEST_MODULE Test MCHRaw ClosureDigit
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
16#include <boost/test/unit_test.hpp>
17#include <boost/mpl/list.hpp>
23#include <boost/test/data/test_case.hpp>
24#include <boost/test/data/monomorphic.hpp>
52 os << fmt::format(
"DE {:4d} PADID {:4d}", dpi.
deid, dpi.
padid);
73 auto dsDet = elec2det(dsId);
74 auto deId = dsDet->deId();
84 fair::Logger::SetConsoleSeverity(
"nolog");
86 std::vector<o2::mch::Digit>
digits;
87 digits.emplace_back(923, 3959, 959, 123, 1);
88 digits.emplace_back(923, 3974, 974, 123, 1);
89 digits.emplace_back(100, 6664, 664, 123, 1);
104 fair::Logger::SetConsoleSeverity(
"info");
113 std::vector<std::byte>
buffer;
114 std::ifstream is(
filename, std::ifstream::binary);
140 std::vector<std::string>
expected = {
141 "S481-J5-DS1-CH58-ts-0-bc-3456-cs-1-q-959",
142 "S481-J5-DS1-CH11-ts-0-bc-3456-cs-1-q-974",
143 "S394-J5-DS3-CH35-ts-0-bc-3456-cs-1-q-664"};
145 expected = std::vector<std::string>{
146 "S727-J6-DS4-CH58-ts-0-bc-3456-cs-1-q-959",
147 "S727-J6-DS4-CH11-ts-0-bc-3456-cs-1-q-974",
148 "S363-J4-DS4-CH35-ts-0-bc-3456-cs-1-q-664"};
151 auto result = readDigits<std::string>();
155 bool permutation =
false;
161 std::cout <<
"Got " <<
result.size() <<
" results:\n";
163 std::cout <<
s <<
"\n";
165 std::cout <<
"Expected " <<
expected.size() <<
":\n";
167 std::cout <<
s <<
"\n";
179 auto result = readDigits<DePadId>();
183 bool permutation =
false;
189 std::cout <<
"Got " <<
result.size() <<
" results:\n";
191 std::cout <<
s <<
"\n";
193 std::cout <<
"Expected " <<
expected.size() <<
":\n";
195 std::cout <<
s <<
"\n";
o2::mch::mapping::CathodeSegmentation seg
Definition of the decoder for the MCH data.
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 s
int findPadByFEE(int dualSampaId, int dualSampaChannel) const
bool decodeBuffer(gsl::span< const std::byte > buf)
void encodeDigits(gsl::span< o2::mch::Digit > digits, uint32_t orbit, uint16_t bc)
GLuint GLsizei GLsizei * length
O2MCHMAPPINGIMPL3_EXPORT const Segmentation & segmentation(int detElemId)
std::function< std::optional< DsDetId >(DsElecId)> createElec2DetMapper< ElectronicMapperGenerated >(uint64_t)
std::function< void(DsElecId dsId, DualSampaChannelId channel, SampaCluster)> SampaChannelHandler
std::function< std::optional< DsDetId >(DsElecId)> createElec2DetMapper< ElectronicMapperDummy >(uint64_t timestamp)
std::string asString(const SampaCluster &sc)
BOOST_AUTO_TEST_CASE(FlatHisto)
bool sameSize(T0 const &first, Ts const &... rest)
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)
bool operator==(const DePadId &other) const
bool operator<(const DePadId &other) const
Piece of data for one Sampa channel.
std::vector< T > readDigits()
constexpr const char * sampaClusterFormat
SampaChannelHandler handlePacketStoreAsVec(std::vector< T > &result)
std::vector< std::byte > getBuffer(const char *filename)
const bool useDummyElecMap
std::map< std::string, ID > expected
VectorOfTObjectPtrs other
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())
std::vector< Digit > digits