Project
Loading...
Searching...
No Matches
DecodedDataAggregator.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16#ifndef O2_MID_DECODEDDATAAGGREGATOR_H
17#define O2_MID_DECODEDDATAAGGREGATOR_H
18
19#include <vector>
20#include <map>
21#include <gsl/gsl>
25#include "MIDRaw/CrateMapper.h"
26
27namespace o2
28{
29namespace mid
30{
32{
33 public:
34 void process(gsl::span<const ROBoard> localBoards, gsl::span<const ROFRecord> rofRecords);
35
37 const std::vector<ColumnData>& getData(EventType eventType = EventType::Standard) { return mData[static_cast<int>(eventType)]; }
38
40 const std::vector<ROFRecord>& getROFRecords(EventType eventType = EventType::Standard) { return mROFRecords[static_cast<int>(eventType)]; }
41
42 private:
43 void addData(const ROBoard& col, size_t firstEntry, size_t evtTypeIdx);
44 ColumnData& FindColumnData(uint8_t deId, uint8_t columnId, size_t firstEntry, size_t evtTypeIdx);
45
46 std::array<std::map<uint64_t, std::vector<size_t>>, 3> mEventIndexes{};
47
48 std::array<std::vector<ColumnData>, 3> mData{};
49 std::array<std::vector<ROFRecord>, 3> mROFRecords{};
50 CrateMapper mCrateMapper;
51};
52} // namespace mid
53} // namespace o2
54
55#endif /* O2_MID_DECODEDDATAAGGREGATOR_H */
Strip pattern (aka digits)
Mapper to convert the RO Ids to a format suitable for O2.
Definition of the MID event record.
Structure to store the readout board information.
uint32_t col
Definition RawData.h:4
const std::vector< ROFRecord > & getROFRecords(EventType eventType=EventType::Standard)
Gets the vector of data RO frame records.
const std::vector< ColumnData > & getData(EventType eventType=EventType::Standard)
Gets the vector of data.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Column data structure for MID.
Definition ColumnData.h:29