68 {
70 {
73 throw std::runtime_error("Channel not found in OddPhiCMA::cable_CMA_channels");
74 }
75 WiredOR* wor =
found->second;
76
79
83
84 int first_ch_cabled = 32;
85 int last_ch_cabled = -1;
86
87 std::vector<int> multiplicity(max_st);
88
93 int local_strip = max_st - (max_st -
start);
94 int final_strip = max_st - (max_st -
stop);
95
99 return false;
100 }
101 if (chs <= first_ch_cabled) first_ch_cabled = chs;
102
103 do {
106 return false;
107 }
108 if (local_strip > 0 && local_strip <= rpc_st) {
110 m_pivot[
i][0][chs] = cham * 100 + local_strip - 1;
111 m_pivot[
i][1][chs] = 10000 + cham * 100 + local_strip - 1;
112 } else {
113 m_pivot[
i][1][chs] = cham * 100 + local_strip - 1;
114 m_pivot[
i][0][chs] = 10000 + cham * 100 + local_strip - 1;
115 }
116 multiplicity[local_strip - 1] = 1;
117 }
118 ++chs;
119 } while (--local_strip >= final_strip);
120
121 if (chs - 1 >= last_ch_cabled) last_ch_cabled = chs - 1;
123 }
125
126
129
130
131
132
133
135 std::ostringstream disp;
136 disp << "OddPhiCMA::cable_CMA_channels - out of bound array indices! Values:"
137 << first_ch_cabled << ", " << last_ch_cabled
138 << " at " << __FILE__ << ":" << __LINE__ ;
139 throw std::runtime_error(disp.str());
140 }
141
142
144 if (
m_pivot[ch][0][last_ch_cabled] >= 0)
break;
147
148
150 if (
m_pivot[ch][0][first_ch_cabled] >= 0)
break;
153 }
154
159 throw std::runtime_error("Channel not found in OddPhiCMA::cable_CMA_channels");
160 }
162 }
163
165
169
170 int first_ch_cabled = 64;
171 int last_ch_cabled = -1;
172
174
178 throw std::runtime_error("Channel not found in OddPhiCMA::cable_CMA_channels");
179 }
180 WiredOR* wor = (*found).second;
182
185
188 int local_strip = max_st - (max_st -
start);
189 int final_strip = max_st - (max_st -
stop);
190
191 int chs = (
id().
Ixx_index() == 0) ? 40 - max_st / 2 : 0;
192
194
195 if (E == 'E' && id().Ixx_index() == 1) {
196
197 chs = 8;
198 local_strip = 32;
199 final_strip = 1;
200 }
201 if (E == 'E' && id().Ixx_index() == 0) {
202
203 chs = 24;
204 local_strip = 32;
205 final_strip = 1;
206 }
207
208 if (chs <= first_ch_cabled) first_ch_cabled = chs;
209 do {
212 return false;
213 }
214 if (local_strip > 0 && local_strip <= rpc_st) {
216 m_lowPt[
r][0][chs] = cham * 100 + local_strip - 1;
217 m_lowPt[
r][1][chs] = 10000 + cham * 100 + local_strip - 1;
218 } else {
219 m_lowPt[
r][1][chs] = cham * 100 + local_strip - 1;
220 m_lowPt[
r][0][chs] = 10000 + cham * 100 + local_strip - 1;
221 }
223 multiplicity[local_strip - 1] = 1;
224 } else {
225 multiplicity[local_strip - 1 + (max_st - rpc_st)] = 1;
226 }
227 }
228 ++chs;
229 } while (--local_strip >= final_strip);
230
232 if (chs - 1 >= last_ch_cabled) last_ch_cabled = chs - 1;
234 }
236
237
240
241 if (last_ch_cabled < 0) {
242 throw std::runtime_error(std::string("RPC_CondCabling: OddPhiCMA - neg. array idx at ") +
243 __FILE__ + ":" + std::to_string(__LINE__));
244 }
245
247 if (
m_lowPt[ch][0][last_ch_cabled] >= 0)
break;
250
252 if (
m_lowPt[ch][0][first_ch_cabled] >= 0)
break;
255 }
256 }
257
262 throw std::runtime_error("Channel not found in OddPhiCMA::cable_CMA_channels");
263 }
265 }
266
268
272
273 int first_ch_cabled = 64;
274 int last_ch_cabled = -1;
275
277
281 throw std::runtime_error("Channel not found in OddPhiCMA::cable_CMA_channels");
282 }
283 WiredOR* wor =
found->second;
285
288
291 int local_strip = max_st - (max_st -
start);
292 int final_strip = max_st - (max_st -
stop);
293
294 int chs = (
id().
Ixx_index() == 0) ? 40 - max_st / 2 : 0;
295
298
299 bool isBOE = false;
300 if (abs(sEta) == 8 && L == 'L') isBOE = true;
301 if (isBOE && id().Ixx_index() == 1) {
302 chs = 0;
303 local_strip = 52;
304 final_strip = 1;
305 }
306
307 if (isBOE && id().Ixx_index() == 0) {
308 chs = 4;
309 final_strip = 13;
310 local_strip = 64;
311 }
312
313 if (chs <= first_ch_cabled) first_ch_cabled = chs;
314 do {
317 return false;
318 }
319
320 bool skipChannel = false;
321 if (isBOE && id().Ixx_index() == 1 && ((chs > 3 && chs < 8) || (chs > 39 && chs < 44))) skipChannel = true;
322 if (isBOE && id().Ixx_index() == 0 && ((chs > 19 && chs < 24) || (chs > 55 && chs < 60))) skipChannel = true;
323 if (skipChannel) {
324 ++local_strip;
325 } else {
326 if (local_strip > 0 && local_strip <= rpc_st) {
328 m_highPt[
r][0][chs] = cham * 100 + local_strip - 1;
329 m_highPt[
r][1][chs] = 10000 + cham * 100 + local_strip - 1;
330 } else {
331 m_highPt[
r][1][chs] = cham * 100 + local_strip - 1;
332 m_highPt[
r][0][chs] = 10000 + cham * 100 + local_strip - 1;
333 }
335 multiplicity[local_strip - 1] = 1;
336 } else {
337 multiplicity[local_strip - 1 + (max_st - rpc_st)] = 1;
338 }
339 }
340 }
341
342 ++chs;
343 } while (--local_strip >= final_strip);
344
346 if (chs - 1 >= last_ch_cabled) last_ch_cabled = chs - 1;
348 }
350
351
354
355 if (last_ch_cabled < 0) {
356 throw std::runtime_error(std::string("RPC_CondCabling: OddPhiCMA - neg. array idx at ") +
357 __FILE__ + ":" + std::to_string(__LINE__));
358 }
359
361 if (
m_highPt[ch][0][last_ch_cabled] >= 0)
break;
364
366 if (
m_highPt[ch][0][first_ch_cabled] >= 0)
break;
369 }
370 }
371
372 return true;
373}
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
int pivot_stop_st() const
int highPt_stop_st() const
static constexpr int confirm_channels
int(* m_lowPt)[2][confirm_channels]
int(* m_pivot)[2][pivot_channels]
int pivot_start_st() const
int highPt_start_st() const
unsigned int m_last_pivot_code
unsigned int m_last_lowPt_code
int lowPt_stop_st() const
const CMAidentity & id() const
int lowPt_start_st() const
unsigned int m_first_pivot_code
int lowPt_stop_ch() const
std::string noMoreChannels(const std::string &stat)
unsigned int m_first_highPt_code
int highPt_stop_ch() const
int highPt_start_ch() const
unsigned int m_last_highPt_code
int lowPt_start_ch() const
unsigned int m_first_lowPt_code
int(* m_highPt)[2][confirm_channels]
int pivot_start_ch() const
static constexpr int pivot_channels
int get_max_strip_readout(int)
int ijk_phiReadout() const
const std::string & chamber_name() const
const RPCchamber * connected_rpc(int) const
int give_max_phi_strips() const
void add_odd_read_mul(ReadoutCh &)