20#include <fmt/format.h>
31 throw std::runtime_error(fmt::format(
"invalid mask {} (max allowed is {}",
39 for (
auto id : badchannels) {
41 ChannelCode cc(
id.getSolarId(),
id.getElinkId(),
id.getChannel());
43 }
catch (
const std::exception&
e) {
44 LOGP(warning,
"Error processing channel - SolarId: {} ElinkId: {} Channel: {}. Error: {}. This channel is skipped.",
45 id.getSolarId(),
id.getElinkId(),
id.getChannel(),
e.what());
53 for (
auto id : badchannels) {
61 LOGP(warning,
"Error processing Dual Sampa - index: {}. This DS is skipped.", badDS);
70 auto deId = badDS.
deId();
72 LOGP(warning,
"Error processing Dual Sampa - {}. This DS is skipped.",
raw::asString(badDS));
78 ChannelCode cc(deId, dePadIndex);
80 } catch (
const std::exception&
e) {
81 LOGP(warning,
"Error processing channel - {} padIndex: {}. Error: {}. This channel is skipped.",
90 if (!constants::isValidDetElemId(badDE)) {
91 LOGP(warning,
"Error processing DE - Id: {}. This DE is skipped.", badDE);
94 const auto&
seg = mapping::segmentation(badDE);
99 }
catch (
const std::exception&
e) {
100 LOGP(warning,
"Error processing channel - deId: {} padIndex: {}. Error: {}. This channel is skipped.",
101 badDE, dePadIndex,
e.what());
108 auto s = mStatus.find(
id);
109 if (
s != mStatus.end()) {
118 std::map<int, std::vector<int>> rejectList;
124 for (
const auto& status : statusMap) {
125 auto channel = status.first;
126 if (!channel.isValid()) {
129 if ((
mask & status.second) != 0) {
130 rejectList[channel.getDeId()].emplace_back(channel.getDePadIndex());
o2::mch::mapping::CathodeSegmentation seg
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 s
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
ClassImp(o2::mch::StatusMap)
void add(gsl::span< const DsChannelId > badchannels, uint32_t mask)
void addDS(DsIndex badDS, uint32_t mask)
void forEachPad(CALLABLE &&func) const
void forEachPadInDualSampa(int dualSampaId, CALLABLE &&func) const
A DsDetId is just a pair (detection element id, dual sampa id)
uint16_t deId() const
deId returns one of the 156 possible detection element id
bool isValidDetElemId(int deId)
O2MCHMAPPINGIMPL3_EXPORT const Segmentation & segmentation(int detElemId)
std::string asString(const SampaCluster &sc)
std::map< int, std::vector< int > > applyMask(const o2::mch::StatusMap &statusMap, uint32_t mask)
void assertValidMask(uint32_t mask)
constexpr uint16_t NumberOfDualSampas
o2::mch::raw::DsDetId getDsDetId(DsIndex dsIndex)
std::vector< o2::mch::ChannelCode > cc