12#define BOOST_TEST_MODULE Test MCHRaw ROFFinder
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
16#include <boost/test/unit_test.hpp>
21BOOST_AUTO_TEST_SUITE(o2_mch_raw)
23BOOST_AUTO_TEST_SUITE(roffinder)
26static const int32_t BCROLLOVER = (1 << 20);
45static RawDigitVector makeDigitsVector(uint32_t tfTime1, uint32_t orbit1, uint32_t tfTime2, uint32_t orbit2)
47 RawDigit digit1 = makeDigit(1, tfTime1, orbit1);
48 RawDigit digit2 = makeDigit(2, tfTime2, orbit2);
59 uint32_t tfTime1 = 100;
61 uint32_t tfTime2 = tfTime1;
62 uint32_t orbit2 = orbit1;
64 auto digits = makeDigitsVector(tfTime1, orbit1, tfTime2, orbit2);
87 uint32_t tfTime1 = 100;
89 uint32_t tfTime2 = tfTime1 + 1;
90 uint32_t orbit2 = orbit1;
92 auto digits = makeDigitsVector(tfTime1, orbit1, tfTime2, orbit2);
115 uint32_t tfTime1 = 100;
117 uint32_t tfTime2 = tfTime1;
118 uint32_t orbit2 = orbit1 + 1;
120 auto digits = makeDigitsVector(tfTime1, orbit1, tfTime2, orbit2);
141 uint32_t tfTime1 = 100;
143 uint32_t tfTime2 = tfTime1 + 4;
144 uint32_t orbit2 = orbit1;
146 auto digits = makeDigitsVector(tfTime1, orbit1, tfTime2, orbit2);
167 const auto rofDigit1 = rofFinder.
getOrderedDigit(rofRecords[0].getFirstIdx());
168 const auto rofDigit2 = rofFinder.
getOrderedDigit(rofRecords[1].getFirstIdx());
183 uint32_t tfTime1 = 100;
185 uint32_t tfTime2 = tfTime1 - 4;
186 uint32_t orbit2 = orbit1 + 1;
188 auto digits = makeDigitsVector(tfTime1, orbit1, tfTime2, orbit2);
209 const auto rofDigit1 = rofFinder.
getOrderedDigit(rofRecords[0].getFirstIdx());
210 const auto rofDigit2 = rofFinder.
getOrderedDigit(rofRecords[1].getFirstIdx());
222BOOST_AUTO_TEST_SUITE_END()
223BOOST_AUTO_TEST_SUITE_END()
Class to group the fired pads according to their time stamp.
MCH digit implementation.
std::vector< RawDigit > RawDigitVector
std::vector< o2::mch::ROFRecord > getROFRecords()
std::optional< DataDecoder::RawDigit > getOrderedDigit(int i)
bool isDigitsTimeAligned()
void process(bool dummyROFs=false)
o2::InteractionRecord digitTime2IR(const RawDigit &digit)
RawDigitIdVector getOrderedDigits()
bool isRofTimeMonotonic()
BOOST_AUTO_TEST_CASE(FlatHisto)
uint32_t bunchCrossing
bit 0 to 9: sampa time
uint32_t orbit
bit 30 to 31: reserved
DataDecoder::RawDigitVector RawDigitVector
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())
std::vector< Digit > digits