16#ifndef O2_MID_DECODER_H
17#define O2_MID_DECODER_H
20#if !defined(MID_RAW_VECTORS)
21#include <unordered_map>
48 void process(gsl::span<const uint8_t> payload,
const RDH& rdh)
51 auto feeId = o2::raw::RDHUtils::getFEEID(rdh);
52#if defined(MID_RAW_VECTORS)
53 mLinkDecoders[feeId]->process(payload, o2::raw::RDHUtils::getHeartBeatOrbit(rdh), o2::raw::RDHUtils::getTriggerType(rdh), mData, mROFRecords);
57 linkDecoder->second->process(payload, o2::raw::RDHUtils::getHeartBeatOrbit(rdh), o2::raw::RDHUtils::getTriggerType(rdh), mData, mROFRecords);
59 LOG(alarm) <<
"Unexpected feeId " << feeId <<
" in RDH";
64 const std::vector<ROBoard>&
getData()
const {
return mData; }
67 const std::vector<ROFRecord>&
getROFRecords()
const {
return mROFRecords; }
72#if defined(MID_RAW_VECTORS)
75 std::unordered_map<uint16_t, std::unique_ptr<LinkDecoder>>
mLinkDecoders{};
79 std::vector<ROBoard> mData{};
80 std::vector<ROFRecord> mROFRecords{};
83std::unique_ptr<Decoder>
createDecoder(
const o2::header::RDHAny& rdh,
bool isDebugMode,
const ElectronicsDelay& electronicsDelay,
const CrateMasks& crateMasks,
const FEEIdConfig& feeIdConfig);
84std::unique_ptr<Decoder>
createDecoder(
const o2::header::RDHAny& rdh,
bool isDebugMode,
const char* electronicsDelayFile =
"",
const char* crateMasksFile =
"",
const char* feeIdConfigFile =
"");
Raw data utilities for MID.
Delay parameters for MID electronics.
Hardware Id to FeeId mapper.
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 process
Class interface for the MID link decoder.
Structure to store the readout board information.
std::unordered_map< uint16_t, std::unique_ptr< LinkDecoder > > mLinkDecoders
const std::vector< ROFRecord > & getROFRecords() const
Gets the vector of data RO frame records.
void process(gsl::span< const uint8_t > payload, const RDH &rdh)
const std::vector< ROBoard > & getData() const
Gets the vector of data.
virtual ~Decoder()=default
std::unique_ptr< Decoder > createDecoder(const o2::header::RDHAny &rdh, bool isDebugMode, const ElectronicsDelay &electronicsDelay, const CrateMasks &crateMasks, const FEEIdConfig &feeIdConfig)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"