Project
Loading...
Searching...
No Matches
MapFEC.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
12#ifndef O2_MCH_RAW_ELECMAP_MAP_FEC_H
13#define O2_MCH_RAW_ELECMAP_MAP_FEC_H
14
15#include <array>
16#include <istream>
19#include <optional>
20
21namespace o2::mch::raw
22{
23class MapFEC
24{
25 public:
26 MapFEC(std::string_view content);
27 std::optional<DsDetId> operator()(const DsElecId& elecId) const;
28 size_t size() const;
29
30 private:
31 int index(uint32_t linkId, uint32_t dsAddr) const;
32
33 private:
34 struct MapDualSampa {
35 int deId = -1; // detector element
36 int dsId = -1; // DS index
37 int bad = -1; // if = 1 bad pad (not used for analysis)
38 };
39
40 private:
41 static constexpr int sMaxLinkId = 0x7ff;
42 static constexpr int sMaxDs = 40;
43 std::array<MapDualSampa, (sMaxLinkId + 1) * sMaxDs> mDsMap;
44 size_t mSize = 0;
45};
46
47} // namespace o2::mch::raw
48
49#endif
std::optional< DsDetId > operator()(const DsElecId &elecId) const
Definition MapFEC.cxx:62
size_t size() const
Definition MapFEC.cxx:55
GLuint index
Definition glcorearb.h:781