12#ifndef O2_MCH_RAW_BARE_GBT_DECODER_H
13#define O2_MCH_RAW_BARE_GBT_DECODER_H
19#include <fmt/printf.h>
20#include <fmt/format.h>
24#include <boost/multiprecision/cpp_int.hpp>
38template <
typename CHARGESUM>
77 std::array<BareElinkDecoder<CHARGESUM>, 40> mElinks;
78 int mNofGbtWordsSeens;
82using namespace boost::multiprecision;
84template <
typename CHARGESUM>
94template <
typename CHARGESUM>
97 if (
bytes.size() % 16 != 0) {
98 throw std::invalid_argument(
"can only bytes by group of 16 (i.e. 128 bits)");
101 for (
int j = 0;
j <
bytes.size();
j += 16) {
104 for (
auto b :
bytes.subspan(
j, 10)) {
105 const uint8_t b8 = std::to_integer<uint8_t>(
b);
106 mElinks[elinkIndex++].append(b8 & 2, b8 & 1);
107 mElinks[elinkIndex++].append(b8 & 8, b8 & 4);
108 mElinks[elinkIndex++].append(b8 & 32, b8 & 16);
109 mElinks[elinkIndex++].append(b8 & 128, b8 & 64);
116template <
typename CHARGESUM>
119 for (
auto&
e : mElinks) {
unsigned short int uint16_t
o2::raw::RawFileWriter * raw
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.
A BareGBTDecoder groups 40 ElinkDecoder objects.
BareGBTDecoder(uint16_t solarId, DecodedDataHandlers decodedDataHandlers)
size_t append(Payload bytes)
Append the equivalent n GBT words (n x 128 bits, split in 16 bytes). bytes size (=n) must be a multip...
void reset()
Clear our internal Elinks.
Decoder for MCH Raw Data Format.
GLboolean GLboolean GLboolean b
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...