16#include <boost/property_tree/xml_parser.hpp>
24using boost::property_tree::ptree;
26namespace pt = boost::property_tree;
36 cout <<
"************************** MuctpiXMLParser **********************" << endl;
38 cout <<
"*****************************************************************" << endl;
47 read_xml(inputfile, inputTree);
49 m_muctpiPT = inputTree.get_child(
"MuCTPiGeometry");
59 for(
const boost::property_tree::ptree::value_type &
x:
m_muctpiPT) {
61 string menuElementName =
x.first;
62 if (menuElementName==
"<xmlattr>" || menuElementName==
"<xmlcomment>")
continue;
63 ptree menuElement =
x.second;
66 if( menuElementName==
"MIOCT" ) {
72 }
else if( menuElementName==
"PtEncoding" ) {
93 for(
const auto &
x : menuElement ) {
94 if(
x.first ==
"PtCodeElement" ) {
95 unsigned int idxP1 =
m_xmlHelper.getUIntAttribute(
x.second,
"pt");
100 unsigned int idx = idxP1 - 1;
101 unsigned int ptCode =
m_xmlHelper.getUIntAttribute(
x.second,
"code");
102 unsigned int thresholdValue =
m_xmlHelper.getUIntAttribute(
x.second,
"value");
118 for(
const boost::property_tree::ptree::value_type &
x:menuElement ) {
120 string menuElementNameO =
x.first;
121 if (menuElementNameO==
"<xmlattr>" || menuElementNameO==
"<xmlcomment>")
continue;
122 ptree menuElementO =
x.second;
125 if( menuElementNameO==
"Sector" ){
131 else if( menuElementNameO ==
"Decode" ){
132 for(
const boost::property_tree::ptree::value_type &
y: menuElementO) {
133 string menuElementName1 =
y.first;
134 if (menuElementName1==
"<xmlattr>" || menuElementName1==
"<xmlcomment>")
continue;
135 ptree menuElement1 =
y.second;
151 for(
const boost::property_tree::ptree::value_type &
x:menuElement ) {
153 string menuElementNameO =
x.first;
154 if (menuElementNameO==
"<xmlattr>" || menuElementNameO==
"<xmlcomment>")
continue;
155 ptree menuElementO =
x.second;
158 if( menuElementNameO==
"ROI" ){
161 setROI(menuElementO, roi);
170 std::stringstream
ss;
ss << std::hex ;
182 data.setEtacode(
x );
186 data.setPhicode(
x );
193 std::stringstream
ss;
ss << std::hex ;
206 data.setEtacode(
x );
209 data.setPhicode(
x );
char data[hepevt_bytes_allocation_ATLAS]
boost::property_tree::ptree ptree
#define TRG_MSG_WARNING(x)
void setCodingInfo(unsigned int idx, unsigned int ptCode, unsigned int thresholdValue)
void addSector(const MioctSectorGeometry §or)
void addTopoCell(const MioctTopoCellGeometry &topocell)
void setMioctId(unsigned int id)
void setConnector(unsigned int id)
void setName(const std::string &name)
void addROI(const MioctROIGeometry &roi)
void setSector(boost::property_tree::ptree menuElement, MioctSectorGeometry §or)
boost::property_tree::ptree m_muctpiPT
void parseConfiguration()
void setOctant(boost::property_tree::ptree menuElement, MioctGeometry &octant)
void setTopoCell(boost::property_tree::ptree menuElement, MioctTopoCellGeometry &topocell)
void setROI(boost::property_tree::ptree menuElement, MioctROIGeometry &roi)
void printConfiguration() const
void readConfiguration(const std::string &inputfile)
void setPtEncoding(boost::property_tree::ptree menuElement, L1MuonPtEncoding &ptEncoding)
MuctpiXMLHelper m_xmlHelper
TrigConfMessaging(const std::string &name)
Constructor with parameters.
Forward iterator to traverse the main components of the trigger configuration.