Project
Loading...
Searching...
No Matches
testDetectionElements.cxx
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#define BOOST_TEST_MODULE Test MCHConstants DetectionElements
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
15
16#include <boost/test/unit_test.hpp>
17
19
20#include <array>
21#include <boost/mpl/list.hpp>
22#include <set>
23#include <unordered_map>
24
25BOOST_AUTO_TEST_CASE(CheckDeId2DeId)
26{
27 std::unordered_map<int, int> checkMap = {
28 {100, 0},
29 {101, 1},
30 {102, 2},
31 {103, 3},
32 {200, 4},
33 {201, 5},
34 {202, 6},
35 {203, 7},
36 {300, 8},
37 {301, 9},
38 {302, 10},
39 {303, 11},
40 {400, 12},
41 {401, 13},
42 {402, 14},
43 {403, 15},
44 {500, 16},
45 {501, 17},
46 {502, 18},
47 {503, 19},
48 {504, 20},
49 {505, 21},
50 {506, 22},
51 {507, 23},
52 {508, 24},
53 {509, 25},
54 {510, 26},
55 {511, 27},
56 {512, 28},
57 {513, 29},
58 {514, 30},
59 {515, 31},
60 {516, 32},
61 {517, 33},
62 {600, 34},
63 {601, 35},
64 {602, 36},
65 {603, 37},
66 {604, 38},
67 {605, 39},
68 {606, 40},
69 {607, 41},
70 {608, 42},
71 {609, 43},
72 {610, 44},
73 {611, 45},
74 {612, 46},
75 {613, 47},
76 {614, 48},
77 {615, 49},
78 {616, 50},
79 {617, 51},
80 {700, 52},
81 {701, 53},
82 {702, 54},
83 {703, 55},
84 {704, 56},
85 {705, 57},
86 {706, 58},
87 {707, 59},
88 {708, 60},
89 {709, 61},
90 {710, 62},
91 {711, 63},
92 {712, 64},
93 {713, 65},
94 {714, 66},
95 {715, 67},
96 {716, 68},
97 {717, 69},
98 {718, 70},
99 {719, 71},
100 {720, 72},
101 {721, 73},
102 {722, 74},
103 {723, 75},
104 {724, 76},
105 {725, 77},
106 {800, 78},
107 {801, 79},
108 {802, 80},
109 {803, 81},
110 {804, 82},
111 {805, 83},
112 {806, 84},
113 {807, 85},
114 {808, 86},
115 {809, 87},
116 {810, 88},
117 {811, 89},
118 {812, 90},
119 {813, 91},
120 {814, 92},
121 {815, 93},
122 {816, 94},
123 {817, 95},
124 {818, 96},
125 {819, 97},
126 {820, 98},
127 {821, 99},
128 {822, 100},
129 {823, 101},
130 {824, 102},
131 {825, 103},
132 {900, 104},
133 {901, 105},
134 {902, 106},
135 {903, 107},
136 {904, 108},
137 {905, 109},
138 {906, 110},
139 {907, 111},
140 {908, 112},
141 {909, 113},
142 {910, 114},
143 {911, 115},
144 {912, 116},
145 {913, 117},
146 {914, 118},
147 {915, 119},
148 {916, 120},
149 {917, 121},
150 {918, 122},
151 {919, 123},
152 {920, 124},
153 {921, 125},
154 {922, 126},
155 {923, 127},
156 {924, 128},
157 {925, 129},
158 {1000, 130},
159 {1001, 131},
160 {1002, 132},
161 {1003, 133},
162 {1004, 134},
163 {1005, 135},
164 {1006, 136},
165 {1007, 137},
166 {1008, 138},
167 {1009, 139},
168 {1010, 140},
169 {1011, 141},
170 {1012, 142},
171 {1013, 143},
172 {1014, 144},
173 {1015, 145},
174 {1016, 146},
175 {1017, 147},
176 {1018, 148},
177 {1019, 149},
178 {1020, 150},
179 {1021, 151},
180 {1022, 152},
181 {1023, 153},
182 {1024, 154},
183 {1025, 155}};
184
185 for (auto deId : o2::mch::constants::deIdsForAllMCH) {
186 auto expected = checkMap.find(deId);
188 }
189
190 // non existing deId should return std::nullopt
192}
GLsizei const GLfloat * value
Definition glcorearb.h:819
std::array< int, 156 > deIdsForAllMCH
std::optional< int > deId2DeIndex(int deId)
std::map< std::string, ID > expected
BOOST_AUTO_TEST_CASE(CheckDeId2DeId)
BOOST_CHECK(tree)
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())