11 #ifndef MonitorXMLParser_h
12 #define MonitorXMLParser_h
19 #include <xercesc/dom/DOM.hpp>
20 #include <xercesc/dom/DOMElement.hpp>
21 #include <xercesc/parsers/XercesDOMParser.hpp>
76 TAG_DBE( xercesc::XMLString::transcode(
"dbelements" ) ),
77 TAG_ME( xercesc::XMLString::transcode(
"me" ) ),
78 TAG_1D( xercesc::XMLString::transcode(
"th1d" ) ),
79 TAG_2D( xercesc::XMLString::transcode(
"th2d" ) ),
80 TAG_TPROFILE( xercesc::XMLString::transcode(
"tprofile" ) ),
82 TAG_QUERY( xercesc::XMLString::transcode(
"query" ) ),
84 ATTR_TITLE( xercesc::XMLString::transcode(
"title" ) ),
85 ATTR_XBINS( xercesc::XMLString::transcode(
"xbins" ) ),
86 ATTR_XFROM( xercesc::XMLString::transcode(
"xfrom" ) ),
87 ATTR_XTO( xercesc::XMLString::transcode(
"xto" ) ),
88 ATTR_YBINS( xercesc::XMLString::transcode(
"ybins" ) ),
89 ATTR_YFROM( xercesc::XMLString::transcode(
"yfrom" ) ),
90 ATTR_YTO( xercesc::XMLString::transcode(
"yto" ) ),
91 ATTR_ZBINS( xercesc::XMLString::transcode(
"ybins" ) ),
92 ATTR_ZFROM( xercesc::XMLString::transcode(
"yfrom" ) ),
93 ATTR_ZTO( xercesc::XMLString::transcode(
"yto" ) ),
94 ATTR_NCYCLE( xercesc::XMLString::transcode(
"ncycle" ) ),
95 ATTR_LOOP( xercesc::XMLString::transcode(
"loop" ) ),
96 ATTR_NAME( xercesc::XMLString::transcode(
"name" ) ),
97 ATTR_ARG( xercesc::XMLString::transcode(
"arg" ) ),
98 ATTR_ALIAS( xercesc::XMLString::transcode(
"alias" ) ) {
130 }
catch( xercesc::XMLException& e ){
132 char*
message = xercesc::XMLString::transcode( e.getMessage() );
134 std::ostringstream buf ;
135 buf <<
"Error parsing file: " << message << std::flush;
139 throw( std::runtime_error( buf.str() ) );
141 }
catch(
const xercesc::DOMException& e ){
143 char*
message = xercesc::XMLString::transcode( e.getMessage() );
145 std::ostringstream buf;
146 buf <<
"Encountered DOM Exception: " << message << std::flush;
150 throw( std::runtime_error( buf.str() ) );
184 #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)
xercesc::XercesDOMParser * parser_