20 using namespace asg::msgUserCode;
30 std::ifstream
fin(filepath);
34 throw (
"FPGATrackSimRegionSlices couldn't open " + filepath);
46 if (
line.empty() ||
line[0] ==
'#')
continue;
47 std::istringstream sline(
line);
49 ok = ok && (sline >>
key);
53 ok = ok && (sline >> region);
54 if (ok && region > 0) m_regions.push_back({
min,
max });
55 ok = ok && (region == m_regions.size());
59 else if (
key ==
"phi") ok = ok && (sline >>
min.phi >>
max.phi);
60 else if (
key ==
"eta") ok = ok && (sline >>
min.eta >>
max.eta);
61 else if (
key ==
"qpt") ok = ok && (sline >>
min.qOverPt >>
max.qOverPt);
62 else if (
key ==
"d0") ok = ok && (sline >>
min.d0 >>
max.d0);
63 else if (
key ==
"z0") ok = ok && (sline >>
min.z0 >>
max.z0);
72 throw "FPGATrackSimRegionSlices read error";
75 m_regions.push_back({
min,
max });
87 if (region >= m_regions.size())
89 ANA_MSG_WARNING(
"inRegion() region " << region <<
" out-of-bounds " << m_regions.size());