133 {
135 read_xml(lutFile, inputTree);
136
137 boost::property_tree::ptree topEle =
inputTree.get_child(
"MUCTPI_LUT");
138
139
140 for(
const boost::property_tree::ptree::value_type &
x: topEle) {
141
142 std::string topElementName =
x.first;
144
145 if (topElementName != "LUT") continue;
146
147 std::string SectorId1 =
xmlHelper.getAttribute(lut,
"SectorId1");
148 std::string SectorId2 =
xmlHelper.getAttribute(lut,
"SectorId2");
149
150 unsigned left_mod = 32;
151 unsigned right_mod = 32;
152 if (SectorId1[0] == 'E') left_mod = 48;
153 if (SectorId1[0] == 'F') left_mod = 24;
154 if (SectorId2[0] == 'E') right_mod = 48;
155 if (SectorId2[0] == 'F') right_mod = 24;
156
157 std::string snum_left = std::string(1,SectorId1[1])+std::string(1,SectorId1[2]);
158 int sec_left = std::stoi(snum_left) % left_mod;
159
160 std::string snum_right = std::string(1,SectorId2[1])+std::string(1,SectorId2[2]);
161 int sec_right = std::stoi(snum_right) % right_mod;
162
164 int active_side = (
side ==
"C") ? 0 : 1;
165
166 std::string System1 = SectorId1.substr(0,1);
167 std::string System2 = SectorId2.substr(0,1);
168
169 for(
const boost::property_tree::ptree::value_type &
z: lut) {
170 std::string menuElementName =
z.first;
171 if(menuElementName!="Element" && menuElementName!="BBElement")continue;
173 auto roi1 =
xmlHelper.getIntAttribute(ele,
"RoI1");
174 auto roi2 =
xmlHelper.getIntAttribute(ele,
"RoI2");
175 auto lhs_key =
make_key(System1,sec_left,roi1);
176 auto rhs_key =
make_key(System2,sec_right,roi2);
177 auto region =
make_pair(lhs_key,rhs_key);
179 }
180 }
182 }
boost::property_tree::ptree ptree
MuctpiXMLHelper xmlHelper
std::string make_key(std::string prefix, int global_sec, int roi)
std::map< int, std::set< std::string > > global_pairs
std::string make_pair(const std::string &lhs, const std::string &rhs) const
constexpr auto lut(Generator &&f)