8 #ifndef MonitorXMLParser_h
9 #define MonitorXMLParser_h
16 #include <xercesc/dom/DOM.hpp>
17 #include <xercesc/dom/DOMElement.hpp>
18 #include <xercesc/parsers/XercesDOMParser.hpp>
73 TAG_DBE( xercesc::XMLString::transcode(
"dbelements" ) ),
74 TAG_ME( xercesc::XMLString::transcode(
"me" ) ),
75 TAG_1D( xercesc::XMLString::transcode(
"th1d" ) ),
76 TAG_2D( xercesc::XMLString::transcode(
"th2d" ) ),
77 TAG_TPROFILE( xercesc::XMLString::transcode(
"tprofile" ) ),
79 TAG_QUERY( xercesc::XMLString::transcode(
"query" ) ),
81 ATTR_TITLE( xercesc::XMLString::transcode(
"title" ) ),
82 ATTR_XBINS( xercesc::XMLString::transcode(
"xbins" ) ),
83 ATTR_XFROM( xercesc::XMLString::transcode(
"xfrom" ) ),
84 ATTR_XTO( xercesc::XMLString::transcode(
"xto" ) ),
85 ATTR_YBINS( xercesc::XMLString::transcode(
"ybins" ) ),
86 ATTR_YFROM( xercesc::XMLString::transcode(
"yfrom" ) ),
87 ATTR_YTO( xercesc::XMLString::transcode(
"yto" ) ),
88 ATTR_ZBINS( xercesc::XMLString::transcode(
"ybins" ) ),
89 ATTR_ZFROM( xercesc::XMLString::transcode(
"yfrom" ) ),
90 ATTR_ZTO( xercesc::XMLString::transcode(
"yto" ) ),
91 ATTR_NCYCLE( xercesc::XMLString::transcode(
"ncycle" ) ),
92 ATTR_LOOP( xercesc::XMLString::transcode(
"loop" ) ),
93 ATTR_NAME( xercesc::XMLString::transcode(
"name" ) ),
94 ATTR_ARG( xercesc::XMLString::transcode(
"arg" ) ),
95 ATTR_ALIAS( xercesc::XMLString::transcode(
"alias" ) ) {
127 }
catch( xercesc::XMLException&
e ){
129 char*
message = xercesc::XMLString::transcode( e.getMessage() );
131 std::ostringstream buf ;
132 buf <<
"Error parsing file: " << message << std::flush;
136 throw( std::runtime_error( buf.str() ) );
138 }
catch(
const xercesc::DOMException& e ){
140 char*
message = xercesc::XMLString::transcode( e.getMessage() );
142 std::ostringstream buf;
143 buf <<
"Encountered DOM Exception: " << message << std::flush;
147 throw( std::runtime_error( buf.str() ) );
181 #endif // MonitorXMLParser_h
MonitorXMLParser(const std::string &fromFile)
std::vector< DbQuery > queries
const std::vector< DB_ME > & getDB_ME(void) const
std::vector< DB_ME > DBMonitoringElements_
void handleElement(xercesc::DOMElement *element)
return(e1-e2)*(e1-e2)+dp *dp
xercesc::XercesDOMParser * parser_