12 if (rbx.size()<5)
return;
13 if (rm<1 || rm>5)
return;
14 if (pixel<0 || pixel>19)
return;
15 if (rmfiber<1 || rmfiber>8)
return;
16 if (fiberchannel<0 || fiberchannel>2)
return;
17 if (qie<1 || qie>4)
return;
18 if (adc<0 || adc>5)
return;
21 if (!rbx.compare(0,3,
"HBM" )) { num=0 + atoi(rbx.substr(3,2).c_str())-1; }
22 else if (!rbx.compare(0,3,
"HBP" )) { num=18 + atoi(rbx.substr(3,2).c_str())-1; }
23 else if (!rbx.compare(0,3,
"HEM" )) { num=18*2 + atoi(rbx.substr(3,2).c_str())-1; }
24 else if (!rbx.compare(0,3,
"HEP" )) { num=18*3 + atoi(rbx.substr(3,2).c_str())-1; }
25 else if (!rbx.compare(0,4,
"HO2M")) { num=18*4 + atoi(rbx.substr(4,2).c_str())-1; }
26 else if (!rbx.compare(0,4,
"HO1M")) { num=18*4+12 + atoi(rbx.substr(4,2).c_str())-1; }
27 else if (!rbx.compare(0,3,
"HO0" )) { num=18*4+12*2 + atoi(rbx.substr(3,2).c_str())-1; }
28 else if (!rbx.compare(0,4,
"HO1P")) { num=18*4+12*3 + atoi(rbx.substr(4,2).c_str())-1; }
29 else if (!rbx.compare(0,4,
"HO2P")) { num=18*4+12*4 + atoi(rbx.substr(4,2).c_str())-1; }
30 else if (!rbx.compare(0,3,
"HFM" )) { num=18*4+12*5 + atoi(rbx.substr(3,2).c_str())-1; }
31 else if (!rbx.compare(0,3,
"HFP" )) { num=18*4+12*6 + atoi(rbx.substr(3,2).c_str())-1; }
49 std::string subdets[11]={
"HBM",
"HBP",
"HEM",
"HEP",
"HO2M",
"HO1M",
"HO0",
"HO1P",
"HO2P",
"HFM",
"HFP"};
56 subdet_index=(box-
num)/18;
60 subdet_index=4+(box-18*4-
num)/12;
62 std::stringstream tempss;
63 tempss << std::setw(2) << std::setfill(
'0') << num+1;
64 return subdets[subdet_index]+tempss.str();
68 return s <<
id.rbx() <<
id.rm() <<
'[' <<
id.rmFiber() <<
'/' <<
id.fiberChannel()
69 <<
"] pix=" <<
id.pixel()
70 <<
" qiecard=" <<
id.qieCard() <<
" adc=" <<
id.adc();
int adc(sample_type sample)
get the ADC sample (12 bits)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
static const std::string subdets[7]