19#include <unordered_map>
20#include "fmt/format.h"
31 for (uint16_t igbt = 0; igbt < crateparams::sNGBTs; ++igbt) {
32 mCheckers[igbt].setElectronicsDelay(mElectronicsDelay);
33 mCheckers[igbt].init(igbt, crateMasks.
getMask(igbt));
37bool RawDataChecker::process(gsl::span<const ROBoard> localBoards, gsl::span<const ROFRecord> rofRecords, gsl::span<const ROFRecord> pageRecords)
43 std::unordered_map<uint16_t, std::vector<ROFRecord>> rofs;
44 for (
auto& rof : rofRecords) {
45 auto& loc = localBoards[rof.firstEntry];
49 rofs[feeId].emplace_back(rof);
52 for (
auto& item : rofs) {
53 isOk &= mCheckers[item.first].process(localBoards, item.second, pageRecords);
54 mDebugMsg += mCheckers[item.first].getDebugMessage();
67 for (
auto& checker : mCheckers) {
68 if (checker.getNEventsProcessed() == 0) {
70 mDebugMsg += fmt::format(
"Missing info from GBT 0x{:02x}\n", checker.getGBTUniqueId());
79 for (
auto& checker : mCheckers) {
80 checker.setSyncTrigger(syncTrigger);
88 for (
auto& checker : mCheckers) {
89 sum += checker.getNEventsProcessed();
98 for (
auto& checker : mCheckers) {
99 sum += checker.getNEventsFaulty();
107 unsigned int sum = 0;
108 for (
auto& checker : mCheckers) {
109 sum += checker.getNBusyRaised();
117 for (
auto& checker : mCheckers) {
Class to check the raw data.
uint8_t getMask(uint16_t feeId) const
Gets the mask for the feeId.
void setSyncTrigger(uint32_t syncTrigger)
bool process(gsl::span< const ROBoard > localBoards, gsl::span< const ROFRecord > rofRecords, gsl::span< const ROFRecord > pageRecords)
void clear(bool all=false)
void init(const CrateMasks &masks)
unsigned int getNEventsFaulty() const
Gets the number of faulty events.
bool checkMissingLinks(bool clear=true)
unsigned int getNEventsProcessed() const
Gets the number of processed events.
unsigned int getNBusyRaised() const
Gets the number of busy raised.
float sum(float s, o2::dcs::DataPointValue v)
uint16_t makeGBTUniqueId(uint8_t crateId, uint8_t gbtId)
Builds the GBT unique ID from the crate ID and the GBT ID in the crate.
uint8_t getGBTIdFromBoardInCrate(uint8_t locId)
Gets the link ID in crate from the board ID.
uint8_t getCrateId(uint8_t uniqueLocId)
uint8_t getLocId(uint8_t uniqueLocId)
simClustering correlation clear()
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...