23#include <fmt/printf.h>
33 return fmt::format(
"DetID {:4d} PadId {:10d} ADC {:10d} TFtime {:10d} NofSamples {:5d} {}",
34 d.getDetID(),
d.getPadID(),
d.getADC(),
d.getTime(),
d.getNofSamples(),
35 d.isSaturated() ?
"(S)" :
"");
40 : mDigit2ElecMapper{digit2elec}, mEncoder{encoder}
47 std::vector<std::byte>&
buffer)
51 auto optElecId = mDigit2ElecMapper(
d);
52 if (!optElecId.has_value()) {
53 LOGP(warning,
"could not get elecId for digit {}",
asString(
d));
56 auto elecId = optElecId.value().first;
57 int dualSampaChannelId = optElecId.value().second;
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 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
static const HBFUtils & Instance()
MCH digit implementation.
DigitPayloadEncoder(Digit2ElecMapper digit2elec, PayloadEncoder &encoder)
void encodeDigits(gsl::span< o2::mch::Digit > digits, uint32_t orbit, uint16_t bc, std::vector< std::byte > &buffer)
A PayloadEncoder builds MCH raw data (payload part only)
virtual void startHeartbeatFrame(uint32_t orbit, uint16_t bunchCrossing)=0
virtual void addChannelData(DsElecId dsId, DualSampaChannelId chId, const std::vector< SampaCluster > &data)=0
virtual size_t moveToBuffer(std::vector< std::byte > &buffer)=0
std::function< std::optional< std::pair< DsElecId, int > >(const o2::mch::Digit &digit)> Digit2ElecMapper
uint20_t sampaBunchCrossingCounter(uint32_t orbit, uint16_t bc, uint32_t firstOrbit)
std::string asString(const SampaCluster &sc)
Piece of data for one Sampa channel.
IR getFirstSampledTFIR() const
get TF and HB (abs) for this IR
std::vector< Cluster > clusters
std::vector< Digit > digits