28ColumnData& DecodedDataAggregator::FindColumnData(uint8_t deId, uint8_t columnId,
size_t firstEntry,
size_t evtTypeIdx)
32 for (
auto colIt = mData[evtTypeIdx].
begin() + firstEntry,
end = mData[evtTypeIdx].
end(); colIt !=
end; ++colIt) {
33 if (colIt->deId == deId && colIt->columnId == columnId) {
37 mData[evtTypeIdx].push_back({deId, columnId});
38 return mData[evtTypeIdx].back();
41void DecodedDataAggregator::addData(
const ROBoard& loc,
size_t firstEntry,
size_t evtTypeIdx)
44 uint8_t uniqueLocId = loc.boardId;
52 for (
int ich = 0; ich < 4; ++ich) {
53 if (((loc.firedChambers >> ich) & 0x1) == 0) {
57 auto&
col = FindColumnData(deId, columnId, firstEntry, evtTypeIdx);
58 col.setBendPattern(loc.patternsBP[ich], lineId);
59 col.setNonBendPattern(
col.getNonBendPattern() | loc.patternsNBP[ich]);
61 }
catch (
const std::exception& except) {
62 LOG(alarm) << except.what();
71 for (
auto&
data : mData) {
74 for (
auto& rof : mROFRecords) {
79 for (
auto rofIt = rofRecords.begin(); rofIt != rofRecords.end(); ++rofIt) {
80 mEventIndexes[
static_cast<int>(rofIt->eventType)][rofIt->interactionRecord.toLong()].emplace_back(rofIt - rofRecords.begin());
84 for (
size_t ievtType = 0; ievtType < mEventIndexes.size(); ++ievtType) {
85 for (
auto& item : mEventIndexes[ievtType]) {
86 size_t firstEntry = mData[ievtType].size();
87 for (
auto& idx : item.second) {
89 rof = &rofRecords[idx];
91 addData(localBoards[iloc], firstEntry, ievtType);
94 auto nEntries = mData[ievtType].size() - firstEntry;
100 mEventIndexes[ievtType].clear();
MID decoded raw data aggregator.
Useful detector parameters for MID.
uint16_t roLocalBoardToDE(uint8_t uniqueLocId) const
Converts the LOC ID expressed in readout convention into the LOC ID in MT11 right in the offline conv...
void process(gsl::span< const ROBoard > localBoards, gsl::span< const ROFRecord > rofRecords)
uint8_t itsSharedClusterMap uint8_t
bool isRightSide(uint8_t crateId)
Tests if the crate is in the right side.
int getColumnIdFromFEEId(uint16_t uniqueFEEId)
bool isRightSide(int deId)
int getDEIdFromFEEId(uint16_t uniqueFEEId)
int getLineIdFromFEEId(uint16_t uniqueFEEId)
int getDEId(bool isRight, int chamber, int rpc)
uint8_t getCrateId(uint8_t uniqueLocId)
Enum< T >::Iterator begin(Enum< T >)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::InteractionRecord interactionRecord
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"