Project
Loading...
Searching...
No Matches
ColumnDataHandler.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_COLUMNDATAHANDLER_H
17#define O2_MID_COLUMNDATAHANDLER_H
18
19#include <cstdint>
20#include <vector>
21#include <unordered_map>
22#include <gsl/span>
24
25namespace o2
26{
27namespace mid
28{
29
31{
32 public:
39 void add(uint8_t deId, uint8_t columnId, int lineId, int strip, int cathode);
40
45 bool merge(const ColumnData& col, size_t idx = 0);
46
50 void merge(gsl::span<const ColumnData> colVec, size_t idx = 0);
51
53 void clear();
54
57 std::vector<ColumnData> getMerged() const;
58
62 std::vector<size_t> getMergedIndexes(const ColumnData& col) const;
63
64 private:
65 std::unordered_map<uint16_t, ColumnData> mData{};
66 std::unordered_map<uint16_t, std::vector<size_t>> mCorrespondence;
67};
68
69} // namespace mid
70} // namespace o2
71
72#endif /* O2_MID_COLUMNDATAHANDLER_H */
Strip pattern (aka digits)
uint32_t col
Definition RawData.h:4
void clear()
Clears inner maps.
std::vector< size_t > getMergedIndexes(const ColumnData &col) const
Returns the indexes of the ColumnData merged into this one.
void add(uint8_t deId, uint8_t columnId, int lineId, int strip, int cathode)
Add single strip.
bool merge(const ColumnData &col, size_t idx=0)
Merges digit.
std::vector< ColumnData > getMerged() const
Returns the merged 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