12#define BOOST_TEST_MODULE test mch calibration pedestal data
13#define BOOST_TEST_DYN_LINK
14#include <boost/test/unit_test.hpp>
26 std::vector<uint16_t>
v(
n);
27 std::uniform_int_distribution<int> distribution(0, 1024);
28 std::mt19937 generator(std::random_device{}());
29 std::generate(
v.begin(),
v.end(), [&distribution, &generator] {
30 return distribution(generator);
60 std::vector<PedestalDigit> allDigits;
62 auto det2elec = o2::mch::raw::createDet2ElecMapper<o2::mch::raw::ElectronicMapperGenerated>();
68 auto dsId = seg.padDualSampaId(padID);
69 auto ch = seg.padDualSampaChannel(padID);
70 o2::mch::raw::DsDetId det(deId, dsId);
71 auto elec = det2elec(det).value();
72 auto solarId = elec.solarId();
73 allDigits.emplace_back(solarId, elec.elinkId(), ch, 42, 42, samples(15));
81 BOOST_REQUIRE(allDigits.size() == 1063528);
83 for (
const auto& ped : pd) {
94 for (
const auto& ped : pdmt) {
104 auto it1 = pd.
begin();
105 auto it2 = pd.
begin();
113 auto it1 = pd.
begin();
123 for (
auto rec : pd) {
133 for (
auto rec : pdmt) {
150 auto n1 = std::distance(pd.
begin(), pd.
end());
160 return c.mEntries > 0;
165BOOST_AUTO_TEST_CASE(IterationOnEmptyDataShouldNotBeAnInfiniteLoop, *boost::unit_test::timeout(10))
168 auto c = std::distance(
d.cbegin(),
d.cend());
171BOOST_AUTO_TEST_SUITE_END()
o2::mch::mapping::CathodeSegmentation seg
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 Directory with events to Events directory is and not inside events d
Compute and store the mean and RMS of the pedestal digit amplitudes.
void setNThreads(int nThreads)
void fill(const gsl::span< const PedestalDigit > digits)
"Fat" digit for pedestal data.
void forEachPad(CALLABLE &&func) const
bool isValid(int catPadIndex) const
Not every integer is a valid catPadIndex. This method will tell if catPadIndex is a valid one.
std::array< int, 156 > deIdsForAllMCH
O2MCHMAPPINGIMPL3_EXPORT const Segmentation & segmentation(int detElemId)
std::vector< PedestalDigit > digits
Pedestal mean and sigma for one channel.
BOOST_AUTO_TEST_CASE(TestIteratorOnCompletePedestalData)
BOOST_TEST(digits==digitsD, boost::test_tools::per_element())
std::vector< Digit > digits