15 if (pixel < 0 || pixel > 19)
17 if (rmfiber < 1 || rmfiber > 8)
19 if (fiberchannel < 0 || fiberchannel > 2)
21 if (qie < 1 || qie > 4)
23 if (adc < 0 || adc > 5)
27 if (!
rbx.compare(0, 3,
"HBM")) {
28 num = 0 + atoi(
rbx.substr(3, 2).c_str()) - 1;
29 }
else if (!
rbx.compare(0, 3,
"HBP")) {
30 num = 18 + atoi(
rbx.substr(3, 2).c_str()) - 1;
31 }
else if (!
rbx.compare(0, 3,
"HEM")) {
32 num = 18 * 2 + atoi(
rbx.substr(3, 2).c_str()) - 1;
33 }
else if (!
rbx.compare(0, 3,
"HEP")) {
34 num = 18 * 3 + atoi(
rbx.substr(3, 2).c_str()) - 1;
35 }
else if (!
rbx.compare(0, 4,
"HO2M")) {
36 num = 18 * 4 + atoi(
rbx.substr(4, 2).c_str()) - 1;
37 }
else if (!
rbx.compare(0, 4,
"HO1M")) {
38 num = 18 * 4 + 12 + atoi(
rbx.substr(4, 2).c_str()) - 1;
39 }
else if (!
rbx.compare(0, 3,
"HO0")) {
40 num = 18 * 4 + 12 * 2 + atoi(
rbx.substr(3, 2).c_str()) - 1;
41 }
else if (!
rbx.compare(0, 4,
"HO1P")) {
42 num = 18 * 4 + 12 * 3 + atoi(
rbx.substr(4, 2).c_str()) - 1;
43 }
else if (!
rbx.compare(0, 4,
"HO2P")) {
44 num = 18 * 4 + 12 * 4 + atoi(
rbx.substr(4, 2).c_str()) - 1;
45 }
else if (!
rbx.compare(0, 3,
"HFM")) {
46 num = 18 * 4 + 12 * 5 + atoi(
rbx.substr(3, 2).c_str()) - 1;
47 }
else if (!
rbx.compare(0, 3,
"HFP")) {
48 num = 18 * 4 + 12 * 6 + atoi(
rbx.substr(3, 2).c_str()) - 1;
64 std::string subdets[11] = {
"HBM",
"HBP",
"HEM",
"HEP",
"HO2M",
"HO1M",
"HO0",
"HO1P",
"HO2P",
"HFM",
"HFP"};
68 int subdet_index = -1;
71 subdet_index = (box -
num) / 18;
73 num = (box - 18 * 4) % 12;
74 subdet_index = 4 + (box - 18 * 4 -
num) / 12;
76 std::stringstream tempss;
77 tempss << std::setw(2) << std::setfill(
'0') <<
num + 1;
78 return subdets[subdet_index] + tempss.str();
82 return s <<
id.rbx() <<
id.rm() <<
'[' <<
id.rmFiber() <<
'/' <<
id.fiberChannel() <<
"] pix=" <<
id.pixel()
83 <<
" qiecard=" <<
id.qieCard() <<
" adc=" <<
id.adc();
std::ostream & operator<<(std::ostream &s, const HcalFrontEndId &id)
static const std::string subdets[7]
uint16_t *__restrict__ uint16_t const *__restrict__ adc